Univention Bugzilla – Bug 37631
univention-ldapsearch stops retries before reaching the 'ldap/client/retry/count'
Last modified: 2015-03-11 17:28:38 CET
For all details see Bug #37299
The 10_ldap/26reconnect_univention_ldapsearch test sometimes fails in Amazon EC2 (http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/125/SambaVersion=s3,Systemrolle=master/testReport/junit/10_ldap/26reconnect_univention_ldapsearch/test/).
Reason is that 'univention-ldapsearch' often stops the retries after only 1 attempt, i.e. not reaching the 'ldap/client/retry/count' (UCR).
Created attachment 6638 [details]
Proposed patch univention-ldapsearch
Simply sleep before grepp'ing, not after.
(In reply to Dmitry Galkin from comment #1)
> Simply sleep before grepp'ing, not after.
> + sleep 1
That's wrong, as $ret now contains the exit status of the most-successfully run "sleep" instead of the "ldap-search".
But moving the "sleep" shows the underlying problem: If the "tee" is too slow, the expected error message is not yet written into the file, so the following "grep" does not see the error message and aborts the loop.
FYI: Re-try mechanism was implemented with original Bug 34293: r48490 r48521
r58481 | Bug #37631 UCR: Update copyright 2015
r58480 | Bug #37631 UCR: Fix univention-ldapsearch race condition
Run one "tee" per loop and wait for its termination.
r58482 | Bug #37631 UCR: Fix univention-ldapsearch race condition YAML
OK: reproduceable with modified tee (see r58480 message)
OK: not reproduceable with fixed version
OK: No sideeffects could be found in own testing and in jenkins tests