Repository navigation
Fix flaky Run server init.d install check on 25.8 (backport of #106056) - #108987
Merged
Merged
Conversation
The `initd_test` script in `ci/jobs/install_check.py` on `25.8` runs `clickhouse-client -q 'SELECT version()'` exactly once, immediately after the init.d wrapper prints `Server started`. The wrapper only checks that the pid file exists, but on a slow CI host (notably the `amd_debug` build) the server can take several seconds longer to open the TCP listener on port 9000. The test then fails with `Code: 210. DB::NetException: Connection refused (localhost:9000)`. In the same job the sibling `binary_test` already retries `SELECT version()` in a loop, and on `25.8` backport runs it routinely takes ~4 seconds (4 retries) before the debug server accepts connections, while `initd_test` gives up after the first attempt. This is the same failure mode as #86278, which was fixed on `master` by #106056 ("Extend `Run server init.d` retry budget from 5s to 30s"). That fix never reached `25.8`, so the flake keeps blocking `25.8` backport PRs (for example #108965 and #108917). Because the `25.8` `initd_test` predates the retry loop entirely, #106056 does not cherry-pick cleanly; this commit adapts the same fix by adding a 30-iteration poll loop that breaks early on success, matching the existing `binary_test` and `keeper_test` patterns. `SYSTEMCTL_SKIP_REDIRECT` is intentionally not added, since the `25.8` init.d script does not support it. Related: #86278, #106056 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
|
Workflow [BackportPR], commit [12ebc55] |
Merged
1 task
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.
The
Run server init.dtest in theInstall packagesjob flakes on the25.8release branch: the server reportsServer startedvia the init.d wrapper, butclickhouse-client -q 'SELECT version()'then fails withCode: 210. DB::NetException: Connection refused (localhost:9000).The
initd_testscript inci/jobs/install_check.pyon25.8runsSELECT version()exactly once, immediately after the wrapper printsServer started. The wrapper only checks that the pid file exists, but on a slow CI host (notably theamd_debugbuild) the server takes several more seconds to open the TCP listener. In the very same job the siblingbinary_testalready retriesSELECT version()and, on25.8backport runs, routinely needs ~4 seconds before the debug server accepts connections — whileinitd_testgives up after the first attempt.This is the same failure mode as #86278, fixed on
masterby #106056 ("ExtendRun server init.dretry budget from 5s to 30s"). That fix never reached25.8, so the flake keeps blocking25.8backport PRs (for example #108965 and #108917). Because the25.8initd_testpredates the retry loop entirely, #106056 does not cherry-pick cleanly; this PR adapts the same fix by adding a 30-iteration poll loop that breaks early on success, matching the existingbinary_testandkeeper_testpatterns.SYSTEMCTL_SKIP_REDIRECTis intentionally not added, since the25.8init.d script does not support it.Related issue: #86278
Backport of: #106056
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
🤖 Generated with Claude Code