swarm doesn't recover if its been turned off for 2 months.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
I just visited someone who's raspberry pi based swarm thing failed to come back after being off for 2 months.
eventually i noticed in docker system info that swarm was complaining that the cert had expired
running docker node or docker stack ls results in an error that was similar to "swarm was never initialised"
but docker ps -a clearly showed containers with service task names
i deleted the cert files, and then docker was very convinced that swarm had never been initialised
running docker swarm init got us to an uninitialised swarm with no stacks or services
and then docker deploy... brings things back, and seems to use the abandoned swarm created and managed volumes
so I'm hoping that the only fix needed, is that swarm sees that the cert is out of date, and replaces it (this is a one node swarm, and swarmkit can probably detect that this is the case?)
extra weirdness is that the existance of these certs seems to be the only thing swarm's using to determine if there are stacks and services it at some point had - that seems like a shortcut that could probably be improved on.
that said, it works,
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 one-node case: leave a Raspberry Pi-based swarm off long enough for its certificate to expire, then run docker system info, docker node, and docker stack ls. Trace the swarm certificate and initialization handling, with attention to preserving existing services and stacks. Done means an expired certificate no longer makes the swarm appear uninitialized and existing deployments remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100