diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-07-03 14:56:18 +0200 |
---|---|---|
committer | Jan Chaloupka <jchaloup@redhat.com> | 2017-07-03 14:56:18 +0200 |
commit | b9d9edef5efb7cfb75c8ec2e484f16ad40ac09c7 (patch) | |
tree | 94c6d7fea28a92840bb79bd93b9802a13a11b92b /roles | |
parent | 0d0f54af3a02cd0e228210dfae95806d4e644c3b (diff) | |
download | openshift-b9d9edef5efb7cfb75c8ec2e484f16ad40ac09c7.tar.gz openshift-b9d9edef5efb7cfb75c8ec2e484f16ad40ac09c7.tar.bz2 openshift-b9d9edef5efb7cfb75c8ec2e484f16ad40ac09c7.tar.xz openshift-b9d9edef5efb7cfb75c8ec2e484f16ad40ac09c7.zip |
pre-pull images before stopping docker
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_node_upgrade/tasks/main.yml | 14 | ||||
-rw-r--r-- | roles/openshift_node_upgrade/tasks/systemd_units.yml | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/roles/openshift_node_upgrade/tasks/main.yml b/roles/openshift_node_upgrade/tasks/main.yml index 9807aa9a3..ac9ea32cb 100644 --- a/roles/openshift_node_upgrade/tasks/main.yml +++ b/roles/openshift_node_upgrade/tasks/main.yml @@ -31,6 +31,20 @@ failed_when: false when: openshift.common.is_containerized | bool +- name: Pre-pull node image + command: > + docker pull {{ openshift.node.node_image }}:{{ openshift_image_tag }} + register: pull_result + changed_when: "'Downloaded newer image' in pull_result.stdout" + when: openshift.common.is_containerized | bool + +- name: Pre-pull openvswitch image + command: > + docker pull {{ openshift.node.ovs_image }}:{{ openshift_image_tag }} + register: pull_result + changed_when: "'Downloaded newer image' in pull_result.stdout" + when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool + - include: docker/upgrade.yml vars: # We will restart Docker ourselves after everything is ready: diff --git a/roles/openshift_node_upgrade/tasks/systemd_units.yml b/roles/openshift_node_upgrade/tasks/systemd_units.yml index 862cd19c4..e8f017445 100644 --- a/roles/openshift_node_upgrade/tasks/systemd_units.yml +++ b/roles/openshift_node_upgrade/tasks/systemd_units.yml @@ -18,21 +18,6 @@ # This file is included both in the openshift_master role and in the upgrade # playbooks. - -- name: Pre-pull node image - command: > - docker pull {{ openshift.node.node_image }}:{{ openshift_image_tag }} - register: pull_result - changed_when: "'Downloaded newer image' in pull_result.stdout" - when: openshift.common.is_containerized | bool - -- name: Pre-pull openvswitch image - command: > - docker pull {{ openshift.node.ovs_image }}:{{ openshift_image_tag }} - register: pull_result - changed_when: "'Downloaded newer image' in pull_result.stdout" - when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool - - name: Install Node dependencies docker service file template: dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node-dep.service" |