Agent quit if promotion failed
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
The agent should stay working as agent even if promotion failed.
The promotion could fail due to various reasons like binding to an address already in use as following log shows.
"FATA[0076] listen tcp 0.0.0.0:4242: bind: address already in use"
Steps to reproduce:
$ swarmd -d /tmp/node-1 --listen-control-api /tmp/manager1/swarm.sock --hostname node-1
$ swarmd -d /tmp/node-2 --hostname node-2 --join-addr 127.0.0.1:4242
$ swarmctl service create --name busybox-top --replicas 2 --image busybox:latest --command top #optional step
$ swarmctl node promote node-2
The agent node quit with following error logs:
INFO[0076] Renewing TLS Certificate.
Error: listen tcp 0.0.0.0:4242: bind: address already in use
ERRO[0076] container status unavailable error=An error occurred trying to connect: context canceled module=taskmanager task.id=7jk8aj8v4h7f5bz5jm867wb06
WARN[0076] error fetching signed node certificate: rpc error: code = 1 desc = context canceled
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 failure with the listed swarmd and swarmctl commands, especially the occupied 0.0.0.0:4242 listener. Trace the promotion path and the agent lifecycle around the reported certificate and context-canceled logs. Done means a failed promotion leaves node-2 running as an agent rather than quitting.
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
- 35/100