Repository navigation
Remove test_keeper_ipv4_fallback, which disables IPv6 for the whole integration job - #132156
Conversation
…ntegration job The module runs `sysctl -w net.ipv6.conf.all.disable_ipv6=1`, starts its cluster, and writes `=0` in `finally`. pytest runs as root in the integration job container, so this flips IPv6 in the job container's network namespace, where the nested dockerd's bridges and every pytest process live. Disabling IPv6 flushes every IPv6 address in that namespace. The restore brings back only what the kernel generates (`::1`, link-local addresses), not dockerd's static `fd00::1/8` on `docker0` (`fixed-cidr-v6: fd00::/8`), and it also enables IPv6 on the container's uplink, which Docker had disabled. For the rest of the job the namespace has no global IPv6 source address except the gateways of the compose bridges themselves. The gateway of a new compose network (`2001:3984:3989::1` for test_grpc_protocol) is added with duplicate address detection, so it is tentative for 1-2 s. A TCP connect to the container's IPv6 address issued in that window has to pick another source: before the toggle that is `fd00::1` and the connection completes as soon as DAD ends; after the toggle it is a link-local address of another interface (or `::1`), the container's reply to it cannot be delivered over the bridge, and the SYN is retransmitted from the same source until the 10 s `channel_ready_future` budget of `test_ipv6_select_one` runs out. Only the targeted check is affected: it moves test_grpc_protocol (a fixed-address module) to the sequential phase, after every parallel module, so the toggle always precedes it, and the release arm_binary server is ready within the DAD window. The regular shards run test_grpc_protocol before the keeper module. CIDB, 30 days, rows of test_ipv6_select_one: arm targeted, keeper module in the same job 3 FAIL / 14 OK arm targeted, keeper module not in the job 0 FAIL / 553 OK amd sanitizer targeted, keeper module in the job 0 FAIL / 50 OK regular arm shards (grpc runs before keeper) 0 FAIL / 7500 OK Reproduced in private network namespaces modelled on the job container: a 10 s connect started while the gateway is tentative completes in ~2 s with source `fd00::1` before the toggle (3/3) and times out with a `fe80::` source after it (3/3). The module does not test what it claims. `[::]` still binds with `disable_ipv6=1`, so NuRaft's IPv6 acceptor never fails and the IPv4 fallback in `KeeperServer::launchRaftServer` is never reached; that needs `socket(AF_INET6)` itself to fail, as with the `ipv6.disable=1` boot parameter, which a CI container cannot emulate (the author of ClickHouse#85901 said so, and its Bugfix validation failed on master). The Keeper containers get fresh network namespaces that do not inherit the toggle, and `keeper_ipv6_enabled.xml` is a user config of `node1`, which runs no Keeper. The module was kept sequential until 511c5a1 made it parallel. Drop its line from RAW_TEST_DURATIONS and from the durations sample, as in 95af852. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus an independent cold review of the same head (0 blocker, 0 major). Nothing to adjudicate. Session id: cron:clickhouse-review-slot-10:20261116-220400 |
|
cc @pamarcos, could you review this? It removes test_keeper_ipv4_fallback: its sysctl disable_ipv6=1/=0 toggle runs in the integration job container and drops dockerd's fd00::1/8 on docker0, so later IPv6 connects (test_grpc_protocol::test_ipv6_select_one in the arm targeted job) time out; the module never reached the IPv4 fallback it covers anyway. |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261116-215300 |
|
Workflow [PR], commit [2ff5dd8] Summary: ✅ AI ReviewSummaryRemoves Final VerdictStatus: ✅ Approve |
849afc7
Related: #85901
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
test_grpc_protocol/test.py::test_ipv6_select_onetimes out opening its gRPC channel over IPv6 (grpc.FutureTimeoutErrorafter 10 s) inIntegration tests (arm_binary, distributed plan, targeted): 1, 2, 3. In 30 days it failed in 3 of the 17 runs of that check that also rantest_keeper_ipv4_fallback, and in none of the 553 that did not.test_keeper_ipv4_fallbackrunssysctl -w net.ipv6.conf.all.disable_ipv6=1, then=0, as root in the job container, which is the network namespace of the nested dockerd and of pytest. Disabling IPv6 flushes every IPv6 address there, and the restore brings back only::1and link-local addresses, not dockerd'sfd00::1/8ondocker0. After that, a connect to a container's IPv6 address made while the gateway of a fresh compose network is still in duplicate address detection picks a link-local source of another interface, the reply cannot reach it, and the connect hangs past the 10 s budget. The targeted job runstest_grpc_protocolin the sequential phase, after the keeper module, and the release arm server is up within that window.The module also never reaches the IPv4 fallback it covers:
[::]still binds withdisable_ipv6=1(the fallback needssocket(AF_INET6)itself to fail, as with theipv6.disable=1boot parameter), and the Keeper containers get fresh namespaces that do not inherit the toggle. So I delete it with its two duration-table lines.Validation: in private network namespaces modelled on the job container, after the toggle
docker0has nofd00::1/8and a 10 s connect during DAD times out 3/3, versus OK in about 2 s 3/3 before it;[::]binds underdisable_ipv6=1. No reference to the module remains, the CI config still imports, and the style check passes.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/132156]
Version info
26.11.1.2863-master(included in26.11and later)