-
Notifications
You must be signed in to change notification settings - Fork 950
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
fix: fix cri exec hang #2224
fix: fix cri exec hang #2224
Conversation
If exec process get run, io should be closed in the function , still have no iead why it can't close backend after function. If io closed after the function, log followed will miss.
|
do not return error when execProcess.Start() fail, if exec process started, let execExitedAndRelease do the exit hook. Signed-off-by: Ace-Tang <[email protected]>
if err := <-fail; err != nil { | ||
msg.err = err | ||
// exit code should not be zero when exec get failed. | ||
if msg.exitCode == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whether it is possible exitCode
is not zero when exec
got error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It possible, like exec $id aaaaa
.
} | ||
} | ||
// XXX: if exec process get run, io should be closed in this function, | ||
for _, hook := range c.hooks { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, no matter run exec
got an error or not, we always call the exit hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, when exec start , no matter what result, let hook do the clean. Before exec start, if got error, let pouch daemon level do the clean.
lgtm |
@allencloud , merge this after #2226 pass ci. |
LGTM |
@Ace-Tang All tests has been passed. ^_^ |
do not return error when execProcess.Start() fail, if exec process
started, let execExitedAndRelease do the exit hook.
Signed-off-by: Ace-Tang [email protected]
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
will add in cri by @starnop .
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews