Univention Bugzilla – Bug 34293
univention-ldapsearch: Try again when the LDAP server is not reachable
Last modified: 2015-02-26 15:00:41 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
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
univention-ldapsearch still works when slapd runs only intermittently. ldap/client/retry/count works as advertised. Advisory: OK
http://errata.univention.de/ucs/3.2/70.html