Python messages with opsi-package-manager

Antworten
lloydsystems
Beiträge: 22
Registriert: 03 Feb 2013, 09:46

Python messages with opsi-package-manager

Beitrag von lloydsystems »

Hi,

This is an off-shoot of my post 'opsi with Samba4' but I though I should raise it as a separate item and provide more details from the error log.

I have a CentOS 6.3 server (x64) running current version opsi. Python version is 2.6.6-29. Server is using Samba4 AD version 4.0.1 rather than Samba3, for which I customised the install. I have been testing it quite thoroughly (I think) and everything seems to be working.

When I build a package and try to install it with opsi-package-manager I get the following errors. For example with Abobe Reader

Code: Alles auswählen

opsi-package-manager -i reader_9.5.4-1.opsi
Produces this in the package.log file
Installing package file '/var/lib/opsi/workbench/reader/reader_9.5.4-1.opsi' on depot 'server.domain.local' (Depotserver.py|148)
Getting meta data from package '/var/lib/opsi/workbench/reader/reader_9.5.4-1.opsi' (Product.py|196)
Creating product in backend (Depotserver.py|183)
Locking product 'reader' on depot 'server.domain.local' (Depotserver.py|186)
Checking package dependencies (Depotserver.py|204)
Running preinst script (Depotserver.py|207)
Running package script 'preinst' (Product.py|393)
Unpacking package files (Depotserver.py|211)
Extracting data from package '/var/lib/opsi/workbench/reader/reader_9.5.4-1.opsi' (Product.py|242)
Setting product property states in backend (Depotserver.py|293)
Running postinst script (Depotserver.py|311)
Running package script 'postinst' (Product.py|393)
Creating package content file (Product.py|364)
Setting access rights of client-data files (Product.py|317)
Traceback: (Logger.py|742)
line 316 in 'installPackage' in file '/usr/lib/python2.6/site-packages/OPSI/Backend/Depotserver.py' (Logger.py|742)
line 361 in 'setAccessRights' in file '/usr/lib/python2.6/site-packages/OPSI/Util/Product.py' (Logger.py|742)
==>>> Failed to set access rights of client-data files of package '/var/lib/opsi/workbench/reader/reader_9.5.4-1.opsi': Failed to change owner of '/var/lib/opsi/depot/reader/AdbeRdr950_en_US.msi' to '-1:3000032': [Errno 1] Operation not permitted: '/var/lib/opsi/depot/reader/AdbeRdr950_en_US.msi' (Depotserver.py|398)
It appears to be trying to set user:group of -1:3000032, which obviously will not work.

I have looked at the setAccessRights code in Product.py. It appears to start with default uid=-1 then tries to determine the uid for opsiconfd and gid for opsifileadmins using getpwnam and getgrnam functions. The group seems to work because it finds gid=3000032 which is the gid of AD group opsifileadmins, but user does not because it still has uid=-1.

Despite the error, the package is still added to the depot, and the depot ini file is updated accordingly. However, it is annoying to have this every time I edit and update a package. Does anyone have any ideas on this?

Regards,

Stephen Jones
Antworten