Failing to remove an image, will not remove the image name/tag.#7963
Conversation
c68d81a to
ed8de6d
Compare
|
I don't have a vote, but this looks good to me, and the test addition/refactor looks good...I had been noticing this earlier so had a vested interested in seeing this fixed! I saw some debug code left in earlier, but looks like the commit was updated to clean that up. |
There was a problem hiding this comment.
I am not sure if this is the right logic here, but I am trying to see if they are just removing an image "tag" or removing the whole image, basically I want to know up here if it will make it to line #108
|
LGTM, but I don't know this code very well. |
|
I'm getting a test failure --- FAIL: TestImageRemoveWithContainerFails (0.50 seconds)
docker_cli_rmi_test.go:13: images before: "REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE\n<none>
<none> 79f8664169cf 2 seconds ago 2.433 MB\n<none> <none> 488a6b58928c 43 seconds ago 4.351 MB
\nttytest latest e24efe0bff1a About a minute ago 2.433 MB\n<none> <none> 18b5ac756b10 2 minutes
ago 2.435 MB\n<none> <none> dd53e62bb7ee 2 minutes ago 16 B\nnocontext latest e8897c054881
2 minutes ago 2.433 MB\n<none> <none> 5b1047c25b07 2 minutes ago 5 B\n<none> <none> 9
7344479e2f6 2 minutes ago 81 B\n<none> <none> 945d393c7492 2 minutes ago 88 B\n<none> <none>
746ea3b86a3a 2 minutes ago 87 B\n<none> <none> e5899268adcf 2 minutes ago 81 B\n<none>
<none> fd60b84ffbe8 2 minutes ago 2.433 MB\n<none> <none> 3bb144b26338 2 minutes ago 0 B\n<none
> <none> 94e36a7fd364 3 minutes ago 2.433 MB\n<none> <none> fd3668ba12e1 3 minutes ago
5 B\nbusybox latest a9eb17255234 3 months ago 2.433 MB\nscratch latest 511136ea3c5a 15
months ago 0 B\n"
docker_cli_rmi_test.go:28: Container "c5f7b189b8a196207be95f113e778cd56f69496e2d99601357c4e7fe841347de" is using image, error message should contain "becau
se the running container": Error response from daemon: Conflict, cannot delete a9eb17255234 because the container c5f7b189b8a1 is using it, use -f to force
2014/09/10 20:45:41 Error: failed to remove one or more images |
ed8de6d to
c6cd0c5
Compare
|
updated, the string I was comparing the error to was "running container is using it" which it is not always a running container, so I changed it to fit all use cases |
|
LGTM |
|
@unclejack @LK4D4 can you guys take a look at this one too :) |
There was a problem hiding this comment.
This is redundant else, because Fatalf stops test immediately.
There was a problem hiding this comment.
should it just be an if on it's own line? it's making sure that it failed with the right error
There was a problem hiding this comment.
Yup, should be on it's own line.
|
LGTM apart from style things. |
c6cd0c5 to
fb83324
Compare
Fixes moby#7845 and moby#7801, and a real pain point I had :) Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <[email protected]> (github: jfrazelle)
fb83324 to
b2efdc5
Compare
|
updated |
|
on reviewing the man and cli.md, I'm saddened to note that i don't think there is any documentation that covers the existing functionality - so there's probably no docs updates needed :( |
|
is this good to merge? @LK4D4 @crosbymichael |
|
Yep |
…ntag Failing to remove an image, will not remove the image name/tag.
Fixes #7845 and #7801, and a real pain point I had :)
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle [email protected] (github: jfrazelle)