Bug 34293 - univention-ldapsearch: Try again when the LDAP server is not reachable
univention-ldapsearch: Try again when the LDAP server is not reachable
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-1-errata
Assigned To: Stefan Gohmann
Janek Walkenhorst
:
Depends on: 34292
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-10 09:24 CET by Stefan Gohmann
Modified: 2015-02-26 15:00 CET (History)
1 user (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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-03-10 09:24:07 CET
The same for univention-ldapsearch.

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

Since UCS 3.2 the LDAP server is restarted in more and more cases. For example during the schema registration. This leads to a lot of "Can't contact LDAP server" messages and sometimes to aborts for example during the join.

With Bug #32617 we switched to LDAPReconnectObject which reconnects to the LDAP server if a connection is lost.

We should try to connect to the server again in a defined interval when the server is not reachable.

In this bug we should not try to iterate among the different LDAP servers.

UCR variables suggestion:
 ldap/client/retry=(true|false)
 ldap/client/retry/number=<number of retries>
 ldap/client/retry/wait=<seconds waiting before next retry>

Defaults:
 ldap/client/retry=true
 ldap/client/retry/count=5
 ldap/client/retry/count=1
Comment 1 Stefan Gohmann univentionstaff 2014-03-14 07:30:52 CET
This was a little bit more difficult than I thought. univention-ldapsearch uses ldapsearch and the ldapsearch return code does not differ between the different error situations.

Now the stderr is duplicated to a temporary file and the output is parsed. Not very nice but I don't see a better solution.

VCR variable name is ldap/client/retry/count and the default value is 10.

The UCR variable description is part of univention-base-files. See Bug #34292 for more details.

Code: r48490, r48521
YAML: r48540
UCS Test: r48487, r48489, r48507
Comment 2 Janek Walkenhorst univentionstaff 2014-03-14 14:35:33 CET
univention-ldapsearch still works when slapd runs only intermittently.
ldap/client/retry/count works as advertised.
Advisory: OK
Comment 3 Moritz Muehlenhoff univentionstaff 2014-03-17 13:00:37 CET
http://errata.univention.de/ucs/3.2/70.html