Univention Bugzilla – Bug 51062
replication.py: IndexError while logging LDAP exceeption - 4.3-5
Last modified: 2020-04-08 17:36:17 CEST
+++ This bug was initially created as a clone of Bug #51061 +++ Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/replication.py", line 946, in handler except ldap.LDAPError as ex: log_ldap(ud.ERROR, 'Error', ex, dn=dn) File "/usr/lib/univention-directory-listener/system/replication.py", line 957, in log_ldap ud.debug(ud.LISTENER, severity, 'replication: %s%s: %s' % (ex[0]['desc'], '; dn="%s"' % (dn,) if dn else '', msg)) IndexError: tuple index out of range "ex" is an ldap.LDAPError with "ex.args == ()" The original exception thus is not logged. Even worse: neither the "write LDIF file and abort UDL"-case nor the "reconnect and re-try"-case is taken; thus "replication.handler()" returns with an exception and UDL continues with the next transaction as UDL has no extra code to handle "replication.py" errors as fatal itself. This happend on *multiple* slaves which are now all inconsistent with the Master! 1. Fix logging the exception: Should never throw an exception 2. Make replication.py abort UDL if anything goes wrong and is not handled explicitly. 3. Fix Bug #35707 to get a sane level of messages by default
[4.3-5] fd6153d412 Bug #51062 replication: Fix exception handling .../debian/changelog | 6 +++ .../replication.py | 46 ++++++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) Package: univention-directory-replication Version: 11.0.0-8A~4.3.0.202004050704 Branch: ucs_4.3-0 Scope: errata4.3-5 [4.3-5] 5f985114f3 Bug #51062: univention-directory-replication 11.0.0-8A~4.3.0.202004050704 doc/errata/staging/univention-directory-replication.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+)
Verified: * cherry-pick (git range-diff) * Package update * Advisory
<http://errata.software-univention.de/ucs/4.3/665.html>