Add wait API endpoint for waiting on process exit#1525
Add wait API endpoint for waiting on process exit#1525stevvooe merged 1 commit intocontainerd:masterfrom
Conversation
|
@crosbymichael you forgot to implement it for windows |
|
@mlaventure i know, waiting on feedback on the overall design |
There was a problem hiding this comment.
what's wrong with log.G()?
There was a problem hiding this comment.
Do we need for all those calls to be fully synchronous with each others?
@crosbymichael Hm, how could this happen? |
|
@Random-Liu its because of the go runtime and we cannot make sure the connection is blocking waiting for the event before calling start. |
Hm. If so, it seems that we have to implement this on the server side. BTW, is there any golang or other issue for this behavior? I'd like to understand more. |
|
LGTM on the API |
654c6b7 to
86d3aad
Compare
|
@mlaventure windows fixed |
Codecov Report
@@ Coverage Diff @@
## master #1525 +/- ##
=======================================
Coverage 42.61% 42.61%
=======================================
Files 24 24
Lines 3318 3318
=======================================
Hits 1414 1414
Misses 1581 1581
Partials 323 323Continue to review full report at Codecov.
|
86d3aad to
af1297c
Compare
|
rebased |
af1297c to
ceb0965
Compare
Signed-off-by: Michael Crosby <[email protected]>
ceb0965 to
d67763d
Compare
|
LGTM |
1 similar comment
|
LGTM |
…ndbox-container Forcibly remove sandbox container
While running stress tests there would always be one or two shims that hang. This was nothing wrong in the shim and the shims were properly sending the exit events. However, the client would miss the event because of the small race where you connect to the event server and start a goroutine.
This adds a Wait endpoint that blocks until the process exits. If the process has already exited when you call Wait it will immediately return the exit status and timestamp.
This moves much of the wait logic from the client to the server to properly handle this.
Nothing changes from the client POV so updating to the new version will just work for existing clients.
Signed-off-by: Michael Crosby [email protected]