Skip to content
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

exec: fix error code when conmon fails #5396

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libpod/container_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ func (c *Container) Exec(tty, privileged bool, env map[string]string, cmd []stri
if lastErr != nil {
logrus.Errorf(lastErr.Error())
}
// ErrorConmonRead is a bogus value set by podman to indicate reading a value from
// conmon failed. Since it is specifically not a valid exit code, we should set
// a generic error here
if exitCodeData.data == define.ErrorConmonRead {
exitCodeData.data = define.ExecErrorCodeGeneric
}
lastErr = errors.Wrapf(define.ErrOCIRuntime, "non zero exit code: %d", exitCodeData.data)
}

Expand Down