Skip to content
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

Improve Docker APIv2 container wait reliability #10256

Closed
matejvasek opened this issue May 7, 2021 · 6 comments · Fixed by #10271
Closed

Improve Docker APIv2 container wait reliability #10256

matejvasek opened this issue May 7, 2021 · 6 comments · Fixed by #10271
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@matejvasek
Copy link
Contributor

As of now podman uses polling to wait for a condition. This approach is however unreliable.

There is an issue when waiting for status change. There is a condition called next-exit, it basically waits for transition running->not-running. It's possible that for short living containers that the running state is never observed by polling. Even non-sleeping busy waiting.

We need to figure how to solve this.

@matejvasek
Copy link
Contributor Author

I think @mheon had some ideas.

@matejvasek
Copy link
Contributor Author

matejvasek commented May 7, 2021

There may be some history of states in DB maybe?

@matejvasek
Copy link
Contributor Author

I hoped this won't be issue in real use, unfortunately I was mistaken. This is causing me troubles for instance with pack where restorer runs to fast. Also some other observed this issue hashicorp/nomad-driver-podman#89.

@mheon
Copy link
Member

mheon commented May 7, 2021

Best way I can think of is the Events interface - the container exiting will produce a Died event. Listening for events from the specific container ID in question, and then returning when a Died event occurred (said event should include the exit code as well), seems the safest way.

@TomSweeneyRedHat
Copy link
Member

LGTM
would like a @vrothberg or a @mheon head nod too

@vrothberg
Copy link
Member

+1 on @mheon's proposal. Great idea!

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants