diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-08-14 19:05:05 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-08-19 11:11:37 +0200 |
commit | 74211249196bdb1e86a9a0b2283bc4a390dc3161 (patch) | |
tree | 0ff1bbc93945eebd1e09b29d19ff481e3f952f33 /libpod/oci_internal_linux.go | |
parent | f8cd1d49f7a1004ccdeefe6a2da21d9f46d38f58 (diff) | |
download | podman-74211249196bdb1e86a9a0b2283bc4a390dc3161.tar.gz podman-74211249196bdb1e86a9a0b2283bc4a390dc3161.tar.bz2 podman-74211249196bdb1e86a9a0b2283bc4a390dc3161.zip |
libpod, pkg: lookup also for crun failures
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci_internal_linux.go')
-rw-r--r-- | libpod/oci_internal_linux.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/oci_internal_linux.go b/libpod/oci_internal_linux.go index e7ed32272..607d5c14f 100644 --- a/libpod/oci_internal_linux.go +++ b/libpod/oci_internal_linux.go @@ -485,10 +485,11 @@ func readConmonPipeData(pipe *os.File, ociLog string) (int, error) { } func getOCIRuntimeError(runtimeMsg string) error { - if match, _ := regexp.MatchString(".*permission denied.*", runtimeMsg); match { + r := strings.ToLower(runtimeMsg) + if match, _ := regexp.MatchString(".*permission denied.*|.*operation not permitted.*", r); match { return errors.Wrapf(define.ErrOCIRuntimePermissionDenied, "%s", strings.Trim(runtimeMsg, "\n")) } - if match, _ := regexp.MatchString(".*executable file not found in.*", runtimeMsg); match { + if match, _ := regexp.MatchString(".*executable file not found in.*|.*no such file or directory.*", r); match { return errors.Wrapf(define.ErrOCIRuntimeNotFound, "%s", strings.Trim(runtimeMsg, "\n")) } return errors.Wrapf(define.ErrOCIRuntime, "%s", strings.Trim(runtimeMsg, "\n")) |