moby / swarmkit

A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.
Apache License 2.0
3.34k stars 611 forks source link

Revisit swarm init --force-new-cluster behavior #2539

Open anshulpundir opened 6 years ago

anshulpundir commented 6 years ago

Doing docker swarm init --force-new-cluster when there are more than one managers present leads to inconsistencies in the cluster memberlist with the other managers still seeing the old cluster manager list while the manager where the docker swarm init --force-new-cluster was run only seeing itself as the manager.

One option is to disallow init --force-new-cluster when the size of the raft group is > 1.

stevvooe commented 6 years ago

@anshulpundir This is the feature. I don't see what other behavior would be expected here. --force-new-cluster is an intentionally destructive operation.

Should we balance this with a way to evict the forked manager?

anshulpundir commented 6 years ago

Makes sense. Changed the title.

I guess evicting the forked managers is probably a better approach since its backwards compatible. @stevvooe