Bug 32861 - Adapt LDAP_Connection to not reconnect to LDAP server
Adapt LDAP_Connection to not reconnect to LDAP server
Status: RESOLVED INVALID
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.1
Other Linux
: P5 enhancement (vote)
: UCS 3.x
Assigned To: UMC maintainers
:
Depends on: 32617
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-14 15:54 CEST by Alexander Kläser
Modified: 2014-03-06 13:52 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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-10-14 15:54:55 CEST
The UDM UMC module has a Python function decorator that initially establishes an LDAP connection and intercepts LDAP errors in case the connection runs in a timeout. As through this decorator Python tracebacks may be obfuscated and as it would not make sense to implement the same functionality twice, we should be able to simplify the decorator thanks to Bug 32617.

+++ This bug was initially created as a clone of Bug #32617 +++

We should switch to ReconnectLDAPObject which does automatic reconnects. This should be done in uldap.py. The directory manager modules code should be checked as well.

http://www.python-ldap.org/doc/html/ldap.html#ldapobject-classes
Comment 1 Alexander Kläser univentionstaff 2013-12-20 19:21:34 CET
Hm… in tests that I made with ReconnectLDAPObject, it still would throw a SERVER_DOWN exception. Therefore, the LDAP_Connection wrapper should probably be left as it is.
Comment 2 Florian Best univentionstaff 2014-03-06 13:52:54 CET
(In reply to Alexander Kläser from comment #1)
> Hm… in tests that I made with ReconnectLDAPObject, it still would throw a
> SERVER_DOWN exception. Therefore, the LDAP_Connection wrapper should
> probably be left as it is.
SERVER_DOWN means server down. The connection is tried again on the next request if the first connection failed.