-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libct: suppress bogus "unable to terminate" warnings #2716
Conversation
While working on a test case for [1], I got the following warning: > level=warning msg="unable to terminate initProcess" error="exit status 1" Obviously, the warning is bogus since the initProcess is terminated. This is happening because terminate() can return errors from either Kill() or Wait(), and the latter returns an error if the process has not finished successfully (i.e. exit status is not 0 or it was killed). Check for a particular error type and filter out those errors. [1] opencontainers#2683 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is a new variable added by go 1.16 so we'll have to wait until 1.16 is minimally supported version, thus TODO for now. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
rebased (for new CI) |
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.
LGTM
@mrunalp ptal |
Just saw it again and it took me some time to find out I already had it fixed:
|
@@ -2067,9 +2067,20 @@ func ignoreTerminateErrors(err error) error { | |||
if err == nil { | |||
return nil | |||
} | |||
// terminate() might return an error from ether Kill or Wait. |
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.
nit: ether
-> either
While working on a test case for #2715, I got the following warning:
Obviously, the warning is bogus since the initProcess is terminated.
This is happening because terminate() can return errors from either
Kill() or Wait(), and the latter returns an error if the process has
not finished successfully (i.e. exit status is not 0 or it was killed).
Check for a particular error type and filter out those errors.