Skip to content
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

Merged
merged 1 commit into from
May 29, 2014

Conversation

jvshahid
Copy link
Contributor

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.

@jvshahid jvshahid added this to the Next release milestone May 15, 2014
@kapilt
Copy link

kapilt commented May 17, 2014

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)}
[2014/05/17 17:16:00 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:00 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:00 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:01 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:01 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:01 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:01 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}
[2014/05/17 17:16:01 EDT] EROR Error while reading messsage size: &{%!d(string=use of closed network connection)}

@jvshahid jvshahid modified the milestones: 0.7.0, Next release May 20, 2014
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.
@jvshahid
Copy link
Contributor Author

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.

@jvshahid jvshahid modified the milestones: Next release, 0.7.0 May 23, 2014
@pauldix
Copy link
Member

pauldix commented May 29, 2014

lgtm

pauldix added a commit that referenced this pull request May 29, 2014
There should be a way to force a node to leave the cluster
@pauldix pauldix merged commit 83925a6 into master May 29, 2014
@jvshahid jvshahid modified the milestones: 0.7.1, Next release May 29, 2014
@jvshahid jvshahid deleted the fix-544-force-remove-node branch June 3, 2014 16:00
@ikreymer
Copy link

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,
rm -rf the shared/data dir, and then restarted the node.

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:

[INFO] (github.com/influxdb/influxdb/coordinator.(*ProtobufServer).handleConnection:77) ProtobufServer: client connected

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?

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.

4 participants