Skip to content

The swarm does not have a leader after demoting the Leader #34384

@hanwei1990

Description

@hanwei1990

Description
I have a swarm cluster made up of tree nodes, two manager and one worker. Node master is the leader at present. After doing "docker node demote master" on the slave node, I get error on master node while doing "docker node ls".
root@master:~# docker node ls
Error response from daemon: rpc error: code = 2 desc = The swarm does not have a leader. It's possible that too few managers are online. Make sure more than half of the managers are online.

But I try again. it appear no more.

Steps to reproduce the issue:

  1. doing "docker node demote master" on the slave node
  2. doing "docker node ls" on master node

Describe the results you received:
the cluster has no leader.

Describe the results you expected:
slave will become leader.

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

Output of docker version:

root@ubuntu:~# docker version
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:23:31 2017
OS/Arch: linux/amd64

Server:
Version: 17.06.0-ce
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:19:04 2017
OS/Arch: linux/amd64
Experimental: false

Output of docker info:

root@ubuntu:~# docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 2
Server Version: 17.06.0-ce
Storage Driver: devicemapper
Pool Name: docker-thinpool
Pool Blocksize: 524.3kB
Base Device Size: 10.74GB
Backing Filesystem: xfs
Data file:
Metadata file:
Data Space Used: 300.9MB
Data Space Total: 10.2GB
Data Space Available: 9.895GB
Metadata Space Used: 200.7kB
Metadata Space Total: 104.9MB
Metadata Space Available: 104.7MB
Thin Pool Minimum Free Space: 1.019GB
Udev Sync Supported: true
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
NodeID: i0i4rmmpk3d2xzf570m793zz6
Is Manager: false
Node Address: 192.168.200.254
Manager Addresses:
192.168.200.85:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-80-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.796GiB
Name: ubuntu
ID: 4K7T:EBWI:6YB3:K7AP:C63Q:YTCU:TVNL:HJ56:3PPM:NK4F:GTDX:J2DR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
docker.hikvision.com.cn
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

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