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 2018-01-12 12:03:07

Sgs
Guest
Registered: 2016-02-02
Posts: 4

Wrong operating systems link automatically created during update 9.2.1

Hi,

After updating from 9.1.6 to 9.2.1 it automatically have created on several computers a new entry in the "operating system" adding a second link to another OS. for example, I have a windows server 2018 R2 that now also have CentOS in the Operating system list.

I've tried to select the wrong entry and press "Delete permanently the relation with selected items" but it does nothing. It shows Operation successful on the bottom but it does not get deleted. If I go to historically it says first "Operating system    Add a link with an item: CentOS (46) at the time I did the version update and latter when I tried to delete the link it says "Operating system    Lock a link with an item: CentOS (46)".

I did not get any error during the version upgrade but I guess this was caused by some errors I have on my database as this glpi installation was originally 0.84 updated to 9.1 and latter to 9.1.6.

I have the fusioninventory plugin installed but the actions from the history where done under my user, not the fusion inventory.

I've been looking arround the SQL database and I can see that in the table "glpi_items_operatingsystems" two entries have been created for some servers

mysql> SELECT *  FROM `glpi_items_operatingsystems`  WHERE `itemtype` = 'Computer' AND `items_id` = 411;
+------+----------+----------+---------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+----------------+-------------------------+----------------------------+---------------------+---------------------+------------+------------+-------------+--------------+
| id   | items_id | itemtype | operatingsystems_id | operatingsystemversions_id | operatingsystemservicepacks_id | operatingsystemarchitectures_id | operatingsystemkernelversions_id | license_number | license_id              | operatingsystemeditions_id | date_mod            | date_creation       | is_deleted | is_dynamic | entities_id | is_recursive |
+------+----------+----------+---------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+----------------+-------------------------+----------------------------+---------------------+---------------------+------------+------------+-------------+--------------+
|  408 |      411 | Computer |                  44 |                         68 |                              4 |                               1 |                              111 |                | 55041-262-1086132-84779 |                          0 | NULL                | NULL                |          0 |          0 |           0 |            0 |
| 1523 |      411 | Computer |                  46 |                         85 |                              0 |                               2 |                              582 | NULL           | NULL                    |                          0 | 2018-01-10 09:44:11 | 2018-01-10 09:44:11 |          0 |          1 |           0 |            0 |
+------+----------+----------+---------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+----------------+-------------------------+----------------------------+---------------------+---------------------+------------+------------+-------------+--------------+

Any idea how to fix this? Can I do some pre-task before the update to 9.2.1 to fix this?

Last edited by Sgs (2018-01-12 12:23:47)

Offline

#2 2018-01-15 08:16:04

yustas
Guest
Registered: 2018-01-11
Posts: 7

Re: Wrong operating systems link automatically created during update 9.2.1

+1. the same qestion

Offline

#3 2018-01-28 19:14:29

prometheus
Guest
Registered: 2017-12-15
Posts: 1

Re: Wrong operating systems link automatically created during update 9.2.1

I have the exact same problem. We have many Windows clients but some of them linked to OSX. And somehow I cant delete the link. I disabled, deleted, reinstalled Fusion, reinstalled 9.2.1 but no luck so far.

Offline

#4 2018-02-06 13:40:44

Floflobel
Guest
Registered: 2018-02-06
Posts: 1

Re: Wrong operating systems link automatically created during update 9.2.1

Hi,

I have the same problem with operating systems.
To solve the problem, I selected the "items_id" which have two operating systems into the database and export to a file:

mysql -pPASSWORD glpi --execute "select items_id,count(1) from glpi_items_operatingsystems group by items_id order by count(1), items_id;" > /dev/shm/duplicate_operating_systems

Your file must contain only the "item_id" with two operating systems and no longer display the "count":

2859
2861
2862
2863
2864
2865
2869
2871
2873
2874
2879
2880

Parse the file for use in mysql:

cat /dev/shm/duplicate_operating_systems | tr '\n' " "| sed "s/ /','/g"

Delete all "items_id" with two or more operating systems and run an inventory to fix the problem:

delete from glpi_items_operatingsystems where items_id in ('2859','2861','2862','2863','2864','2865','2869','2871','2873','2874','2879','2880');

Offline

#5 2018-09-24 14:16:26

fabibus
Guest
From: Nantes
Registered: 2008-02-05
Posts: 139

Re: Wrong operating systems link automatically created during update 9.2.1

I have the same problem and I prefer to not delete all computer.
I delete only the old OS whith this  sql query :

SQL wrote:

DELETE t1
FROM glpi_items_operatingsystems AS t1, glpi_items_operatingsystems AS t2
WHERE t1.id < t2.id
AND t1.items_id = t2.items_id

See : https://forum.glpi-project.org/viewtopi … 16#p353316


Plateforme en exploitation : GLPI 9.3.2 + FusionInventory 9.3+1.(2) sur Fedora 28

Offline

Board footer

Powered by FluxBB