Univention Bugzilla – Bug 37668
LDAP inconsistency/UDM traceback if network object gets removed
Last modified: 2015-11-16 08:49:08 CET
This error is now handled in UDM so that this cannot happen in future anymore. But if there are existing broken systems they are still unable to use the UCS@school wizards. We should also handle this in UCS@school directly. Or provide something to clean up the ldap for dead references. (In reply to Dirk Wiesenthal from Bug #35099 comment #1) > Happens when (auto) assigning a network object to a computer and then > manually deleting this network. > > Seems that the DN is still present in the computer object and points to > nowhere, hence the error message. > > Could be handled in the school lib, should be handled in UDM +++ This bug was initially created as a clone of Bug #35099 +++ We received the following traceback on a UCS@school 3.2R2 UCS 3.2-2 errata121 (Borgfeld). We had similar tracebacks before due to missing objects/containers in the OU structure. Traceback: Die Ausführung des Kommandos schoolwizards/computers/query ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute func( request ) File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func return func( *args, **kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolwizards/__init__.py", line 118, in _decorated ret = func(self, request, *a, **kw) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolwizards/__init__.py", line 269, in get_computers return self._get_all(computer_class, school, request.options.get('filter'), ldap_user_read) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolwizards/__init__.py", line 246, in _get_all objs.extend(klass.get_all(lo, school.name, filter_str=filter_str, easy_filter=True)) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 652, in get_all obj = cls.from_udm_obj(udm_obj, school, lo) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/computer.py", line 258, in from_udm_obj obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 682, in from_udm_obj return klass.from_udm_obj(udm_obj, school, lo) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/computer.py", line 270, in from_udm_obj netmask = Network.get_netmask(network_dn, school, lo) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/network.py", line 108, in get_netmask network = cls.from_dn(dn, school, lo) File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 735, in from_dn udm_obj = udm_modules.lookup(cls._meta.udm_module, None, lo, filter=cls._meta.udm_filter, base=dn, scope='base', superordinate=superordinate)[0] File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/networks/network.py", line 332, in lookup for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit): File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 347, in search raise univention.admin.uexceptions.noObject, _err2str(msg) noObject: No such object
The noObject exception is now also handled in the function which tries to get the netmask of the network. If the network does not exists a empty value for the netmask is displayed in the module. Saving the object one time again will fix also the univentionNetworkLink reference. Fix: svn r57789
merged to UCS@school 3.2
OK: no broken references at computer objects with current errata OK: no traceback if module is opened and objects with broken references exist OK: debian changelog entry OK: XML changelog entry OK: package is built OK: code change OK: no manual change required
UCS@school 4.0 v2 has been released: http://docs.univention.de/release-notes-ucsschool-4.0v2-de.html If this error occurs again, please use "Clone This Bug".
Reported again, 3.2-6 errata373 (Borgfeld)