Bug 37740 - empty ldapError tracebacks
empty ldapError tracebacks
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Florian Best
Alexander Kramer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-09 18:55 CET by Florian Best
Modified: 2016-02-15 13:18 CET (History)
5 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:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments
patch (3.50 KB, patch)
2015-02-09 18:55 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-02-09 18:55:23 CET
Created attachment 6656 [details]
patch

We received the following traceback twice (different UUIDs) from 4.0-0 errata66:

Die Ausführung des Kommandos udm/syntax/choices/info computers/computer ist fehlgeschlagen:
Die Ausführung des Kommandos udm/syntax/choices/info shares/share ist fehlgeschlagen:
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 919, in syntax_choices_info
    return info_syntax_choices(syntax)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1311, in info_syntax_choices
    size += len(module.search(filter=filter_s, simple=not syn.use_objects))
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 159, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in wrapper_func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 575, in search
    result = ldap_connection.searchDn(filter=unicode(lookup_filter), base=container, scope=scope, sizelimit=sizelimit)
  File "%PY2.7%/univention/admin/uldap.py", line 377, in searchDn
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError


Die Ausführung des Kommandos udm/query shares/share ist fehlgeschlagen:
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 537, in _thread
    result = module.search(container, objectProperty, objectPropertyValue, superordinate, scope=scope, hidden=hidden)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 159, 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 578, in search
    result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/shares/share.py", line 968, in lookup
    for dn in lo.searchDn(unicode(filter), base, scope, unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 377, in searchDn
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError

The code currently contains a Workaround from UCS 2.2 (which was python 2.4, I guess). → Bug #14827 / attachment 2839 [details]. The code does not work anymore with python 2.7 (msg can't be falsy, only msg.args could). Attached is a patch which fixes the displaying of that exception if the content is empty in a generic way.

The error is probably a side effect of errata 18.
As the string is empty we don't exactly know what exception was raised. But probably it is some Timeout. The attached patch also reverts that the function is called again if it fails to restore the original behavior from before errata 18.
Comment 1 Florian Best univentionstaff 2015-02-24 11:57:11 CET
Reported again, 4.0-1 errata84 (Walle): udm/syntax/choices/info computers/computer
Comment 2 Florian Best univentionstaff 2015-02-27 14:19:22 CET
Fixed, slightly adapted patch.
I hope this helps, if not it would at least give us more information next time.
Fix: svn r58517, r58518
No cross dependencies.
YAML: 2015-02-24-univention-directory-manager-modules.yaml
YAML: 2015-02-26-univention-management-console-module-udm.yaml
Comment 3 Florian Best univentionstaff 2015-03-10 16:52:35 CET
As discussed with Alex Kramer and Dirk I commented out the second fix (re-execution of the function) to wait until we exactly know which exception is raised.
svn r58832
Comment 4 Alexander Kramer univentionstaff 2015-03-11 09:05:02 CET
OK - debian changelog
OK - yaml (adapted little typo) r58849
OK - the traceback contains more information now
Comment 5 Moritz Muehlenhoff univentionstaff 2015-03-11 15:08:13 CET
http://errata.univention.de/ucs/4.0/102.html
Comment 6 Moritz Muehlenhoff univentionstaff 2015-03-11 15:09:28 CET
http://errata.univention.de/ucs/4.0/98.html
Comment 7 Florian Best univentionstaff 2016-02-15 13:18:55 CET
Reported again, 4.0-0 errata142 (Walle)