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:
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.
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.
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.
oc new-app cakephp-example, this command will create 172.30.55.28:5000/test/django-example:<none>
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.
Verified and pass, those images with <none> tag was removed.
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