Univention Bugzilla – Bug 27270
Über Import Skript auf dem Master angelegter Rechner führt zu Traceback im S4 Connector auf dem Slave
Last modified: 2012-06-11 06:30:13 CEST
Ich habe ein school Master nund einen Slave mit Samba4 (ou=s01). Auf dem Master wurde über import_computer ein Windows Host angelegt: windows WIN7PRO 52:52:00:f2:2a:6a s01 10.200.7.22 Daraufhin gab es auf dem Slave im Connector einen Traceback: 24.05.2012 08:49:25,571 LDAP (PROCESS): sync to ucs: Resync rejected dn: CN=win7pro,CN=computers,OU=s01,DC=ee,DC=rr 24.05.2012 08:49:25,578 LDAP (PROCESS): sync to ucs: [windowscomputer] [ modify] cn=win7pro,cn=computers,ou=s01,dc=ee,dc=rr 24.05.2012 08:49:25,630 LDAP (ERROR ): Unknown Exception during sync_to_ucs 24.05.2012 08:49:25,631 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/s4connector/__init__.py", line 1299, in sync_to_ucs result = self.modify_in_ucs(property_type, object, module, position) File "/usr/lib/pymodules/python2.6/univention/s4connector/__init__.py", line 1169, in modify_in_ucs return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 344, in modify return self._modify(modify_childs,ignore_license=ignore_license) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 866, in _modify self._ldap_post_modify() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/computers/windows.py", line 548, in _ldap_post_modify univention.admin.handlers.simpleComputer._ldap_post_modify( self ) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 1912, in _ldap_post_modify univention.admin.allocators.confirm( self.lo, self.position, 'mac', macAddress ) File "/usr/lib/pymodules/python2.6/univention/admin/allocators.py", line 166, in confirm univention.admin.locking.unlock(lo, position, type, value, _type2scope[type]) File "/usr/lib/pymodules/python2.6/univention/admin/locking.py", line 122, in unlock lo.delete(dn, exceptions=1) File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 414, in delete raise univention.admin.uexceptions.permissionDenied permissionDenied -> univention-s4connector-list-rejected UCS rejected S4 rejected 1: S4 DN: CN=win7pro,CN=computers,OU=s01,DC=ee,DC=rr UCS DN: cn=win7pro,cn=computers,ou=s01,dc=ee,dc=rr last synced USN: 3831 Wenn ich einen Rechner ohne MAC anlege, funktioniert es. In der Funktion _ldap_post_modify in der Klasse simpleComputer wird folgendes gemacht, das sieht nicht korrekt aus. if self[ 'mac' ]: for macAddress in self[ 'mac' ]: if macAddress: univention.admin.allocators.confirm( self.lo, self.position, 'mac', macAddress )
folgende Änderung in modules/univention/admin/handlers/__init__.py: * ähnlich wir für die IP Adresse wird nun auch bei der Mac Adresse vor dem univention.admin.allocators.confirm ob diese wirklich geändert wurde -> in einer Samba4 Umgebung sollten die auf dem Master angelegten Rechner in einer OU auf dessen Samba4 Slave vom Connector ordentlich synchronisiert werden * univention.admin.allocators.confirm auf ip und mac wird nun in _ldap_post_create und _ldap_post_modify() aufgerufen -> die temp. Objekte wurden bisher nur bei der Modifikation gelöscht, nun auch beim Anlegen * für mac und ip wird nun ein univention.admin.allocators.release aufgerufen, wenn der vorherige request() eine univention.admin.uexceptions.noLock exception geworfen hat -> die temp. Objekte werden nun auch gelöscht, wenn kein LOCK geholt werden konnte (es also schon einen Rechner mit dieser ip/mac gab)
OK, tritt nicht mehr auf. Locking funktioniert noch.
UCS@school 3.0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer neueren Version von UCS@school erneut auftreten, so sollte dieser Bug dupliziert werden: "Clone This Bug"