Bug 1317096

Summary: Regression: docker rmi of in-use image erases tagged name
Product: Red Hat Enterprise Linux 7 Reporter: Ed Santiago <santiago>
Component: dockerAssignee: smahajan <smahajan>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: cevich, lsm5, lsu
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: docker-autotest:0.8.5:docker_cli/rmi/with_blocking_container_by_id
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-23 16:17:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reproducer script: create in-use image, try to rmi it by hash none

Description Ed Santiago 2016-03-11 23:37:46 UTC
Created attachment 1135449 [details]
reproducer script: create in-use image, try to rmi it by hash

Using: docker-1.9.1-el7

'docker rmi' of an in-use image will fail (correctly) but will erase an associated image name, leaving it as <none>:

    $ docker images     [edited for legibility]
    foo     latest      f129792fbded   1 seconds ago       194.6 MB

    $ docker rmi f129792fbded
    Error response from daemon: conflict: unable to delete f129792fbded (cannot be forced) - image is being used by running container c1f1084111e5
    Error: failed to remove images [f129792fbdedc0357363361668bb8a7e63096c06bd99ae94b82397d3490186be]

    $ docker images     [edited for legibility]
    <none>  <none>      f129792fbded   4 seconds ago       194.6 MB

 See attached reproducer script.

Comment 2 smahajan@redhat.com 2016-06-03 19:51:37 UTC
I tried this on docker upstream. This is fixed in docker latest (upstream/master) branch.

Ed, 

Can you try it on docker 1.10 and see if it's fixed there ?

Shishir

Comment 3 Ed Santiago 2016-06-03 20:15:33 UTC
I cannot reproduce on docker-latest-1.10.3-22.el7. Tried manually, with reproducer script, and with docker-autotest. All gave the desired behavior.

I know there's a -26 out but I haven't installed it on my test setup. I will be on PTO until June 20 and will not be able to do further tests.

Comment 4 smahajan@redhat.com 2016-06-06 15:01:01 UTC
Fixed in Docker 1.10.
Moving this to modified.

Shishir

Comment 6 Luwen Su 2016-06-11 17:26:15 UTC
(In reply to Ed Santiago from comment #3)
> I cannot reproduce on docker-latest-1.10.3-22.el7. Tried manually, with
> reproducer script, and with docker-autotest. All gave the desired behavior.
> 
> I know there's a -26 out but I haven't installed it on my test setup. I will
> be on PTO until June 20 and will not be able to do further tests.

works well with the -40 version, move to verified

Comment 8 errata-xmlrpc 2016-06-23 16:17:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1274