summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Rajan <arajan@redhat.com>2021-11-23 16:41:23 +0530
committerMatthew Heon <mheon@redhat.com>2021-12-06 15:20:28 -0500
commit05a5fcb45b436eb2109bfda08a037cb926facfb3 (patch)
tree2a15c735e3484f84958d74f5be1244ab29e28b28
parentc5530591bbed4788fa0a113430b767a593cc0782 (diff)
downloadpodman-05a5fcb45b436eb2109bfda08a037cb926facfb3.tar.gz
podman-05a5fcb45b436eb2109bfda08a037cb926facfb3.tar.bz2
podman-05a5fcb45b436eb2109bfda08a037cb926facfb3.zip
oci: ack crun output when container is not there
`crun status ctrid` outputs `No such file or directory` when container is not there so podman much ack it. [NO NEW TESTS NEEDED] Signed-off-by: Aditya Rajan <arajan@redhat.com>
-rw-r--r--libpod/oci_conmon_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 74b5bc20b..9403b286c 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -289,7 +289,7 @@ func (r *ConmonOCIRuntime) UpdateContainerStatus(ctr *Container) error {
if err2 != nil {
return errors.Wrapf(err, "error getting container %s state", ctr.ID())
}
- if strings.Contains(string(out), "does not exist") {
+ if strings.Contains(string(out), "does not exist") || strings.Contains(string(out), "No such file") {
if err := ctr.removeConmonFiles(); err != nil {
logrus.Debugf("unable to remove conmon files for container %s", ctr.ID())
}