Bug 35350 - noObject: search in not existing container
noObject: search in not existing container
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-14 09:27 CEST by Florian Best
Modified: 2015-01-08 14:00 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-07-14 09:27:24 CEST
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
Comment 1 Florian Best univentionstaff 2014-07-14 09:29:45 CEST
(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
Comment 2 Florian Best univentionstaff 2014-12-04 17:13:53 CET
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.
Comment 3 Florian Best univentionstaff 2014-12-18 15:10:31 CET
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
Comment 4 Dirk Wiesenthal univentionstaff 2015-01-07 02:43:24 CET
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"
Comment 5 Florian Best univentionstaff 2015-01-07 11:28:36 CET
(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.
Comment 6 Dirk Wiesenthal univentionstaff 2015-01-08 01:30:57 CET
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.
Comment 7 Janek Walkenhorst univentionstaff 2015-01-08 14:00:26 CET
http://errata.univention.de/ucs/4.0/18.html