Use SHUTDOWN instead of CLUSTER RESET SOFT in del-node#14989
Use SHUTDOWN instead of CLUSTER RESET SOFT in del-node#14989fru1tworld wants to merge 6 commits intoredis:unstablefrom
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
1b59993 to
a1ee8bd
Compare
a1ee8bd to
0dda25c
Compare
Verify that del-node terminates the removed node's process (SHUTDOWN NOSAVE) instead of leaving it running as a standalone instance (CLUSTER RESET SOFT). See redis#14965.
|
i think |
|
Thanks for the feedback! I agree that shutting down the server on |
|
Could you share your preferred approach? I'm considering either an opt-in |
|
a option for |
|
Added |
|
@fru1tworld Hi, Thanks for the PR. I have a concern about the parameter name The name is potentially misleading to users, "cluster-shutdown" strongly implies shutting down the entire cluster, not just the a deleted node. This could cause confusion when users need to perform routine maintenance on a single node, fearing they might accidentally take down the whole cluster. I'd suggest considering a more precise name that makes the scope clear. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for the suggestion! Renamed |
|
Just a penny for your thoughts, would it be better that removes |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 0dd5281. Configure here.
|
Updated — the flag is now |

Problem
redis-cli --cluster del-nodesendsCLUSTER RESET SOFTto the deleted node, leaving it running as a standalone instance. Clients may still connect to this node and receive empty cluster information, causing confusion about whether the cluster exists.This differs from the original
redis-trib.rbbehavior which sentSHUTDOWN.Fix
Send
SHUTDOWN NOSAVEinstead ofCLUSTER RESET SOFTafter removing a node from the cluster. This ensures clients get a clear connection failure and retry with other cluster nodes.Fixes #14965
Note
Low Risk
Low risk because default
del-nodebehavior remainsCLUSTER RESET SOFT; the new shutdown behavior is opt-in via a flag. Main risk is operational (terminating a node) when users enable--cluster-shutdown-nosave-on-del.Overview
Adds an opt-in
redis-cli --cluster del-nodeflag,--cluster-shutdown-nosave-on-del, to shut down the removed node viaSHUTDOWN NOSAVEafter it is forgotten by the cluster.If
SHUTDOWNfails,del-nodefalls back to the existingCLUSTER RESET SOFTbehavior. New unit tests cover both the default (node remains alive but reset) and the flagged (node process terminates) flows.Reviewed by Cursor Bugbot for commit 341b11b. Bugbot is set up for automated code reviews on this repo. Configure here.