-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There should be a way to force a node to leave the cluster #544
Conversation
this is pretty critical for multi-node software. When i take a node down.. i get a dogpile in the logs of all the other servers of the form [2014/05/17 17:16:00 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)} |
This patch adds an endpoint as well as interfaces to RaftServer and ClusterConfiguration to make it possible to forcibly remove a node from the cluster. The way it works is similar to changing the connection string. An InfluxJoinCommand command is created applied to local node as well as other nodes in the cluster directly, then the command runs through raft to make sure the change is permanent.
I attached a patch to this issue that will add a way to forcibly remove a node from a cluster. This is a destructive action. Also, don't merge this in. I have to push a change to the influxdb-go client. |
lgtm |
There should be a way to force a node to leave the cluster
I had a similar example as in the thread (accidentally started a node with a seed list had it join a cluster), then stopped the node, removed the seed list, deleted the node with curl -XDELETE from the cluster, The cluster doesn't show the node and the node itself appears to list only itself as the server, however, upon startup, it still gets a bunch of:
from each of the nodes in the cluster. I've tried restarting the new node a couple of times, and it seems that the other nodes still try to connect to it, though it looks like it hasn't been added to the cluster, which is good. Seems like there should not be any attempted connections from the old cluster once a node has been removed? |
There are a few cases when we need to force a node to leave the cluster, see this thread for an example. We need to find a way to force a node to leave the cluster in case there's no quorum.