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 2014-03-04 20:02:13

wakesk8
Guest
Registered: 2010-03-07
Posts: 47

GLPI 0.83.8 - OCSNG Plugin 1.6.1 - CIFS Volumes not importing

I have been running GLPI version 0.83.8 w/ OCS Import Plugin 1.6.1 importing from OCS Inventory Server 2.1.0rc1 and have run into an issue.  My linux devices are not showing CIFS mounts under volumes when importing into GLPI.  I have confirmed that the CIFS mounts show under the disks section on OCS, but when importing into GLPI only ext3 and NFS volumes are displaying.  Any one else seem to have this issue?  I am in the process of upgrading to the latest 0.84.x GLPI version on my test server, but don't see anything listed under the change logs that indicates this is a open issue.

Any help would be appreciated.

Offline

#2 2014-03-04 22:31:54

wakesk8
Guest
Registered: 2010-03-07
Posts: 47

Re: GLPI 0.83.8 - OCSNG Plugin 1.6.1 - CIFS Volumes not importing

Figured out where the issue is:

/var/www/glpi/inc/ocsserver.class.php

Original Version:

// TYPE : vxfs / ufs  : VOLUMN = mount / FILESYSTEM = device
               if (in_array($line['TYPE'], array("vxfs", "ufs")) ) {
                  $disk['name']           = $line['VOLUMN'];
                  $disk['mountpoint']     = $line['VOLUMN'];
                  $disk['device']         = $line['FILESYSTEM'];
                  $disk['filesystems_id'] = Dropdown::importExternal('Filesystem', $line["TYPE"]);

               } else if (in_array($line['FILESYSTEM'], array('ext2', 'ext3', 'ext4', 'ffs',
                                                              'fuseblk', 'fusefs', 'hfs', 'jfs',
                                                              'jfs2', 'Journaled HFS+', 'nfs',
                                                              'smbfs', 'reiserfs', 'vmfs', 'VxFS',
                                                              'ufs', 'xfs', 'zfs'))) {

Modified Version:  Adding 'cifs' to else if statement:

// TYPE : vxfs / ufs  : VOLUMN = mount / FILESYSTEM = device
               if (in_array($line['TYPE'], array("vxfs", "ufs")) ) {
                  $disk['name']           = $line['VOLUMN'];
                  $disk['mountpoint']     = $line['VOLUMN'];
                  $disk['device']         = $line['FILESYSTEM'];
                  $disk['filesystems_id'] = Dropdown::importExternal('Filesystem', $line["TYPE"]);

               } else if (in_array($line['FILESYSTEM'], array('cifs', 'ext2', 'ext3', 'ext4', 'ffs',
                                                              'fuseblk', 'fusefs', 'hfs', 'jfs',
                                                              'jfs2', 'Journaled HFS+', 'nfs',
                                                              'smbfs', 'reiserfs', 'vmfs', 'VxFS',
                                                              'ufs', 'xfs', 'zfs'))) {

Performed a force synchronization on a test device and it correctly displays all items from ocs `drives` table for HARDWARE_ID.

Offline

#3 2014-03-07 11:02:44

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,088

Re: GLPI 0.83.8 - OCSNG Plugin 1.6.1 - CIFS Volumes not importing

0.83.8 is to older to commit for this version.


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB