diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-12-07 11:33:40 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-12-07 11:33:40 -0400 |
commit | 44d369feb1d18f628d9f10feed2cc0e29bac7c8d (patch) | |
tree | f7cda65cf112175c000d5a51149aa1ef12431020 /roles/openshift_node/tasks | |
parent | a3ce4c106304773b6002458dfb113de9fd36efde (diff) | |
download | openshift-44d369feb1d18f628d9f10feed2cc0e29bac7c8d.tar.gz openshift-44d369feb1d18f628d9f10feed2cc0e29bac7c8d.tar.bz2 openshift-44d369feb1d18f628d9f10feed2cc0e29bac7c8d.tar.xz openshift-44d369feb1d18f628d9f10feed2cc0e29bac7c8d.zip |
Pre-pull master/node/ovs images during upgrade.
We did this for install but not upgrade, leading to situations where the
service restarts after upgrade could take much longer than expected as
docker pulls down the new image. Now the images are present when we
restart services and should allow them to come back online much more
quickly, equivalent to rpm service restarts.
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 14 | ||||
-rw-r--r-- | roles/openshift_node/tasks/systemd_units.yml | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 31d07838d..b8d0b6130 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -58,20 +58,6 @@ state: present when: openshift.common.use_openshift_sdn and not openshift.common.is_containerized | bool -- name: 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: 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 the systemd units include: systemd_units.yml diff --git a/roles/openshift_node/tasks/systemd_units.yml b/roles/openshift_node/tasks/systemd_units.yml index f722a6e69..8b669a2c6 100644 --- a/roles/openshift_node/tasks/systemd_units.yml +++ b/roles/openshift_node/tasks/systemd_units.yml @@ -1,6 +1,20 @@ # 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" |