Repository navigation
Wait for the background join to end before looking for the root password it leaves - #1193
Merged
vharseko merged 1 commit intoOct 14, 2026
Conversation
…ord it leaves The pre-roles srs phase (OpenIdentityPlatform#1184) recreates dj-1 on a volume that reports itself healthy at once, and the password check right after it found the join's /dev/shm password file while join.sh was still in joined(). Wait until no bootstrap script runs in the container before checking.
maximthomas
reviewed
Oct 14, 2026
maximthomas
left a comment
Contributor
There was a problem hiding this comment.
praise: The wait sits on exactly the check that went red, and it cannot hang the job.
bootstrap_endedgreps/proc/[0-9]*/cmdlineforbootstrap/[j]oin\.shandbootstrap/[r]eplicate\.sh; the brackets keep thesh -crunning the grep from matching itself (.github/scripts/docker-test-replication.sh:183).wait_until 300 ... bootstrap_ended $cis bounded, so a join that never ends still fails the test by timeout (.github/scripts/docker-test-replication.sh:782).
maximthomas
self-requested a review
October 14, 2026 07:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since #1184,
build-dockerandbuild-docker-alpinefail every time, on master too (run 38390334148) and on every PR (e.g. #1190, run 38382364790):The phase "pre-roles srs volume" (
.github/scripts/docker-test-replication.sh) recreates dj-1 on its kept volume, which has neither.initialize-pendingnor.rejoin-pending. Sorun.shwrites the health marker at once and startsjoin.shin the background. The test waits for "already a member of the replication topology" and forhealthy, which both hold at once, and runs the password check straight away. At that pointjoin.shis still injoined()(cleanup_departed,publish_state,repair_replication_servers) and keeps its password file in/dev/shm. Its EXIT trap removes the file only when it ends. The dj-1 log in CI does not even show "the health check may probe it" yet.The image itself is fine: the file goes away when the join ends. The test checks too early. It slipped through because only the role phases, not the whole script, ran locally in round 4 of #1184.
Fix
bootstrap_ended <container>: true once nobootstrap/join.shorbootstrap/replicate.shprocess is left in the container. It looks for them in/proc/*/cmdline; the bracket in[j]oinkeeps the pattern from matching thesh -cthat greps for it.Testing
bash -npasses.bootstrap/join.sh/bootstrap/replicate.sh(sleep 8) inubuntu:24.04,alpine:3.20and the OpenDJ image: "running" while the script runs, "ended" after it. The image's PID 1 is/opt/opendj/run.sh, which does not match.build-dockerjobs of this PR are the check.