Skip to content

[BUG][CLI] del-node fails to delete unreachable nodes #3208

Description

@yang-z-o

Describe the bug

The valkey-cli --cluster del-node command reports a misleading [ERR] No such node ID when attempting to delete unreachable nodes, even though the node clearly exists in the cluster topology.

This is inconsistent with the instance-level CLUSTER FORGET command, which successfully removes unreachable nodes. The cluster-level wrapper should provide the same functionality.

To reproduce

  1. Create a cluster with an unreachable node:
91b0f394a6052a8302415097dd9eed909adc0edb 127.0.0.1:7000@17000 myself,master - 0 0 1 connected 0-16383
df0ffd8d6071ed896f3c440925abb6f729de244d 127.0.0.1:7002@17002 slave,fail
  1. Attempt to delete the failed node:
valkey-cli --cluster del-node 127.0.0.1:7000 df0ffd8d6071ed896f3c440925abb6f729de244d
  1. Observe the error:
Could not connect to Valkey at 127.0.0.1:7002: Connection refused
>>> Removing node df0ffd8d6071ed896f3c440925abb6f729de244d from cluster 127.0.0.1:7000
[ERR] No such node ID df0ffd8d6071ed896f3c440925abb6f729de244d

Expected behavior

The del-node command should successfully remove unreachable nodes from the cluster, similar to how instance-level CLUSTER FORGET works.

Workaround

Manually execute CLUSTER FORGET <node-id> on all nodes within the cluster-blacklist-ttl period.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions