From 44d369feb1d18f628d9f10feed2cc0e29bac7c8d Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 7 Dec 2016 11:33:40 -0400 Subject: 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. --- roles/openshift_master/tasks/systemd_units.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'roles/openshift_master/tasks/systemd_units.yml') diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml index 11e010716..e2b722abd 100644 --- a/roles/openshift_master/tasks/systemd_units.yml +++ b/roles/openshift_master/tasks/systemd_units.yml @@ -13,6 +13,14 @@ ha_svc_template_path: "docker-cluster" when: openshift.common.is_containerized | bool +# This is the image used for both HA and non-HA clusters: +- name: Pre-pull master image + command: > + docker pull {{ openshift.master.master_image }}:{{ openshift_image_tag }} + register: pull_result + changed_when: "'Downloaded newer image' in pull_result.stdout" + when: openshift.common.is_containerized | bool + # workaround for missing systemd unit files - name: Create the systemd unit files template: -- cgit v1.2.1