Repository navigation
MOD-18906 - Start the failover test's replicas on a protected cluster bus - #2196
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## MOD-18751-cluster-bus-port-protected-mode #2196 +/- ##
==========================================================================
Coverage 70.11% 70.11%
==========================================================================
Files 41 41
Lines 8622 8622
==========================================================================
Hits 6045 6045
Misses 2577 2577
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b7f49cb to
f6b9e82
Compare
|
Stacked on #2194 for CI signal: on Rebased onto For the record, the only other failure in the first run was |
53745bf to
075902a
Compare
|
Restacked onto #2195 (the already-pinned RLTest plus only the new option) instead of #2194, to judge this change on its own. The #2194 stack already showed the fix doing its job: the three That fires on the first On this base redis-py stays on 5.x, so |
… bus test_topology_events:test_failover spawns its own cluster-node replicas, rather than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does not reach them. Since redis/redis#15722 a cluster node whose bus port is not authenticated by tls-cluster refuses to start unless protection is waived, so those replicas died at startup and the test timed out after 2308s on every oss-cluster leg. Mirror the master's value of the option onto the replica we spawn. The config is absent on older redis, which reports an empty dict and gets nothing added, since passing an unknown config would be fatal there instead. Also bound the wait for the replica to serve. It was the one unbounded wait in the helper, so a replica that never started produced only a test timeout, with the cause nowhere in the output: a config redis rejects is reported before the logfile is opened, leaving an empty log. Co-Authored-By: Claude Opus 5 <[email protected]>
075902a to
5cc06b9
Compare
6dda6bf
into
MOD-18751-cluster-bus-port-protected-mode
|
…ack (#2194) * MOD-18751: waive cluster bus protected mode for the oss-cluster phase redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it defaults to enabled: a node started with cluster-enabled and without tls-cluster then refuses to start, because its cluster bus port would be unauthenticated. That is how the oss-cluster phase is built, so every shard dies at startup and each test fails at connect with "Connection refused". The refusal happens while the configuration is validated, before the server opens its logfile, so the retained logs are empty and say nothing about the cause. Waive it for that phase. The bus ports here are bound to localhost on an ephemeral host, which is the condition the directive documents for waiving, and they were equally unauthenticated before the redis change - which only made running them an explicit choice. The option is not passed blind, because a redis that does not have it rejects the directive and fails to start the same way. RLTest takes it as an option rather than guessing, since nothing it can see distinguishes a build that has the option from one that does not: the 8.12 line reports 8.9.241 in version.h, the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it for anyone running the cluster phase against an older redis locally. The tls_cluster phase is left alone, since tls-cluster authenticates the bus, and so is the existing-env phase, where RLTest starts no servers. Requires RLTest with the option (RedisLabsModules/RLTest#255). * Keep the waiver inside the oss-cluster phase Setting it on RLTEST_ARGS in the OSS_CLUSTER block leaks into the tls_cluster block below, which is a separate if and inherits the parent shell's value - the tls_cluster phase was getting the option too, which this change had claimed it would not. Set it inside each oss-cluster invocation's own subshell instead, as the other phases do. Found by dry-running tests.sh with NOP=1 and reading the generated RLTest configuration per phase. Verified after: one occurrence, in "tests on OSS cluster" only; the general, slaves, AOF and tls_cluster phases carry none. Note the pre-existing duplicate --cluster_node_timeout in the tls_cluster configuration, which comes from the same leak and is left alone here. * Trigger CI * MOD-18906 - Start the failover test's replicas on a protected cluster bus (#2196) test_topology_events:test_failover spawns its own cluster-node replicas, rather than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does not reach them. Since redis/redis#15722 a cluster node whose bus port is not authenticated by tls-cluster refuses to start unless protection is waived, so those replicas died at startup and the test timed out after 2308s on every oss-cluster leg. Mirror the master's value of the option onto the replica we spawn. The config is absent on older redis, which reports an empty dict and gets nothing added, since passing an unknown config would be fatal there instead. Also bound the wait for the replica to serve. It was the one unbounded wait in the helper, so a replica that never started produced only a test timeout, with the cause nowhere in the output: a config redis rejects is reported before the logfile is opened, leaving an empty log. Co-authored-by: Claude Opus 5 <[email protected]> * MOD-18913 - Cap redis-py below 6 so the suite stays on RESP2 RLTest's own requirement on the client is uncapped (redis = ">=5.0.0"), where the commit this repo was pinned to until now capped it at "^5.0.0rc2". Moving the pin therefore let pip install redis-py 8.1.0, which negotiates RESP3 by default, and under RESP3 TS.MRANGE ... GROUPBY replies with a map rather than rows: ((filtered_by, withlabels, samples),) = result ValueError: too many values to unpack (expected 3) Pin the client to the 5.x series, which is what the old RLTest pin was silently giving us, so the pin bump does not carry a protocol change with it. Supporting RESP3 in the assertions is the real fix and stays with MOD-18913. * Restore the MOD-18906 replica fix It was reverted by accident in the previous commit, which picked up a stale staged copy of the file alongside the requirements change. * MOD-18913: absorb the RLTest upgrade - unescape moduleArgs semicolons (#2197) * MOD-18913 - Pin the RLTest fix for escaped semicolons in moduleArgs The plain-string branch of fix_modulesArgs reuses the raw input instead of the unescaped split, so an escaped semicolon reaches the module with its backslash. test_globalconfigs passes COMPACTION_POLICY that way, the module then fails to load, the server never starts, and the test reports only Connection refused against the Env it just built - on gen, slaves, aof and aof_slaves. Fixed upstream in RLTest#256; pinned to that commit until it merges. Co-Authored-By: Claude Opus 5 <[email protected]> * Trigger CI * Point the pin at upstream RLTest now that the fix has merged RedisLabsModules/RLTest#256 merged as 7e9f69ac1, so the escaped-semicolon fix is available upstream and the pin no longer has to reference a fork. Same code either way - 8dc964e was that PR's head - so this changes nothing in CI, it just stops the branch from merging with a personal fork as a dependency. * Spell the RLTest pin as a full SHA An abbreviated SHA only resolves while the commit stays reachable from the default branch, because a git fetch of a specific object needs the full hash and an abbreviation is resolved after the clone. It works today - CI on the previous commit passed - but it is a needless dependency on that reachability, and the pin this replaced was a full SHA. Same commit either way. Raised by Cursor Bugbot on 965b2db. --------- Co-authored-by: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>



MOD-18906
Problem
test_topology_events:test_failovertimes out on everyoss-clusterleg, and is the only test failing there (506 run, 505 passed). The phase burns 2308s before RLTest gives up. It survives both changes made for MOD-18751 — it fails identically on the old RLTest pin and with the cluster-bus waiver in place — and it passed on the 2026-09-14 nightly, before redis/redis#15722 merged.The reason the waiver does not help:
added_slaves_to_clusterspawns its replicas itself with a hand-builtsubprocess.Popenarg list, because RLTest'suseSlavesstarts replicas withcluster-enabled noso they never join the cluster. RLTest's newclusterBusPortProtectedModeoption only reaches the nodes RLTest starts, not these.Since redis/redis#15722 a cluster node whose bus port is not authenticated by
tls-clusterrefuses to start unless protection is waived (config.c, default1). Those replicas therefore die at startup. The test skips whenenv.useTLS, so no leg is protected by TLS instead.The failure then reads as a bare timeout because the wait for the replica to serve was the one unbounded wait in the helper — every later wait has a timeout. And a config redis rejects is reported before the logfile is opened, so the replica's log is 0 bytes and the cause appears nowhere in the run output.
Change
cluster-bus-port-protected-modeonto the spawned replica. On older redis the config does not exist,CONFIG GETreturns an empty dict, and nothing is added — passing an unknown config there would be fatal in its own right.get_timeout().Verification
Checked locally against
redis/unstableat09577d6, using the exact arg list this helper builds:exit=1, 0-byte logfile,*** FATAL CONFIG FILE ERROR ***PONG,cluster_enabled:1, waiver warning in the logCONFIG GETprobe on redis 7.2.6{}, so nothing is added on older redisThe suite itself still has to run in CI: reproducing it locally needs the module built against a redis carrying #15722, which is what the
oss-clusterlegs here will exercise.🤖 Generated with Claude Code
Note
Low Risk
Test-only helper changes in
tests/flow/utils.py; no production or runtime module code is affected.Overview
Fixes oss-cluster
test_failovertimeouts by updatingadded_slaves_to_clusterso hand-spawned cluster replicas start on newer Redis builds.Spawned replica argv now copies the master’s
cluster-bus-port-protected-modewhenCONFIG GETreturns it (empty on older Redis, so nothing is added). Without this, post–redis#15722 nodes refuse to start when the cluster bus isn’t TLS-protected, and the test hung on an unboundedPINGwait.The startup loop is bounded: it raises immediately if the replica process exits (exit code + log path) or after
get_timeout()if the node never answers.Reviewed by Cursor Bugbot for commit 5cc06b9. Bugbot is set up for automated code reviews on this repo. Configure here.