Bug 1113190

Summary: Unable to remove image after removing all containers using the image
Product: Red Hat Enterprise Linux 7 Reporter: Timothy Williams <tiwillia>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: bsarathy, dwalsh, lsm5, lsu, mjenner, qbarnes
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-18 20:45:55 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:
Bug Depends On:    
Bug Blocks: 1109938, 1138364    

Description Timothy Williams 2014-06-25 15:25:18 UTC
Description of problem:
Attempting to remove an image, an error message is reported stating that a container is using the image. All containers are stopped:

$ docker rmi fbe51255ac15                 
Error: Conflict, cannot delete fbe51255ac15 because the container a0a8d8de4744 is using it, use -f to force
$ docker rm a0a8d8de4744 
a0a8d8de4744

After removing each container the error message reports, the image still cannot be removed, reporting the following error stating the image id cannot be found:

$ docker rmi fbe51255ac15
Error: No such id: b8c287cf50a1151c53d1b7e6102661b01a54e61c52cd491a70476d242e92ac57

However, the image is still seen in the `docker images` output:

$ docker images | grep fbe51255ac15
<none>                            <none>              fbe51255ac15        2 days ago          469.3 MB

It is difficult to reproduce the issue consistently. The issue has been reported on the dotcloud github issue tracker. It appears this may have already been resolved upstream:

https://github.com/dotcloud/docker/issues/3258
https://github.com/dotcloud/docker/issues/4025

Version-Release number of selected component (if applicable):
$ docker version
Client version: 0.11.1-dev
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 02d20af/0.11.1
Server version: 0.11.1-dev
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 02d20af/0.11.1


How reproducible:
Sometimes

Steps to Reproduce:
1. Build or create multiple images
2. Attempt to remove the images, removing all dependent cartridges
3.

Actual results:
Still unable to delete image after all dependent cartridges are removed:

$ docker rmi fbe51255ac15
Error: No such id: b8c287cf50a1151c53d1b7e6102661b01a54e61c52cd491a70476d242e92ac57

Expected results:
Image removed

Additional info:
This issue has been resolved in numerous ways, such as removing all containers or stopping all running containers.

Comment 2 Daniel Walsh 2014-06-27 14:55:40 UTC
Well lets say that this is fixed in docker-1.0

Comment 5 errata-xmlrpc 2014-09-18 20:45:55 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.

http://rhn.redhat.com/errata/RHBA-2014-1266.html