Fix ldap-init race on first-run setup #266

Merged
raucao merged 1 commits from raucao/ldap-init-race AGit into master 2026-11-09 16:19:28 +00:00
1 Commits
Author SHA1 Message Date
raucao 382900521b Fix ldap-init race on first-run setup
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Failing after 3s
The 389ds image healthcheck (dscontainer -H) only validates the LDAPI
socket. On an empty volume, instance setup runs a temporary slapd that
exposes LDAPI but not TCP 3389, so Docker marked the ldap service
healthy too early. That let ldap-init start before the real slapd was
listening, failing with "Can't contact LDAP server - 107 - Socket not
connected".

Override the healthcheck to probe the real TCP listener and bind as
cn=Directory Manager with the configured password, and add a bounded
wait loop to ldap-init so it retries until the server is reachable.
2026-11-09 20:12:18 +04:00