Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

detect stopped containers as "Created" #1290

Merged
merged 2 commits into from
Feb 12, 2021
Merged

detect stopped containers as "Created" #1290

merged 2 commits into from
Feb 12, 2021

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Feb 12, 2021

What I did
consider "exited" container from a previous run as "Created" so we just need to invoke start

Related issue
#1289

(not mandatory) A picture of a cute animal, if possible in relation with what you did

@github-actions github-actions bot added the local Local context (moby) label Feb 12, 2021
@ndeloof ndeloof linked an issue Feb 12, 2021 that may be closed by this pull request
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@@ -114,7 +114,7 @@ func (s *composeService) getContainerStreams(ctx context.Context, container moby
Stdin: true,
Stdout: true,
Stderr: true,
Logs: true,
Logs: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking back at the history of this (3714ab7), this was set to true because we were loosing some logs in run (with a race probably). Is this not needed anymore ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes indeed.
according to API docs Logs: Replay previous logs from the container is the main reason we get logs from previous runs as described in #1289
this option is usefull to attach to a container that's already running, but here we attach before we call start, so not needed

@github-actions github-actions bot added aci api api cli cli ecs kube Kubernetes backend labels Feb 12, 2021
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof merged commit 54a7819 into main Feb 12, 2021
@ndeloof ndeloof deleted the restart_logs branch February 12, 2021 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aci api api cli cli ecs kube Kubernetes backend local Local context (moby)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

up restarting container collect logs from previous run
2 participants