You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2007-02-15 18:16:55

mmckinst
Member
Registered: 2007-02-15
Posts: 5

duplicate / orphaned computers

I have been using OCS/GLPI for a few months now and have been very pleased so far. I keep encountering a problem though - GLPI sometimes imports a computer that is already in the GLPI database, creating duplicates, and orphans one of them. By orphaned, I mean the old computer is no longer associated with any computer in the OCS database - viewing the details does not yield a "Last update date in OCS" or "Import date in GLPI". It always orphans the computer which I've hand entered data for such as the room number.

Looking at the OCS database only shows one computer, no duplicates.

Any ideas why GLPI would create a new computer and abandon an old one, instead of just updating the one already there?

Offline

#2 2007-02-15 19:52:51

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: duplicate / orphaned computers


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2007-02-16 20:46:32

jp10558
Member
Registered: 2006-10-09
Posts: 101

Re: duplicate / orphaned computers

I have the same issue with orphaned computers, but I think it's because something gets updated in OCSNG, and you just hit a manual update rather than linking it to an existing GLPI computer.

Offline

#4 2007-02-19 16:48:18

mmckinst
Member
Registered: 2007-02-15
Posts: 5

Re: duplicate / orphaned computers

Sorry about that. This is GLPI 0.68.3 running on Debian with Apache 2.0.54, PHP 4.3.10, MySQL and 4.1.11. OCS is version 1.0RC3. It is a fresh install, no upgrades have been done.

The one error message I get when syncing is: PHP ERROR: Notice: Use of undefined constant dohistory - assumed 'dohistory' in /var/www/glpi/inc/ocsng.function.php on line 441.

jp10558 wrote:

I have the same issue with orphaned computers, but I think it's because something gets updated in OCSNG, and you just hit a manual update rather than linking it to an existing GLPI computer.

Hrmm. Telling GLPI to "Link new OCS computers to existing GLPI computers" does seem like it will prevent duplicates/orphans. This is confusing because the computers aren't new to OCS, they have always been there as well as in GLPI. When I tell GLPI to sync with OCNG it should just sync the GLPI computer with the OCS computer. For some reason it ignores them and when I import new computers they get orphaned/duplicated.

Offline

#5 2007-02-19 18:19:11

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: duplicate / orphaned computers

For your error line 441 - the correction here :
https://dev.indepnet.net:8080/glpi/changeset/4419

I do not really understand your orphans problem.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#6 2007-02-21 21:42:28

mmckinst
Member
Registered: 2007-02-15
Posts: 5

Re: duplicate / orphaned computers

Moyo, thanks for the help. I looked through the forums and found other threads detailing the same issues I have been having. Basically OCS manages duplicates just fine, but GLPI creates duplicates for some reason. This thread seems to be the best.

http://www.glpi-project.org/forum/viewtopic.php?id=1823
http://www.glpi-project.org/forum/viewtopic.php?id=2022
http://www.glpi-project.org/forum/viewtopic.php?id=2095
http://www.glpi-project.org/forum/viewtopic.php?id=4696

Offline

#7 2007-08-23 03:19:55

tangk1
Member
Registered: 2007-08-23
Posts: 1

Re: duplicate / orphaned computers

I had read the above links.

I have the same problem day by day . I am using Ubuntu 7.04 desktop. I am using latest GLPI 0.68.3-2 ( I don't know why the login screen still show 0.68.3)  and latest OCS 1.01 Ver. 4100 .
I have 51 Pcs connected to OCS server and can show all the 51 PCs properly. But, Glpi always display duplicate Pcs which is more than 51. I need to delete the extra duplicate PC manually every 1-2 days. But, there is no hardware changes or any user habbit changes. Anyone know why ?

OCS NG and GLPI run on the same server

glpi:
ZPW001  Hewlett-Packard CNG529073K Low Profile Desktop HP dc5000 SFF(DX854AV) Microsoft Windows XP Professional vo 2007-08-23 09:12:57 poonwc
ZPW001  Hewlett-Packard CNG529073K Low Profile Desktop HP dc5000 SFF(DX854AV) Microsoft Windows XP Professional vo 2007-08-21 13:28:22 poonwc

Last edited by tangk1 (2007-08-23 03:23:11)

Offline

#8 2007-08-24 21:01:42

jp10558
Member
Registered: 2006-10-09
Posts: 101

Re: duplicate / orphaned computers

I just noticed this again - I had 4 entries for the same machine. I'm running on SL5 with OCS 1.01 and GLPI 0.68.3-2. Anyway, one of them had a different type entry, but 3 were the SAME! This is a problem because if I'm just importing from OCSNG then I can delete the "extras", but if I've put in additional info I have to migrate it somehow. I need to either be able to:
1) prevent this from happening
2) be notified if GLPI isn't sure if something is new or not (or an option to only create new entries manually)
3) have some sort of GUI merge tool.

