Skip to content

[swarm] corrupted manger not able to leave a cluster with --force #25432

@rogaha

Description

@rogaha

Output of docker version:

Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 4
 Running: 4
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 15
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge overlay host null
Swarm: active
 NodeID: 2jml8zh2ap8gnw3ghchc03g09
 Error: rpc error: code = 2 desc = raft: no elected cluster leader
 Is Manager: true
 ClusterID:
 Managers: 0
 Nodes: 0
 Orchestration:
  Task History Retention Limit: 0
 Raft:
  Snapshot interval: 0
  Heartbeat tick: 0
  Election tick: 0
 Dispatcher:
  Heartbeat period: Less than a second
 CA configuration:
  Expiry duration: Less than a second
 Node Address: 192.168.99.100
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.16-boot2docker
Operating System: Boot2Docker 1.12.0 (TCL 7.2); HEAD : e030bab - Fri Jul 29 00:29:14 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.9 MiB
Name: master1
ID: XFBC:QIPK:ZJH5:MGSZ:D6IA:32XG:TUHL:6E43:HXOQ:FVLW:OY64:HWD4
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 72
 Goroutines: 218
 System Time: 2016-08-05T09:22:12.607462985Z
 EventsListeners: 4
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Insecure Registries:
 127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):
5 VirtualBox VMs cluster

Steps to reproduce the issue:

  1. Create a cluster with 2 managers and 3 workers
  2. Turn off the laptop

Describe the results you received:

docker@master1:~$ docker swarm leave
Error response from daemon: You are attempting to leave cluster on a node that is participating as a manager. The only way to restore a cluster that has lost consensus is to reinitialize it with `--force-new-cluster`. Use `--force` to ignore this message.
docker@master1:~$ docker swarm leave --force
Error response from daemon: context deadline exceeded
docker@master1:~$

manager logs --
logs1.txt

It might be related to #25395 (comment)

Describe the results you expected:

docker@master1:~$ docker swarm leave --force
Node left the swarm.
docker@master1:~$

Additional information you deem important (e.g. issue happens only occasionally):

Metadata

Metadata

Assignees

Labels

area/swarmkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.priority/P1Important: P1 issues are a top priority and a must-have for the next release.version/1.12

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions