I’ve been using 1.12 since RC1 all the way to the latest production release, and it’s still pretty buggy. Some of the bugs are hard to reproduce, but I’ve consistently found that if I start and stop enough containers, the swarm will eventually die and become unrecoverable.
Once that happens, I have no idea how to actually get my docker manager node into a “blank slate” stage - in other words, not part of a swarm at all.
For example, I’m currently in a situation where the swarm has bugged out. I have a global service running that I attempt to remove:
root@master1:~# docker service rm nginxtest Error response from daemon: rpc error: code = 4 desc = context deadline exceeded
Clearly broken. I will never be able to remove that service. But the issue is, once I’m in this state, I have no idea how to actually just kill the swarm and get out of dodge.
I can’t just leave the swarm:
root@master1:~# docker swarm leave Error response from daemon: You are attempting to leave cluster on a node that is participating as a manager. Removing the last manager will erase all current state of the cluster. Use `--force` to ignore this message.
I can’t --force leave the swarm:
root@master1:~# docker swarm leave --force Error response from daemon: context deadline exceeded
I can’t initialize a new cluster:
root@master1:~# docker swarm init --force-new-cluster Error response from daemon: context deadline exceeded
Is there any way to outright remove this node as a swarm master, without killing the entire machine (which has been my method so far)?