Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1351406 - nuke_images.sh can't remove image whose name or tag is <none>
nuke_images.sh can't remove image whose name or tag is <none>
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
3.2.1
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Devan Goodwin
Anping Li
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-29 23:19 EDT by Anping Li
Modified: 2017-03-08 13 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously a bug in a script which cleans out all pre-existing images and containers during a Docker 1.10 upgrade would cause the script to miss some images with name and tag "none", potentially resulting in a slower or failed Docker upgrade. This script has been updated to use a more robust method of cleanup which also catches orphaned images.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:39:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description Anping Li 2016-06-29 23:19:53 EDT
Description of problem:
nuke_images.sh can't remove images whose name or tag is <none>.

#docker images

172.30.88.61:5000/cakephp-mysql-example/cakephp-mysql-example          <none>              a692aced3630        36 minutes ago      509.2 MB
<none>                                                                 <none>              ee3b177d0a43        58 minutes ago      509.2 MB


Version-Release number of selected component (if applicable):
openshift-ansible-3.2.8-1.git.0.211fa3f.el7.noarch

How reproducible:
always

Steps to Reproduce:
1) install atomic-openshift-utils and copy /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh to openshift hosts
2) run nuke_images.sh

Actual results:
+ docker rmi REPOSITORY:TAG '172.30.88.61:5000/cakephp-mysql-example/cakephp-mysql-example:<none>' '<none>:<none>' '<none>:<none>' '172.30.88.61:5000/cakephpmysql/cakephp-mysql-example:<none>' virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/ose-pod:v3.2.1.1 virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/node:v3.2.1.1 virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/ose:v3.2.1.1 virt-openshift-05.lab.eng.nay.redhat.com:5000/openshift3/openvswitch:v3.2.1.1


Expected results:


Additional info:
Comment 1 Anping Li 2016-07-22 04:22:22 EDT
Still can't remove image '172.30.55.28:5000/test/django-example:<none>'.

[root@host4node ~]# docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
172.30.55.28:5000/test/django-example   <none>              41948e00ba1e        47 hours ago        516.5 MB


[root@host4node ~]# sh nuke_images.sh docker
++ docker ps -q
+ running_container_ids=
+ test -n ''
++ docker ps -a -q
+ container_ids=
+ test -n ''
++ docker images -q
+ image_ids=41948e00ba1e
+ test -n 41948e00ba1e
++ docker images
++ grep '/\|/ \|  \| \|-\|_'
++ awk '{print $1 ":" $2}'
+ docker rmi REPOSITORY:TAG '172.30.55.28:5000/test/django-example:<none>'
+ echo 'No images matching "" left to purge.'
No images matching "" left to purge.
Comment 2 Devan Goodwin 2016-07-22 14:29:03 EDT
This script is a real pain to get correct. The problem is quite low priority so I'm going to set this aside for now. Worst case scenario these images will get auto upgraded.
Comment 3 Devan Goodwin 2016-07-22 15:04:55 EDT
Anping let me know if you have a good reproducer for getting a <none>:<none> orphaned image, I can't quite seem to do it.
Comment 4 Anping Li 2016-07-24 19:26:08 EDT
oc new-app cakephp-example, this command will create 172.30.55.28:5000/test/django-example:<none>
Comment 5 Devan Goodwin 2016-08-15 09:15:02 EDT
I think this could be considered fixed now, however I can't fully guarantee nuke_images.sh will get everything, Docker has been quite fussy about what it will delete and sometimes just outright breaks. However the new changes arrived in:

https://github.com/openshift/openshift-ansible/pull/2285

You can see all the details in there but I think the new method of clearing out images might be more reliable, and should get these none/none orphans. This should be built with openshift-ansible-3.3.10-1 so I will move to ON_QA.
Comment 6 Anping Li 2016-08-16 02:15:01 EDT
Verified and pass, those images with <none> tag was removed.
Comment 8 errata-xmlrpc 2016-09-27 05:39:02 EDT
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:1933

Note You need to log in before you can comment on or make changes to this bug.