-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Comments
I think @mheon had some ideas. |
There may be some history of states in DB maybe? |
I hoped this won't be issue in real use, unfortunately I was mistaken. This is causing me troubles for instance with |
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. |
LGTM |
+1 on @mheon's proposal. Great idea! |
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 transitionrunning->not-running
. It's possible that for short living containers that therunning
state is never observed by polling. Even non-sleeping busy waiting.We need to figure how to solve this.
The text was updated successfully, but these errors were encountered: