Skip to content

Conversation

asterite3
Copy link

When 'up' is run with explicit list of services, compose will start them together with their dependencies. It won't print output from dependencies, but, as discovered by @nthuemmel in #6018, it will still attach to them - without reading their output after that - so the receive buffer for dependencies will fill and at some point will start blocking those services. Fix that by only attaching to services given in the list.

Resolves #6018

When 'up' is run with explicit list of services, compose will
start them together with their dependencies. It will attach to all
started services, but won't read output from dependencies (their
logs are not printed by 'up') - so the receive buffer of
dependencies will fill and at some point will start blocking those
services. Fix that by only attaching to services given in the
list.
To do that, move logic of choosing which services to attach from
cli/main.py to utils.py and use it from project.py to decide if
service should be attached.

Fixes docker#6018

Signed-off-by: Daniil Sigalov <asterite@seclab.cs.msu.ru>
@ulyssessouza ulyssessouza merged commit 2e273c5 into docker:master Jan 4, 2021
@asterite3 asterite3 deleted the up-only-attach-foreground-services branch January 4, 2021 14:03
@aiordache aiordache added this to the 1.28.0 milestone Jan 4, 2021
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.

Logs stop consuming for container, blocking writes to stderr
4 participants