summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades/docker
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-08-11 11:30:19 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-08-11 11:30:19 -0300
commitb89c835e3235f2628b37de15713c311d1b5a4bad (patch)
tree5f067223dc672b7d066c836f45ad6fae1d5e36a2 /playbooks/common/openshift-cluster/upgrades/docker
parentf67fcebdf7dde847c39b0ed450ce7267f2945ebe (diff)
downloadopenshift-b89c835e3235f2628b37de15713c311d1b5a4bad.tar.gz
openshift-b89c835e3235f2628b37de15713c311d1b5a4bad.tar.bz2
openshift-b89c835e3235f2628b37de15713c311d1b5a4bad.tar.xz
openshift-b89c835e3235f2628b37de15713c311d1b5a4bad.zip
Improvements for Docker 1.10+ upgrade image nuking.
In a parallel step prior to real upgrade tasks, clear out all unused Docker images on all hosts. This should be relatively safe to interrupt as no real upgrade steps have taken place. Once into actual upgrade, we again clear all images only this time with force, and after stopping and removing all containers. Both rmi commands use a new and hopefully less error prone command to do the removal, this should avoid missed orphans as we were hitting before. Added some logging around the current image count before and after this step, most of them are only printed if we're crossing the 1.10 boundary but one does not, just for additional information in your ansible log.
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/docker')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
index 5fa4b7355..03e7b844c 100644
--- a/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/docker/upgrade.yml
@@ -13,11 +13,25 @@
failed_when: false
when: openshift.common.is_containerized | bool
+- name: Check Docker image count
+ shell: "docker images -aq | wc -l"
+ register: docker_image_count
+
+- debug: var=docker_image_count.stdout
+
- name: Remove all containers and images
script: nuke_images.sh docker
register: nuke_images_result
when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool
+- name: Check Docker image count
+ shell: "docker images -aq | wc -l"
+ register: docker_image_count
+ when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool
+
+- debug: var=docker_image_count.stdout
+ when: docker_upgrade_nuke_images is defined and docker_upgrade_nuke_images | bool
+
- service: name=docker state=stopped
- name: Upgrade Docker