Add new exit codes to rm & rmi for running containers & dependencies

This enables programs and scripts wrapping the podman command to handle
'podman rm' and 'podman rmi' failures caused by paused or running
containers or due to images having other child images or dependent
containers. These errors are common enough that it makes sense to have
a more machine readable way of detecting them than parsing the standard
error output.

Signed-off-by: Ondrej Zoder <ozoder@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2019-06-15 06:24:42 -04:00
parent a622f8d345
commit 5370d9cb76
11 changed files with 54 additions and 15 deletions

View File

@ -49,7 +49,7 @@ var _ = Describe("Podman rm", func() {
result := podmanTest.Podman([]string{"rm", cid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(125))
Expect(result.ExitCode()).To(Equal(2))
})
It("podman rm created container", func() {