Univention Bugzilla – Bug 52449
container creation for ouadmins group fails
Last modified: 2021-02-10 09:28:26 CET
Not entirely sure why, but I guess Bug #52403 changed the school.libs behavior, and the "ouadmins" group is now created in the LDAPs root node, instead of "cn=admin,$ldap_base". This results in a traceback when creating OUs: -------------------------------------------------------- root@master203:~# /usr/share/ucs-school-import/scripts/create_ou SchuleA Create OU: SchuleA Creating School(name='SchuleA', dn='ou=SchuleA,dc=autotest203,dc=local') School(name='SchuleA', dn='ou=SchuleA,dc=autotest203,dc=local') successfully created Creating Container(name='networks', school='SchuleA', dn='cn=networks,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='policies', school='SchuleA', dn='cn=policies,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='users', school='SchuleA', dn='cn=users,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='schueler', school='SchuleA', dn='cn=schueler,cn=users,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=schueler,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='lehrer', school='SchuleA', dn='cn=lehrer,cn=users,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=lehrer,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='admins', school='SchuleA', dn='cn=admins,cn=users,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=admins,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='mitarbeiter', school='SchuleA', dn='cn=mitarbeiter,cn=users,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=mitarbeiter,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='lehrer und mitarbeiter', school='SchuleA', dn='cn=lehrer und mitarbeiter,cn=users,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=lehrer und mitarbeiter,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='shares', school='SchuleA', dn='cn=shares,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='klassen', school='SchuleA', dn='cn=klassen,cn=shares,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=klassen,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='printers', school='SchuleA', dn='cn=printers,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='groups', school='SchuleA', dn='cn=groups,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='schueler', school='SchuleA', dn='cn=schueler,cn=groups,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=schueler,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='klassen', school='SchuleA', dn='cn=klassen,cn=schueler,cn=groups,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=klassen,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='lehrer', school='SchuleA', dn='cn=lehrer,cn=groups,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=lehrer,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='raeume', school='SchuleA', dn='cn=raeume,cn=groups,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=raeume,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='mitarbeiter', school='SchuleA', dn='cn=mitarbeiter,cn=groups,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=mitarbeiter,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='dhcp', school='SchuleA', dn='cn=dhcp,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='computers', school='SchuleA', dn='cn=computers,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='server', school='SchuleA', dn='cn=server,cn=computers,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=server,ou=SchuleA,dc=autotest203,dc=local') Creating Container(name='dc', school='SchuleA', dn='cn=dc,cn=server,cn=computers,ou=SchuleA,dc=autotest203,dc=local', old_dn='cn=dc,ou=SchuleA,dc=autotest203,dc=local') Creating BasicGroup(name='OUschulea-DC-Edukativnetz', dn='cn=OUschulea-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') BasicGroup(name='OUschulea-DC-Edukativnetz', dn='cn=OUschulea-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') successfully created Creating BasicGroup(name='OUschulea-Member-Edukativnetz', dn='cn=OUschulea-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') BasicGroup(name='OUschulea-Member-Edukativnetz', dn='cn=OUschulea-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') successfully created Creating BasicGroup(name='OUschulea-DC-Verwaltungsnetz', dn='cn=OUschulea-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') BasicGroup(name='OUschulea-DC-Verwaltungsnetz', dn='cn=OUschulea-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') successfully created Creating BasicGroup(name='OUschulea-Member-Verwaltungsnetz', dn='cn=OUschulea-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') BasicGroup(name='OUschulea-Member-Verwaltungsnetz', dn='cn=OUschulea-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=autotest203,dc=local') successfully created Creating BasicSchoolGroup(name='admins-schulea', school='SchuleA', dn='cn=admins-schulea,cn=ouadmins,cn=groups,dc=autotest203,dc=local') Traceback (most recent call last): File "/usr/share/ucs-school-import/scripts/create_ou", line 167, in <module> main() File "/usr/share/ucs-school-import/scripts/create_ou", line 155, in main alter_dhcpd_base, File "/usr/lib/pymodules/python2.7/ucsschool/lib/create_ou.py", line 128, in create_ou res = new_school.create(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 502, in create success = self.create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 525, in create_without_hooks self.create_default_groups(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 232, in create_default_groups group.create(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 502, in create success = self.create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/group.py", line 209, in create_without_hooks return super(BasicGroup, self).create_without_hooks(lo, validate) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 532, in create_without_hooks self.do_create(udm_obj, lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 556, in do_create udm_obj.create() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 557, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1270, in _create six.reraise(exc[0], exc[1], exc[2]) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1254, in _create self.lo.add(self.dn, al, serverctrls=serverctrls, response=response) File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 865, in add raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg) univention.admin.uexceptions.ldapError: No such object -------------------------------------------------------- root@master203:~# univention-ldapsearch -LLL cn=ouadmins dn: cn=ouadmins,dc=autotest203,dc=local objectClass: top objectClass: organizationalRole objectClass: univentionObject univentionObjectType: container/cn cn: ouadmins
The code changes in branch "dtroeder/52449_ouadmins_container" explicitly create the container for the non-school grop 'ouadmins' before creating the group itself. The groups container creation code is not meant to be used with non-school groups. 8a9af6a16 Bug #52449: create container for non-school grop 'ouadmins' before creating group c646727e7 Bug #52449: add static type annotations A merge request has been created: https://git.knut.univention.de/univention/ucsschool/-/merge_requests/4
QA All OK Functional QA: removed cn=ouadmins and ran create_ou script Before File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 865, in add raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg) univention.admin.uexceptions.ldapError: No such object After → no error
Code was merged to '4.4', the Debian package built (ucs-school-lib 12.2.5) and an advisory created.
QA: Tests, which use create_ou don't fail any more → Verify
Errata updates for UCS@school 4.4 v8 have been released. https://docs.software-univention.de/changelog-ucsschool-4.4v8-de.html If this error occurs again, please clone this bug.