Offline

#9 2007-09-13 13:58:55

marcinr
Member
Registered: 2007-09-13
Posts: 49

Re: duplicate / orphaned computers

We have the same problem. Some computers have duplicates...
    Name         Producent     Serial Number     Type     Model     OS     Last update    
    ATJ23501         Dell Inc.     <cut>     Portable     Latitude D510     Microsoft Windows XP Professional         26-04-2007 22:36    
    ATJ23501         Dell Inc.     <cut>     Portable     Latitude D510     Microsoft Windows XP Professional         10-05-2007 17:24    
    ATJ23501         Dell Inc.     <cut>     Portable     Latitude D510     Microsoft Windows XP Professional         11-05-2007 16:44    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         12-06-2007 11:58    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         14-06-2007 11:34    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         23-06-2007 12:59    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         04-07-2007 22:16    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         07-08-2007 10:39    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         01-09-2007 11:08    
    ATJ23501         Dell Inc.     <cut>     Docking Station     Latitude D510     Microsoft Windows XP Professional         11-09-2007 12:49    

This is an example. The same computer that have 10 entries on 'Computers' list. I've cut its serial number but, for your information, it's the same in all entries.

GLPI 0.68.3.

Last edited by marcinr (2007-09-13 13:59:28)

Offline

#10 2007-09-13 14:49:23

marcinr
Member
Registered: 2007-09-13
Posts: 49

Re: duplicate / orphaned computers

Hmmm i think i've found a solution. In OCS you can define how it should recognize particular computer (option AUTO_DUPLICATE_LVL). I had this option set to "serial and hostname and macaddress". I think the reason for duplicated entries in glpi is macaddress. If you eg. add new network card to a computer, OCS thinks it's a new computer.

Check your settings... Perhaps it is enough to remove macaddress from AUTO_DUPLICATE_LVL.

Offline

#11 2007-09-14 20:55:28

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: duplicate / orphaned computers

OCS isn't the one seeing duplicates, only GLPI is, so I'm not convinced that's going to help.
Additionally, those 3 factors are identical in every duplicate case I have seen.

Offline

#12 2008-01-24 15:28:50

bmw328ii
Member
Registered: 2008-01-23
Posts: 68

Re: duplicate / orphaned computers

Any news about that problem?

We have also duplicates in our glpi.

We have a VPN Client Software on our administrators laptops. Every time a user logs into the network from home office the virtual network adapter gets a dhcp adress. OCS launches an inventory and glpi is creating a duplicate as a new machine.

In OCS are exactly the number of clients and serves registered.
In GLPI are always some duplicates to see.


How can I stop this in GLPI?

Offline

#13 2008-01-24 18:02:35

ICOM
Member
Registered: 2007-07-26
Posts: 14

Re: duplicate / orphaned computers

I haven't finished testing it yet, but the following seems promising:
In inc/ocsng.function.php, around line 403,  in the ocsLinkComputer function, there's a call to ocsResetLicenses. I commented that out.

Then, to prevent new duplicate licenses from being created, I changed the ocsUpdateComputer call around line 412 to pass 0 as the second parameter.

Then, when you do a "Link new OCS computers to existing GLPI computers", it should retain all the old licensing info, and still not create a duplicate computer.

Offline

#14 2008-01-29 17:23:28

bmw328ii
Member
Registered: 2008-01-23
Posts: 68

Re: duplicate / orphaned computers

Hello,

i have solved my problem:

You can link computer from ocs to existing glpi items correctly only when there are no deleted items with the same computer name in your list of deleted items.

When you delete an entry it is gone in your list. In real it is only hidden from view. At the Computer Inventar you have a trash symbol with a drop down menu with option "yes" or "no". Simply click on yes and then on "search". Now you will get a list with deleted items. You can mark the items which should be removed. After deleting the items again try to link ocs computer with existing glpi items.

It worked perfectly!

Offline

#15 2008-02-01 12:11:27

caimano68
Member
From: Italy
Registered: 2006-06-28
Posts: 131

Re: duplicate / orphaned computers

@ bmw328II

Hello,

you are correct, but in my configuration ( ubuntu 6.06 server - apache2 - php5 ) glpi 0.7.2 and ocs 1.0.1
i have made a new inventory in OCS ( removed all pc and restart inventory through  login script ( 300 pcs) and when I link ocs item to an existing computer the monitor links is a new one ( new id in glpi database). Infact if I control the info in Users page there are more than one monitor linked to the user ( the new one and the old one that is disconnected from any computer) This seems to be a bug.

Have you any suggestion?
thanks in advance!


Glpi 0.84.8 - production  and testing - OCS 2.1.2  - Mysql 5 - Apache 2 - php5 - Ubuntu server LTS 14.04 LTS
Plugins:    behaviour, position, generic object, sim management, web services, projects _______________________________________________

Offline

Board footer

Powered by FluxBB