[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting a default-address-pool from swarm update #38158

Open
sudo-bmitch opened this issue Nov 8, 2018 · 2 comments
Open

Support setting a default-address-pool from swarm update #38158

sudo-bmitch opened this issue Nov 8, 2018 · 2 comments

Comments

@sudo-bmitch
Copy link

Description

With 18.09, we now have docker swarm init --default-address-pool .... For those already running a swarm cluster, it would be useful to have docker swarm update --default-address-pool ... to change the default pool for new overlay networks created in the future. This would avoid the need to destroy and recreate the cluster to adjust the default network config.

Steps to reproduce the issue:
docker swarm update --default-address-pool 10.20.0.0/16

Describe the results you received:
unknown flag: --default-address-pool

Describe the results you desired:
The value of default-address-pool should be changed without the need to destroy and init the cluster. The result should be visible with:

docker info --format '{{.Swarm.Cluster.DefaultAddrPool}}'

Additional information you deem important (e.g. issue happens only occasionally):
This is a new feature request.

Output of docker version:

Client:
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:48:46 2018
 OS/Arch:           linux/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:16:44 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

$ docker info
Containers: 48
 Running: 13
 Paused: 0
 Stopped: 35
Images: 234
Server Version: 18.09.0
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
 NodeID: q44zx0s2lvu1fdduk800e5ini
 Is Manager: true
 ClusterID: b4qh6x548wfo2sv9pubs33hk7
 Managers: 1
 Nodes: 1
 Default Address Pool: 10.0.0.0/8
 SubnetSize: 24
 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: 4
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 192.168.233.100
 Manager Addresses:
  192.168.233.100:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d6de12e2f362cb9dc49ad957911996d3de59b338
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.0-8-amd64
Operating System: Debian GNU/Linux 9 (stretch)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.739GiB
Name: bmitch-asusr556l
ID: 5OZQ:RKOD:MLMQ:3YC4:QOWX:SLWX:SYO2:XDJF:CG6C:43ER:4QQ4:DXOO
Docker Root Dir: /home/var-docker
Debug Mode (client): false
Debug Mode (server): false
Username: bmitch3020
Registry: https://index.docker.io/v1/
Labels:
 foo=bar
 env=laptop
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

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

Install on physical Linux machine running Debian.

@gboddin
Copy link
gboddin commented May 8, 2019

You might find yourself tempted to just look, go ahead and edit /var/lib/docker/swarm/docker-state.json change DefaultAddressPool and SubnetSize and then restart docker daemon.

Do yourself a favor and forget about it ! Reinit your swarm

@kevinholtkamp
Copy link

@gboddin I am a beginner with swarm, is there anything I need to pay special attention to when doing this?

Can I just remove one node (after draining of course), create a new swarm on that node, and one by one move nodes to the new swarm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants