Skip to content

Commit

Permalink
Merge pull request #5396 from haircommander/fix_exec_error
Browse files Browse the repository at this point in the history
exec: fix error code when conmon fails
  • Loading branch information
openshift-merge-robot authored Mar 5, 2020
2 parents 834f397 + 4632b81 commit 8a8c2fe
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 8a8c2fe

Please sign in to comment.