-
Notifications
You must be signed in to change notification settings - Fork 2k
After instance change ip, the swarm agent must also change the join addr. #806
Comments
The only quick fix is currently recreate the agent with this tiny script: create-swam-agent.sh
|
I think longer-termish we will have to support some kind of "sync" to the config store, I don't know if the Docker Hub token discovery service would support modifying the cluster IPs, but I'm sure the KV backends would. cc @aluzzardi @vieux @abronan How would you envision workflow for this case (changing IPs in the swarm)? |
@nathanleclaire Entries in the K/V are deleted after TTL expiration (nodes are removed from the discovery). So if the IPs are changing, the store will reflect the state of the cluster correctly after a stop/restart (on EC2 for example). Still you might expect old entries to be listed for a bit of time until their TTL expires (If you have 3 machines, expect to have 6 of those listed even though old entries will be marked as unhealthy and couldn't be used in the Swarm) As a workaround, if Machine is aware that an instance is restarting, it could directly delete the entry in the K/V to not list machines with wrong IPs after a restart. |
Here is my workaround after changing IP address of docker swarm node:
|
…ocker-daemon Allow user customisation before and after Docker daemon startup
After more testing PR #770 I found this:
I detect another changed IP problem, after I restart my swarm ec2 cluster today.
The master use the old ip's from the swarm machines
I analyze the problem:
The swarm agent are join with the old ip
52.10.167.59
After the IP from swarm machine changed, the implementation must reconfigure the swarm agent, remove the old container and start a new one.
The text was updated successfully, but these errors were encountered: