Skip to content

Commit

Permalink
Merge pull request #3009 from dgoodwin/remove-pre-pulling
Browse files Browse the repository at this point in the history
Revert "Pre-pull master/node/ovs images during upgrade."
  • Loading branch information
sdodson authored Dec 22, 2016
2 parents 5ab811e + 3ea29ec commit 383fb65
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
7 changes: 7 additions & 0 deletions roles/openshift_master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }} state=present"
when: not openshift.common.is_containerized | bool

- name: 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

- name: Create openshift.common.data_dir
file:
path: "{{ openshift.common.data_dir }}"
Expand Down
8 changes: 0 additions & 8 deletions roles/openshift_master/tasks/systemd_units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
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:
Expand Down
14 changes: 14 additions & 0 deletions roles/openshift_node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@
action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version | oo_image_tag_to_rpm_version(include_dash=True) }} 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

Expand Down
14 changes: 0 additions & 14 deletions roles/openshift_node/tasks/systemd_units.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,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"
Expand Down

0 comments on commit 383fb65

Please sign in to comment.