Skip to content

Stop remaining containers on --abort-on-container-exit - #1511

Open
mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:fix-abort-on-container-exit
Open

Stop remaining containers on --abort-on-container-exit#1511
mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:fix-abort-on-container-exit

Conversation

@mokibit

@mokibit mokibit commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Before this change, when using --abort-on-container-exit or --exit-code-from, exiting one container would leave the remaining containers running in the background. Now, remaining containers are properly stopped when one container exits.

Fixes #679.

@mokibit
mokibit force-pushed the fix-abort-on-container-exit branch 2 times, most recently from 1ab5898 to 012fc40 Compare July 21, 2026 18:20
Before this change, when using `--abort-on-container-exit` or
`--exit-code-from`, exiting one container would leave the remaining
containers running in the background. Now, remaining containers are
properly stopped when one container exits.

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
@mokibit
mokibit force-pushed the fix-abort-on-container-exit branch from 012fc40 to 3f6afd6 Compare July 21, 2026 18:24
)
# After one container exits, the others should be stopped.
# The command should complete within the timeout (all containers stop).
self.assertNotEqual(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use assertEqual

)

# Verify all containers are stopped
out2, _, _ = self.run_subprocess([

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better count running containers, e.g. using compose ps

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.

--abort-on-container-exit does not work

2 participants