Skip to content
This repository has been archived by the owner on Apr 15, 2018. It is now read-only.

#159 filter selfnode from nodeslist #162

Merged
merged 1 commit into from
May 2, 2017
Merged

#159 filter selfnode from nodeslist #162

merged 1 commit into from
May 2, 2017

Conversation

jasongoodwin
Copy link
Contributor

Re:
#159

This will filter the selfnode from the list of nodes received and warn if it's encountered.

I'm not sure if this is the prettiest approach but I tested and it does work. This is a fairly easy scenario to produce. Using a fixed ip address, If we shutdown the old nodes and then try to start up again nodes can see the selfnode while other nodes are acquiring the lock and trying to start up

[WARN][17:43:10.907][d.h.c.ConstructrMachine][C:] - Selfnode received in list of nodes Set(akka.tcp://[email protected]:2756). Will filter to prevent forming an island.
[WARN][17:43:10.908][d.h.c.ConstructrMachine][C:] - Couldn't acquire lock, going to GettingNodes
[WARN][17:43:10.909][d.h.c.ConstructrMachine][C:] - Selfnode received in list of nodes Set(akka.tcp://[email protected]:2756). Will filter to prevent forming an island.
[WARN][17:43:10.910][d.h.c.ConstructrMachine][C:] - Couldn't acquire lock, going to GettingNodes

The filtering is done in the retrieve section which is significant - the node will be filtered before determining if there are nodes or not. The implication is that if only the self node exists, it will attempt to lock if the only node is selfNode as it would be filtered.

@hseeberger hseeberger merged commit 857c9e4 into hseeberger:master May 2, 2017
@hseeberger
Copy link
Owner

This is another great example for a nasty corner case when we allow the cluster to be formed more than once.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants