mirror of
https://github.com/rroemhild/docker-test-openldap.git
synced 2026-04-25 07:05:50 +03:00
[GH-ISSUE #54] Race condition exists in 050-openldap-populate #36
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-test-openldap#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcboudreau on GitHub (Jun 26, 2024).
Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/54
On occasion, some of our tests that use this Docker image fail due to a race condition that exists in the
/etc/cont-init.d/050-openldap-populatescript. This condition is somewhat rare, but it does contribute to failures in some of our most flaky tests.What's Going On
In the 050-openldap-populate script (referred to as SCRIPT from here on in), the LDAP server is started with the
slapd -h "ldapi:///" -u openldap -g openldapcommand and then the configure_msad_features function is invoked. That function contains an echo statement and then executes this command:ldapmodify -Y EXTERNAL -H ldapi:/// -f ${CONFIG_DIR}/msad.ldif -Q. On some occasions, where presumably the GitHub runners that we are using are overloaded, we can capture this output from the Docker container running this image:The logs suggest that the ldapmodify command began executing before the LDAP server was ready to accept connections. Furthermore, because the
eoption is set in this Bash script, the failure of the ldapmodify command causes an immediate exit of the script, which leaves the LDAP server running and causes the endless loop of restarts of the slapd service.