Mirantis / launchpad

Other
28 stars 45 forks source link

Deleting a worker node then re-adding fails via #73

Open pjmcquade opened 3 years ago

pjmcquade commented 3 years ago

Hello,

Using the launchpad v1.2.0 binary:

Scenario. Removing a node via the:

cluster:
    prune: True

section in the launchpad.yml file. The debuging output shows me the command run on the manager node running launchpad:

docker node rm --force 6sux44bz58xf2zq4tf4c95b3u

This is OK, but I think there needs to be a command to run on the remote target:

$ docker swarm leave --force

because if I try to re-add the node by running launchpad with the node in play back in the file again, it fails, because it still reports it's node as the stale 6sux44bz58xf2zq4tf4c95b3u node id. i.e. on the node to be added back before launchpad is run:

$ docker info --format "{{.Swarm.NodeID}}"
6sux44bz58xf2zq4tf4c95b3u

This was repeatable 100% of the time I tried it.

Cheers, -Patrick