Skip to content

Waive cluster bus port protection for servers that support it - #572

Open
Itzikvaknin wants to merge 1 commit into
redis-performance:masterfrom
Itzikvaknin:fix/cluster-bus-port-protected-mode
Open

Itzikvaknin wants to merge 1 commit into
redis-performance:masterfrom
Itzikvaknin:fix/cluster-bus-port-protected-mode

Conversation

@Itzikvaknin

@Itzikvaknin Itzikvaknin commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Since redis/redis#15722, Redis refuses to start a cluster node with tls-cluster off unless cluster-bus-port-protected-mode is explicitly no. redisbench-admin never sets tls-cluster, so every remote oss-cluster run against a recent Redis dies at startup. The only symptom is a ping timeout ("No Redis connections available"), because the fatal error goes to stdout and the logfile stays empty.

This adds the waiver to the remote cluster node arguments, only for servers that know the config (as redis/redis-benchmarks-specification#570 does). Servers older than the config abort on it as an unknown directive.

  • The remote spin-up greps the binary the DB host will run (preinstalled or the --redis-server-binary copy) for the config name.
  • The waiver goes ahead of the benchmark's configuration-parameters. redis-server keeps the last value of a repeated option, so an explicit cluster-bus-port-protected-mode still wins.
  • Local run-local clusters are unchanged.

Testing

  • Redis 559d143b: a cluster node without the waiver fails with FATAL CONFIG FILE ERROR; with it, the node starts. Repeating the option keeps the last value.
  • An older Redis (5037e19c) aborts on the waiver with Unresolved Configuration(s) Detected.
  • The probe command exits 0 on the 559d143b binary, 1 on the older one, and 2 when the binary is missing.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🤖 Automated first-pass review. A human maintainer still needs to review this before merge.

This is a well-scoped fix, and the description explains the failure well, especially the point that the fatal error goes to stdout and leaves an empty logfile. I checked that the waiver is added before the configuration_parameters loop in generate_cluster_redis_server_args, so a benchmark that sets cluster-bus-port-protected-mode explicitly still wins. I also checked that the new kwarg defaults to False, which leaves the local spin_up_local_redis_cluster call site unchanged. Points below, most important first:

  1. No tests. CONTRIBUTING.md asks for new behaviour to be covered. Codecov hasn't blocked merges here in practice, but this one is cheap to cover. tests/test_cluster.py already calls generate_cluster_redis_server_args directly for the redis_7 directive. Two more cases would cover it: one with waive_cluster_bus_port_protection=True, and one with the flag on plus configuration_parameters={"cluster-bus-port-protected-mode": "yes"}, asserting that the explicit value comes after the waiver. The second case pins down the "explicit value still wins" ordering, which is easy to break in a later refactor. The probe-to-arg wiring in run/cluster.py could be covered by mocking execute_remote_commands to return exit status 0 and then 1.

  2. Local run-local clusters. The description says local clusters are deliberately unchanged, but doesn't say why. If someone runs run-local oss-cluster against a recent Redis, I think spin_up_local_redis_cluster hits the same FATAL CONFIG FILE ERROR. Was leaving it out a scoping choice, or does local not hit it? Either answer is fine, but one sentence in the PR would help whoever runs into it later.

  3. The probe is a heuristic. Not a blocker. Grepping the binary for the config name works for the two commits you tested. It's worth a code comment saying that a match only means the string is present in the binary, not that the config is recognised. Also, on a probe failure (exit 2, binary not found), the run quietly falls back to no waiver. The per-shard command line already gets logged, so you can tell from the logs whether the flag was passed. A short logging.info/warning when the probe returns something other than 0 or 1 would still make an SSH or path problem easier to tell apart from an old server.

Nothing above changes the approach. This looks like the right fix, and with a test or two I'd be happy to see it land. I'd leave this as a comment rather than approve or request changes.

@Itzikvaknin
Itzikvaknin force-pushed the fix/cluster-bus-port-protected-mode branch from e9ea499 to 5ca46a9 Compare October 22, 2026 11:19
Redis now refuses to start a cluster node with tls-cluster disabled unless
cluster-bus-port-protected-mode is explicitly set to no. No benchmark sets
tls-cluster, so every remote oss-cluster run failed at startup with only a
ping timeout to show for it.

- Servers that predate the config abort on it as an unknown directive, so the
  remote spin-up greps the binary the DB host will run for the config name
  and only passes --cluster-bus-port-protected-mode no when it is there.
- The waiver goes ahead of configuration-parameters: redis-server keeps the
  last value of a repeated option, so a benchmark's explicit setting still wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant