[BUG] A start failure in one service aborts the start of unrelated services (unreleased regression)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 57/100
Research direction
Start by tracing the Compose start phase and the shared context cancellation described in the issue, then compare that flow with v5.6.0. Reproduce with the provided compose.yaml and commands; inspect why a failing web start aborts work for unrelated services such as api and db. Done means the command still reports the web failure while unrelated starts and pre_start work already in progress can finish.
Written by the indexing model from the issue text.
Description
Description
On main, when one node in the start phase fails (port conflict, failing hook, unhealthy required dependency, --wait-timeout), the failure cancels the context shared by the whole start phase. Start, health wait and pre_start work still in flight for unrelated services is aborted too.
Current behavior (main, 20ca59586): a service whose configuration changed is recreated (old container removed) but never started. It is left in created state, so a service that was running before the command ends up stopped. No message is printed for it, and its Waiting progress line never completes. A pre_start hook container that is still running is killed.
Expected behavior (as in v5.6.0): the command still fails because of the failing service, but a start already in progress for an unrelated service runs to completion.
This does not happen with v5.6.0, so it looks like an unreleased regression.
Steps To Reproduce
- With this
compose.yaml:name: n1repro services: db: image: alpine:3.20 command: sleep infinity healthcheck: { test: ["CMD", "true"], interval: 2s } api: image: alpine:3.20 command: sleep infinity environment: { VERSION: "${VERSION:-1}" } depends_on: { db: { condition: service_healthy } } web: image: nginx:alpine ports: ["18089:80"] - Start everything:
VERSION=1 docker compose up -d --wait - Stop
weband take its port:docker compose stop web && docker run -d --name blocker -p 18089:80 nginx:alpine - Change
api's configuration and run up again:VERSION=2 docker compose up -d(fails onweb, as expected) - Check
api:docker inspect -f '{{.State.Status}}' n1repro-api-1- v5.6.0:
running, recreated withVERSION=2(2/2 runs) - main 20ca59586:
created(2/2 runs). The output ends withContainer n1repro-db-1 Waiting, and nothing follows fordborapi.
- v5.6.0:
Compose Version
Docker Compose version dev # built from main at 20ca59586 (bad)
Docker Compose version dev # built from v5.6.0 (good)
Docker Environment
Server Version: 29.1.3
Operating System: Docker Desktop
OSType: linux
Architecture: arch64
Kernel Version: 6.12.54-linuxkit
Storage Driver: overlayfs
Anything else?
No response
- Dominant language
- Go
- Stars
- 38.5k
- Forks
- 5.9k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 66
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from docker/compose
-
[BUG] deploy.restart_policy without condition drops the restart policyPossibly taken @akshat-lakhera claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
docker/compose#14383 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG] `depends_on` health/completion waits always sleep 500ms before the first checkPossibly taken @htoyoda18 claimed this 1 day ago. Openkind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
[BUG] down -v removes a named volume owned by another projectPossibly taken @htoyoda18 claimed this 4 days ago. Openkind/bug
Difficulty 3/5 1-2 days Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
kind/feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
docker/compose#14365 · 2 comments ·
Maintainers usually reply within 1 day
-
kind/feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
docker/compose#14356 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
SimonWaldherr/golang-examples#109 ·
-
area: localization needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug ready-for-pr
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
kunchenguid/no-mistakes#1615 · 1 comment ·
Maintainers usually reply within 1 day