Skip to content

Joining back 3rd manager sometimes causes reelection #1364

@tonistiigi

Description

@tonistiigi

In a three daemon cluster a leader is killed, 2 remaining nodes form a new leader. Now the old leader is started again, it shouldn't start a new election but sometimes it does(tested on a slow arm machine).

logs:

daemon1 d20073174 nodeid=2f7116c9f3135f00 https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon1-d20073174-log
daemon2 d30297954 nodeid=feb61f32aa6d9a2 https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon2-d30297954-log
daemon3 d35310795 nodeid=51dbe61bbca33471 https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon3-d35310795-log

timeline:

2016-08-11T00:52:14.175173269Z daemon1(leader) is shut down https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon1-d20073174-log-L214
2016-08-11T00:52:17.276697359Z daemon2 starts new election https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon2-d30297954-log-L154
2016-08-11T00:52:17.290743959Z daemon2 becomes new leader https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon2-d30297954-log-L167
2016-08-11T00:52:21.453692753Z daemon1 is restarted https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon1-d20073174-log-L221
2016-08-11T00:52:29.206870451Z deamon1 kicks off new election(why?) https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon1-d20073174-log-L370
from the logs it appears that daemon3 rejected to vote for daemon1 and no vote from daemon2
2016-08-11T00:52:31.288503039Z in daemon2 still for 10 sec all sends to daemon1 fail https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon2-d30297954-log-L199
2016-08-11T00:52:33.226706096Z in daemon3 logs daemon2 has lost its leader status(nothing in daemon2 logs) https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon3-d35310795-log-L176
2016-08-11T00:52:37.603734049Z daemon3 set itself as candidate and becomes leader(voted by daemon1 but not daemon2) https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon3-d35310795-log-L193
2016-08-11T00:52:37.680063567Z strange "failed to remove node" in daemon2 https://gist.github.com/tonistiigi/985a6e0b90b5a94b6bb0639c880636cb#file-daemon2-d30297954-log-L216

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions