summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-04 22:51:33 -0500
committerGitHub <noreply@github.com>2020-03-04 22:51:33 -0500
commit8a8c2fea69ab800f11484f7cac429e604dbb1f50 (patch)
tree8ed6eaa00f4e582b8c3af5efe9bada88cd0b3e87
parent834f397db267f3be2ad13f7d24cec247c3468cbd (diff)
parent4632b81c81a73025a960e339f40bc805f8a6c70a (diff)
downloadpodman-8a8c2fea69ab800f11484f7cac429e604dbb1f50.tar.gz
podman-8a8c2fea69ab800f11484f7cac429e604dbb1f50.tar.bz2
podman-8a8c2fea69ab800f11484f7cac429e604dbb1f50.zip
Merge pull request #5396 from haircommander/fix_exec_error
exec: fix error code when conmon fails
-rw-r--r--libpod/container_api.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 356da12d0..dc7470f1a 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -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)
}