Skip to content

Commit

Permalink
oci: ack crun output when container is not there
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
flouthoc committed Nov 23, 2021
1 parent 08558b2 commit a4e4b8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/oci_conmon_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,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())
}
Expand Down

0 comments on commit a4e4b8d

Please sign in to comment.