-
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
runc exec: fail with exit code of 255 #3073
Conversation
CI failure in centos7 is a glitch; restarted. |
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(nb)
exec.go
Outdated
@@ -101,7 +101,8 @@ following will output a list of processes running in the container: | |||
if err == nil { | |||
os.Exit(status) | |||
} | |||
return fmt.Errorf("exec failed: %w", err) | |||
fatalWithCode(fmt.Errorf("exec failed: %w", err), -1) |
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.
-1
Can't we use 255
here?
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, it will probably look a tad better.
Fixed, PTAL @AkihiroSuda
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.
Doesn't seem fixed
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.
My bad. Let's try again
close/reopen to kick new cirrus ci |
OK, it's not working that way for cirrus-ci apparently, need to rebase. |
c4d0ff8
to
f926e36
Compare
Currently there's no way to distinguish between the two cases: - runc exec failed; - the command executed returned 1. This was possible before commit 8477638, as runc exec exited with the code of 255 if exec itself has failed. The code of 255 is the same convention as used by e.g. ssh. Re-introduce the feature, document it, and add some tests so it won't be broken again. Signed-off-by: Kir Kolyshkin <[email protected]>
Noticing that
runc exec
exit status is not documented, I ended up with this.Currently there's no way to distinguish between the two cases:
This was possible before commit 8477638, as runc exec exited with
the code of 255 if exec itself has failed. The code of 255 is the same
convention as used by e.g. ssh.
Re-introduce the feature, document it, and add some tests so it won't be
broken again.
Changelog entry