Univention Bugzilla – Bug 51669
KeyError: 'gidNumber' when trying to revert adding an object
Last modified: 2021-05-25 16:02:42 CEST
Created attachment 10428 [details] patch 14.07.20 03:11:11.577 ADMIN ( ERROR ) : Creating 'cn=g5z0yaizzv,cn=groups,dc=AutoTest091,dc=local' failed: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1284, in _create self._ldap_post_create() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 631, in _ldap_post_create self.__update_membership() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 752, in __update_membership self.__set_membership_attributes(group, members, newmembers) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 768, in __set_membership_attributes self.lo.modify(group, [('uniqueMember', members, newmembers)]) File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 894, in modify raise univention.admin.uexceptions.noObject(dn) noObject: cn=pz9scfg5no,cn=groups,dc=AutoTest091,dc=local 14.07.20 03:11:11.579 ADMIN ( ERROR ) : Post-create: remove() failed: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1295, in _create self.remove() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 877, in remove return self._remove(remove_childs) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1506, in _remove self._ldap_pre_remove() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 645, in _ldap_pre_remove self.gidNum = self.oldattr['gidNumber'][0] KeyError: 'gidNumber' When creating an object fails, UDM removes the object again. This causes the removal code not to be executed fully because it might depend on self.oldattr to be set which is not set when the objects doesn't exist at all. We should either set self.oldattr and everything else necessary for an object to be in a valid state or just get a new instance of the object. We can see such a traceback every day in our Jenkins Tests.
univention-directory-manager-modules (15.0.2-10) 2345eacbef66 | Bug #51669: fix removal of objects during errors in create OK: 2345eacbef66 FIXED: [5.0-0] f8fe5a8917 Bug #51669 udm: Add changelog doc/changelog/changelog-5.0-0.xml | 6 ++++++ 1 file changed, 6 insertions(+)
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".