problem with opsi-product-updater and nfsv4, fixed

Antworten
ptman
Beiträge: 6
Registriert: 21 Aug 2012, 12:31

problem with opsi-product-updater and nfsv4, fixed

Beitrag von ptman »

Hi,

We want to run opsi so that only the base operating system in installed "locally" on the virtual machine and /var/lib/opsi is NFS-mounted (actually a link to a NFS mount).

With this setup I got `opsi-product-updater -i -vv` failing with:

Code: Alles auswählen

Extracting data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi'
/bin/cpio: winconfig.png: Cannot change ownership to uid 993, gid 992: Invalid argument

Traceback:
     line 130 in '_extract' in file '/usr/lib/pymodules/python2.7/OPSI/Util/File/Archive/__init__.py'
     ==>>> Command '/bin/zcat "/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz" | /bin/cpio --quiet -idumv ' failed with code 2: /bin/cpio: winconfig.png: Cannot change ownership to uid 993, gid 992: Invalid argument

Traceback:
     line 218 in 'installPackage' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Depotserver.py'
     line 306 in 'extractData' in file '/usr/lib/pymodules/python2.7/OPSI/Util/Product.py'
     ==>>> Failed to extract data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi': Failed to extract archive '/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz': Command '/bin/zcat "/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz" | /bin/cpio --quiet -idumv ' failed with code 2: /bin/cpio: winconfig.png: Cannot change ownership to uid 993, gid 992: Invalid argument

Traceback:
     line 1073 in '<module>' in file '/usr/bin/opsi-product-updater'
     line 1067 in 'main' in file '/usr/bin/opsi-product-updater'
     line 569 in 'processUpdates' in file '/usr/bin/opsi-product-updater'
     line 1 in 'depot_installPackage' in file '<string>'
     line 423 in '_executeMethod' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Backend.py'
     line 1 in 'depot_installPackage' in file '<string>'
     line 423 in '_executeMethod' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Backend.py'
     line 1 in 'depot_installPackage' in file '<string>'
     line 423 in '_executeMethod' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Backend.py'
     line 114 in 'depot_installPackage' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Depotserver.py'
     line 399 in 'installPackage' in file '/usr/lib/pymodules/python2.7/OPSI/Backend/Depotserver.py'
     ==>>> Backend error: Failed to install package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi' on depot 'opsi.corp.zenrobotics.com': Failed to extract data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi': Failed to extract archive '/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz': Command '/bin/zcat "/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz" | /bin/cpio --quiet -idumv ' failed with code 2: /bin/cpio: winconfig.png: Cannot change ownership to uid 993, gid 992: Invalid argument

ERROR: Backend error: Failed to install package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi' on depot 'opsi.corp.zenrobotics.com': Failed to extract data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi': Failed to extract archive '/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz': Command '/bin/zcat "/tmp/.opsi.unpack.a7O7Y/CLIENT_DATA.cpio.gz" | /bin/cpio --quiet -idumv ' failed with code 2: /bin/cpio: winconfig.png: Cannot change ownership to uid 993, gid 992: Invalid argument
I solved this by changing the line:

Code: Alles auswählen

                                command = u'%s "%s" | %s --quiet -idumv %s' % (cat, self._filename, System.which('cpio'), include)
to

Code: Alles auswählen

                                command = u'%s "%s" | %s --quiet -idumv --no-preserve-owner %s' % (cat, self._filename, System.which('cpio'), include)
Please consider incorporating this change into the next version of opsi.

Also, I was wondering if you know of any other problems that might arise from using NFSv4 with opsi?

Cheers,
Paul

PS. Is this the right place to report bugs or do you have a public bug tracker somewhere? I did look for one, but didn't spend more than a couple minutes looking.
Antworten