Bug 1118585

Summary: [geard]Failed to remove the extra untagged image for incremental build when related container existing
Product: OKD Reporter: chunchen <chunchen>
Component: ContainersAssignee: Clayton Coleman <ccoleman>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, mmccomas, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-07 16:51:30 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:

Description chunchen 2014-07-11 06:06:52 UTC
Description of problem:
It's failed to remove the extra untagged image for incremental build when related container existing.

Version-Release number of selected component (if applicable):
fedora20_x86_64
latest gear built(gear version alpha3, build a91156f)

How reproducible:
always

Steps to Reproduce:
1. Do the 'clean' build
gear build git://github.com/chunyunchen/sinatra-app-example openshift/ruby-19-centos testapp1

2. Run a container with image at step 1 and check docker container
docker run testapp1 /bin/bash
docker ps -a

3. Do a Incremental build with --rm option
gear build git://github.com/chunyunchen/sinatra-app-example openshift/ruby-19-centos testapp1 --rm

Actual results:
at step 2:
CONTAINER ID          IMAGE           COMMAND      CREATED               STATUS                  PORTS           NAMES     
e9238fc4e8f3          7ef3f917c665    /bin/bash    About a minute ago      Exited (0) About a minute ago           evil_bohr  

at step 3:
Downloading git://github.com/chunyunchen/sinatra-app-example to directory /tmp/sti920197169/src
Cloning into '/tmp/sti920197169/src'...
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 65 (delta 16), reused 65 (delta 16)
Receiving objects: 100% (65/65), 7.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (16/16), done.
Checking connectivity... done.
Existing image for tag testapp1 detected for incremental build.
---> Saving build-artifacts
Restoring build artifacts
---> Installing application source
---> Building your Ruby application from source
---> Running 'bundle install --deployment'
Using rack (1.5.2) 
Using puma (2.8.1) 
Using rack-protection (1.5.2) 
Using tilt (1.4.1) 
Using sinatra (1.4.4) 
Using bundler (1.1.4) 
Your bundle is complete! It was installed into /opt/ruby/bundle
---> Cleaning up unused ruby gems
Removing previously-tagged image 7ef3f917c6652f05668fe1e55c52b3d7eed294d30e6e12546a8d895158f46caf
Unable to remove previous image: API error (409): Conflict, cannot delete 7ef3f917c665 because the container e9238fc4e8f3 is using it, use -f to force

An error occured: API error (409): Conflict, cannot delete 7ef3f917c665 because the container e9238fc4e8f3 is using it, use -f to force
     
Expected results:
Should remove the extra untagged image for incremental build when related container existing successfully.

Additional info: