dstack icon indicating copy to clipboard operation
dstack copied to clipboard

[Bug]: [dind] `start-dockerd` incorrectly detects whether `supervisord` is started

Open un-def opened this issue 1 year ago • 0 comments

Steps to reproduce

  1. Start supervisord and dockerd via start-dockerd.
  2. Stop dockerd via supervisorctl
  3. Try to start dockerd with start-dockerd.

Actual behaviour

$ docker run -it --privileged dstackai/dind bash
root@6be464221ab5:/# start-dockerd
dockerd started
root@6be464221ab5:/# supervisorctl stop dockerd
dockerd: stopped
root@6be464221ab5:/# start-dockerd
Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.
For help, use /usr/bin/supervisord -h
dockerd started
root@6be464221ab5:/# supervisorctl status
dockerd                          STOPPED   Oct 29 11:58 AM
root@6be464221ab5:/#

Expected behaviour

No response

dstack version

0.18.20

Server logs

No response

Additional information

supervisorctl status returns non-zero exit status (NOT_RUNNING = 3) if at least one program is not started: https://github.com/Supervisor/supervisor/blob/6c1a3f5/supervisor/supervisorctl.py#L696-L698

un-def avatar Oct 29 '24 12:10 un-def