Skip to content

Allow nodetool cms reconfigure to ignore specific hosts - #5084

Open
nvharikrishna wants to merge 1 commit into
apache:trunkfrom
nvharikrishna:21627-cms-reconfigure-ignore-trunk
Open

Allow nodetool cms reconfigure to ignore specific hosts#5084
nvharikrishna wants to merge 1 commit into
apache:trunkfrom
nvharikrishna:21627-cms-reconfigure-ignore-trunk

Conversation

@nvharikrishna

Copy link
Copy Markdown
Contributor

Add a --ignore option to nodetool cms reconfigure. Hosts given to it are excluded from the new CMS, on top of any nodes that are already down.

This helps when shrinking a cluster. Today, decommissioning a CMS member hands that role to another node which may itself be due for decommission, so the CMS has to be reconfigured again and again. Excluding the departing nodes up front keeps CMS membership stable for the whole shrink, because decommissioning a node that is not a CMS member does not trigger a reconfiguration.

The ignore list applies to that one command only. It is not stored, so cms describe still reports whether the CMS matches the nodes currently in the cluster.

patch by nvharikrishna; reviewed by for CASSANDRA-21627

CASSANDRA-21627

Add a --ignore option to nodetool cms reconfigure. Hosts given to it are
excluded from the new CMS, on top of any nodes that are already down.

This helps when shrinking a cluster. Today, decommissioning a CMS member
hands that role to another node which may itself be due for decommission,
so the CMS has to be reconfigured again and again. Excluding the departing
nodes up front keeps CMS membership stable for the whole shrink, because
decommissioning a node that is not a CMS member does not trigger a
reconfiguration.

The ignore list applies to that one command only. It is not stored, so
cms describe still reports whether the CMS matches the nodes currently in
the cluster.

patch by nvharikrishna; reviewed by  <Reviewers> for CASSANDRA-21627
description = "Hosts to exclude from the new CMS, in addition to any which are currently down. Useful " +
"before shrinking a cluster: excluding the nodes which are about to be decommissioned " +
"keeps the CMS membership stable, avoiding a reconfiguration per decommissioned member.")
private List<String> ignoredEndpoints = new ArrayList<>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be (maybe) cool if this was accepting CIDR / whole subnets. This would basically ignore whole set of nodes instead of enumerating them one by one.

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.

2 participants