diff options
author | Debarshi Ray <rishi@fedoraproject.org> | 2019-03-13 20:19:31 +0100 |
---|---|---|
committer | Debarshi Ray <rishi@fedoraproject.org> | 2019-03-15 18:28:47 +0100 |
commit | 082d792693504848e186a29db717ce20c7ff7774 (patch) | |
tree | d552982bc6501d6f3d74d9d7e244f5663aefd268 /docker | |
parent | 8aed32acea9bb35898abcee58fc9aa2a03ef264a (diff) | |
download | podman-082d792693504848e186a29db717ce20c7ff7774.tar.gz podman-082d792693504848e186a29db717ce20c7ff7774.tar.bz2 podman-082d792693504848e186a29db717ce20c7ff7774.zip |
Make 'podman rm' exit with 125 if it had a bogus & a running container
Getting a list of containers, and then deleting them are two separate
fallible steps that can run into different sets of errors. eg., in the
case of a bogus missing container and a container that's running or
paused, the first step will only trigger libpod.ErrNoSuchCtr. At this
point it might appear that the exit code ought to be 1. However, when
attempting the deletion, it will fail once more due to the status of
the running or paused container. Since libpod.ErrNoSuchCtr is no longer
the only error encountered, the exit code should be reset to 125.
This problem is currently masked for rootless usage due to commit
35432ecaae4a8372 ("rootless: fix rm when uid in the container != 0").
Fixes: 85db895012bead6b ("rm: set exit code to 1 if a specified ...")
e41279b902a334e5 ("Change exit code to 1 on podman rm ...")
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
Diffstat (limited to 'docker')
0 files changed, 0 insertions, 0 deletions