diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-19 16:42:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 16:42:19 +0200 |
commit | b1acc4348184d43def7c63221ee0832505c4b7d1 (patch) | |
tree | 8c04b5ce2c82ef50f45d8618ae4874d972abc285 /pkg | |
parent | 25f2b9ae984c00d339e7a80eeb487b1f00bd4f7d (diff) | |
parent | f7527fb06da688613c6ce6383664ce5eb48267eb (diff) | |
download | podman-b1acc4348184d43def7c63221ee0832505c4b7d1.tar.gz podman-b1acc4348184d43def7c63221ee0832505c4b7d1.tar.bz2 podman-b1acc4348184d43def7c63221ee0832505c4b7d1.zip |
Merge pull request #3848 from giuseppe/enable-all-tests-crun
tests: enable all tests for crun
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/adapter/containers.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index 45a9a54a3..863640f97 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -342,7 +342,8 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode if err := ctr.Start(ctx, c.IsSet("pod")); err != nil { // This means the command did not exist exitCode = 127 - if strings.Contains(err.Error(), "permission denied") || strings.Contains(err.Error(), "file not found") { + e := strings.ToLower(err.Error()) + if strings.Contains(e, "permission denied") || strings.Contains(e, "operation not permitted") || strings.Contains(e, "file not found") || strings.Contains(e, "no such file or directory") { exitCode = 126 } return exitCode, err @@ -405,12 +406,13 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode } // This means the command did not exist exitCode = 127 - if strings.Contains(err.Error(), "permission denied") { + e := strings.ToLower(err.Error()) + if strings.Contains(e, "permission denied") || strings.Contains(e, "operation not permitted") { exitCode = 126 } if c.IsSet("rm") { if deleteError := r.Runtime.RemoveContainer(ctx, ctr, true, false); deleteError != nil { - logrus.Errorf("unable to remove container %s after failing to start and attach to it", ctr.ID()) + logrus.Debugf("unable to remove container %s after failing to start and attach to it", ctr.ID()) } } return exitCode, err |