Skip to content

fix set initial failed peers#1407

Merged
stuartnelson3 merged 5 commits intomasterfrom
stn/fix-set-initial-failed-peers
Jun 8, 2018
Merged

fix set initial failed peers#1407
stuartnelson3 merged 5 commits intomasterfrom
stn/fix-set-initial-failed-peers

Conversation

@stuartnelson3
Copy link
Contributor

initially failed peers weren't being set correctly, which caused a panic (!) and prevented them from being removed.

@simonpasquier

@simonpasquier
Copy link
Member

@stuartnelson3 will have a look!

p.mlist = ml

p.setInitialFailed(resolvedPeers)
p.setInitialFailed(resolvedPeers, bindAddr)
Copy link
Member

Choose a reason for hiding this comment

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

I think that it should be the advertised address + port to deal with setups where cluster.advertise-address is defined (or bindAddr is "any"). And you probably want to rebase/merge with #1386 too.

Reconnect attempts to failed peers were panicking
because peer.Address() would attempt to access the
nil Node struct member.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
Again, since we aren't assigning a name (this is
generated) we rely on the node's Address for
removing the initially joining (and potentially
later re-joining) peers

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
The initially failing peers list shouldn't include
the bindAddr for the alertmanager itself, as this
connection is never made, and consequently only
removed from the failedPeers list after the failed
peer timeout.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
This may differ from bindAddr, and is the value we
want to not attempt to connect to.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
@stuartnelson3 stuartnelson3 force-pushed the stn/fix-set-initial-failed-peers branch from 3f3394d to 7b378a1 Compare June 8, 2018 09:33
@stuartnelson3
Copy link
Contributor Author

updated

@simonpasquier
Copy link
Member

👍

@stuartnelson3 stuartnelson3 merged commit 6305229 into master Jun 8, 2018
@stuartnelson3 stuartnelson3 deleted the stn/fix-set-initial-failed-peers branch June 8, 2018 10:34
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