Univention Bugzilla – Bug 35350
noObject: search in not existing container
Last modified: 2015-01-08 14:00:26 CET
We received the following traceback. No information present to make it reproducible (Bug #35145). Traceback: File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 491, in _thread result = module.search( request.options.get( 'container' ), request.options[ 'objectProperty' ], request.options[ 'objectPropertyValue' ], superordinate, scope = request.options.get( 'scope', 'sub' ), hidden=request.options.get('hidden') ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 155, in wrapper_func ret = func( *args, **kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 450, in search raise UDM_Error( get_exception_msg( e ) ) UDM_Error: Das Objekt existiert nicht. No such object
(In reply to Florian Best from comment #0) > We received the following traceback. No information present to make it > reproducible (Bug #35145). → err, Bug #32979
This happens while searching in a container which does not exists. umc-command -U Administrator -P univention udm/query -f computers/computer -e -o '{"container":"cn=asdf,dc=system,dc=setup","objectType":"computers/computer","objectProperty":"None","objectPropertyValue":"","hidden":False}' A user friendly message that the container does not exists should be displayed.
This was now very easy to fix. If the superordinate or the container where the search was done in does not exists a proper error message is displayed. Fix: svn r56979 YAML: 2014-11-25-univention-management-console-module-udm.yaml
When creating a container cn=CC, deleting it in another tab and then selecting it in UDM navigation, I still get Die Ausführung des Kommandos udm/nav/object/query navigation ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 1024, in _thread for module, obj in list_objects(container, object_type=object_type): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 154, in _decorated return func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 139, in wrapper_func ret = func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 1153, in list_objects raise UDM_Error(e) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 1149, in list_objects result = ldap_connection.search(base=container, scope='one') File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 347, in search raise univention.admin.uexceptions.noObject(_err2str(msg), 'filter=%r' % (filter,)) UDM_Error: Das Objekt existiert nicht. No such object filter='(objectClass=*)' Not so sure if this is out-of-scope. But I find it hard to reproduce this error without UDM navigation. If I just use computers/computer I do not get the "container missing" message, but the "computer missing" message. Another point: Not sure which bugfix to blame but if I create a new DNS reverse lookup zone and then selecting it, the grid shows the result of the last search, not an empty list. But: No traceback anymore if I delete the superordinate (good!). Please add a "." at the end of the sentence "Das übergeordnete Objekt zoneName=3.200.10.in-addr.arpa,cn=dns,dc=dirk,dc=singlemaster,dc=intranet konnte nicht gefunden werden"
(In reply to Dirk Wiesenthal from comment #4) > When creating a container cn=CC, deleting it in another tab and then > selecting it in UDM navigation, I still get yes, for UDM navigation there are other methods used ;) > Die Ausführung des Kommandos udm/nav/object/query navigation ist > fehlgeschlagen: > > Traceback (most recent call last): > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__. > py", line 176, in _decorated > return function(self, request, *args, **kwargs) > File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run > tmp = self._function() > File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in > __call__ > return self._function( *tmp, **self._kwargs ) > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/ > __init__.py", line 1024, in _thread > for module, obj in list_objects(container, object_type=object_type): > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/ > udm_ldap.py", line 154, in _decorated > return func(*args, **kwargs) > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/ > udm_ldap.py", line 139, in wrapper_func > ret = func(*args, **kwargs) > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/ > udm_ldap.py", line 1153, in list_objects > raise UDM_Error(e) > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/ > udm_ldap.py", line 1149, in list_objects > result = ldap_connection.search(base=container, scope='one') > File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 347, > in search > raise univention.admin.uexceptions.noObject(_err2str(msg), 'filter=%r' % > (filter,)) > UDM_Error: Das Objekt existiert nicht. No such object > filter='(objectClass=*)' hehe^^ the traceback is cool ;) It shows the original traceback with the user firendly message from the seconds raised exception. > Not so sure if this is out-of-scope. But I find it hard to reproduce this > error without UDM navigation. If I just use computers/computer I do not get > the "container missing" message, but the "computer missing" message. Well, it's not the same problem but good to fix here! You can reproduce this in computers/computer if you have multiple default containers for computers! > Another point: Not sure which bugfix to blame but if I create a new DNS > reverse lookup zone and then selecting it, the grid shows the result of the > last search, not an empty list. But: No traceback anymore if I delete the > superordinate (good!). Please add a "." at the end of the sentence "Das > übergeordnete Objekt > zoneName=3.200.10.in-addr.arpa,cn=dns,dc=dirk,dc=singlemaster,dc=intranet > konnte nicht gefunden werden" This was Bug #34246. I fixed it nevertheless: query() did return null instead of [] which caused this. The missing dot has also been fixed.
OK, works as expected. The error message in udm/nav is a bit misleading ("search again" when clicking in the tree where "reload the tree" would be more appropriate) but I guess it is fine. (In reply to Florian Best from comment #5) > hehe^^ the traceback is cool ;) It shows the original traceback with the > user firendly message from the seconds raised exception. Sidenote: The traceback is just "good". For noObject, the filter is mostly irrelevant. container=%r would be cooler.
http://errata.univention.de/ucs/4.0/18.html