Repository navigation
Retry docker compose up for ZooKeeper in integration tests - #99525
Merged
Algunenano merged 1 commit intoMar 15, 2026
Merged
Conversation
The `docker compose up -d` calls for ZooKeeper and Keeper containers had no retry logic, unlike image pulls which already use `retry()`. When Docker-in-Docker's network subsystem isn't fully initialized, the transient "network ... not found" error immediately fails all tests in the shard. Wrap both ZooKeeper compose-up calls (regular and secure) with the same `retry()` decorator, using 3 retries with 3s base delay. Seen in ClickHouse#98230: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98230&sha=3a1a2a77d4ecaffb47629f3d75243946e1c36100&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%201%2F5%29 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [7748565] Summary: ✅ AI ReviewSummaryThis PR adds retry logic around Missing context
ClickHouse Rules
Final Verdict
|
pull Bot
pushed a commit
to AnotherGenZ/ClickHouse
that referenced
this pull request
Sep 26, 2026
The `docker compose up -d --no-recreate` that brings up every ClickHouse node of a module had no retry, unlike the ZooKeeper/Keeper compose ups in the same function, so a transient Docker failure on a single container took down every test of the module. Seen on https://github.com/ClickHouse/ClickHouse/actions/runs/36126873809/job/108048678812 (Integration tests (amd_tsan, 3/6) on ClickHouse#122210, report https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=122210&sha=317cd284cb24361af84aa3a2cc1f3ad6e3865d2e&name_0=BackportPR&name_1=Integration%20tests%20%28amd_tsan%2C%203%2F6%29): one of nine node containers failed container init with failed to set IPv6 gateway while updating gateway: route for the gateway 2001:3984:3989::1 could not be found: network is unreachable while the other eight nodes started on the same bridge in the same second, and the three Keeper containers had been running on it for about 6 s. `docker compose` returned 1, the module-scoped fixture died, and all 13 tests of `test_dns_cache` were reported as errors. The in-job rerun cannot help: it only re-runs failed cases when there are fewer than 10 of them. `up -d --no-recreate` leaves the already-running containers alone and starts the one left in `created` state, which then re-acquires the static address the daemon had released, so a retry recovers this state. Retry parameters and the log function match the ZooKeeper/Keeper compose ups in the same function, added for the same reason in ClickHouse#99525. A deterministic startup failure still fails, with its original message and exit code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
valerypetrov
pushed a commit
to valerypetrov/ClickHouse
that referenced
this pull request
Oct 13, 2026
`ClickHouseCluster.start` ran the MongoDB and MinIO `docker compose up`
once, so a transient per-container daemon error lost the whole module.
On 26.7 the MongoDB up failed with
failed to create endpoint roottesttablefunctionmongodb-gw0-mongo1-1 on
network roottesttablefunctionmongodb-gw0_default: failed to add the host
(veth2d10e1f) <=> sandbox (veth2d10e1f) pair interfaces: file exists
and all 16 tests of `test_table_function_mongodb` failed:
https://github.com/ClickHouse/ClickHouse/actions/runs/38284747320/job/114936343879
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=26.7&sha=bc135b699eafe550939f3eb17885f541f5dfa226&name_0=ReleaseBranchCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%205%2F8%29
CI's docker-ce 27.0.3 draws the host-side and the container-side veth
names independently and never compares them, so with probability 2^-28
per endpoint both ends get the same name and the pair cannot be created.
The same error hit the MinIO up on
ClickHouse#119134
(https://github.com/ClickHouse/ClickHouse/actions/runs/36144124883/job/108126010556),
and an OOM-killed container init failed it on master
(https://github.com/ClickHouse/ClickHouse/actions/runs/33353696579/job/99381397549).
`up -d` converges: running containers are left alone and the container
left in `created` state is started, so another attempt recovers. Add a
`compose_up` helper with the retry the ZooKeeper/Keeper and ClickHouse
node ups already use (ClickHouse#99525, ClickHouse#122343), and route those three sites and
the MongoDB and MinIO ups through it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Wrap
docker compose up -dfor ZooKeeper/Keeper containers in integration tests with the existingretry()decorator (3 retries, 3s base delay).Currently, a transient Docker-in-Docker networking race — where the daemon reports ready via
docker infobut the network subsystem hasn't fully initialized — causesnetwork ... not founderrors that immediately fail all tests in the shard with no recovery. Image pulls already have retry logic (line 3396 ofcluster.py), but compose-up did not.Seen in #98230: [Integration tests (amd_binary, 1/5)](https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98230&sha=3a1a2a77d4ecaffb47629f3d75243946e1c36100&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%201%2F5%29
#98230) — all 29 tests failed identically with
Error response from daemon: network roottestdistributedinterserversecret-gw1_default not found.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
Version info
26.3.1.683