Skip to content

[OPS-4309] Wait for dockerd termination #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

Funghorn
Copy link

@Funghorn Funghorn commented Aug 19, 2024

Theoretically, the docker ps check could happen right after a pipeline step container exits and the next one launches. In that scenario we kill the Docker daemon running in dind container and stop the pipeline execution prematurely.
Let's make sure the "no running containers" situation proves to be true over a period of time greater than a couple of milliseconds.

Output:

❯ docker run --rm --entrypoint "/bin/sh" airbus:latest -c "sleep 10" &
[1] 6397

❯ poll_for_running_containers
Containers are still running, waiting for them to stop...
Containers are still running, waiting for them to stop...
[1]  + done       docker run --rm --entrypoint "/bin/sh" airbus:latest -c "sleep 10"
Making sure no new pipeline steps (containers) are scheduled by the runner. Terminating dockerd in 3...
Making sure no new pipeline steps (containers) are scheduled by the runner. Terminating dockerd in 2...
Making sure no new pipeline steps (containers) are scheduled by the runner. Terminating dockerd in 1...
No running containers, shutting down dockerd

@Funghorn Funghorn self-assigned this Aug 19, 2024
@Funghorn Funghorn closed this Aug 20, 2024
@Funghorn Funghorn deleted the rombez/OPS-4309 branch August 20, 2024 11:00
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