Skip to content

backport(v0.5.x): keep app containers running across guest agent restarts - #1688

Closed
kvinwang wants to merge 2 commits into
release/v0.5.xfrom
backport/v0.5.x-app-compose-agent-restart
Closed

kvinwang wants to merge 2 commits into
release/v0.5.xfrom
backport/v0.5.x-app-compose-agent-restart

Conversation

@kvinwang

@kvinwang kvinwang commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Backport of #1687.

app-compose.service has had Requires=dstack-guest-agent.service since v0.5.12 (#1446), so every guest agent restart (crash, watchdog kill, manual restart) also stops the app containers with docker compose stop and starts them again. This pulls the agent in with Wants= and waits for it in ExecStartPre= instead, until it is active or ends up failed, so the app still refuses to start when the agent failed to come up and survives the agent's own auto-restarts during boot. See #1687 for the analysis and the systemd 255/257 test results.

The change matches #1687 except that the unit file is basefiles/app-compose.service on this branch. Not tested on a real CVM image.

@kvinwang

kvinwang commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Not backporting: #1687 moved to a separate dstack-guest-agent-wait.service, which on v0.5.x would also need a meta-dstack recipe change.

@kvinwang kvinwang closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant