--data-path-port parameter ignored while executing `docker swarm init --force-new-cluster` from backup
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
I've made a backup of docker swarm in version 18.09, on RHEL7 machines. I upgraded docker on each node and restored swarm from backup executing docker swarm init --force-new-cluster --data-path-port 5789 . But apparently --data-path-port hasn't been applied and it's still using 4789. I need to change it because of reasons mentioned in issue.
I expect docker to apply my changes or at least warn that they are ignored.
I tried also to amend /var/lib/docker/swarm/docker-state.json content before restoration, but it hasn't helped either.
I reproduced problem also on local VM-s setup.
$ docker info
Client:
Debug Mode: false
Server:
Containers: 131
Running: 35
Paused: 0
Stopped: 96
Images: 221
Server Version: 19.03.4
Storage Driver: devicemapper
Pool Name: datavg-dockervol
Pool Blocksize: 65.54kB
Base Device Size: 21.47GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data Space Used: 30.25GB
Data Space Total: 107.4GB
Data Space Available: 77.12GB
Metadata Space Used: 51.78MB
Metadata Space Total: 536.9MB
Metadata Space Available: 485.1MB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.158-RHEL7 (2019-05-13)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: q00hc0xkgzhfgnqb1v8w5uj4g
Is Manager: true
ClusterID: l4abckeb2fpe1tt9jqevrh5e0
Managers: 3
Nodes: 8
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 10.53.101.98
Manager Addresses:
10.53.101.101:2377
10.53.101.97:2377
10.53.101.98:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-957.12.1.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.7 (Maipo)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 62.76GiB
Name: ***
ID: I5NS:YHAX:CDMZ:T3NF:CKUC:4236:QYU6:IIEN:TRHF:J343:LC2F:FV6T
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
env=***
node=***
name=***
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
$ docker version
Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf583a
Built: Fri Oct 18 15:52:22 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.4
API version: 1.40 (minimum version 1.12)
Go version: go1.12.10
Git commit: 9013bf583a
Built: Fri Oct 18 15:50:54 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported docker swarm init --force-new-cluster --data-path-port 5789 flow using the provided Docker 19.03.4 setup and check the resulting Data Path Port. Trace how swarm restoration handles this parameter and compare it with a fresh initialization. Done means the requested port is applied during restore or the command clearly reports that it cannot be changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100