diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-12-13 11:53:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 11:53:14 -0800 |
commit | f22cd5d64bf3ca18f91a564545e5bd916dc56764 (patch) | |
tree | ea987c0e3294297b65ab5fb0174d4df932cb401d /roles/openshift_node/tasks/upgrade/stop_services.yml | |
parent | 60b4ff05093602811b1031b59436322ff5719a45 (diff) | |
parent | 504930b1915c2b6329c1f68f23b1188beaabcbe9 (diff) | |
download | openshift-f22cd5d64bf3ca18f91a564545e5bd916dc56764.tar.gz openshift-f22cd5d64bf3ca18f91a564545e5bd916dc56764.tar.bz2 openshift-f22cd5d64bf3ca18f91a564545e5bd916dc56764.tar.xz openshift-f22cd5d64bf3ca18f91a564545e5bd916dc56764.zip |
Merge pull request #6415 from mgugino-upstream-stage/crt-upgrades-pt2
Automatic merge from submit-queue.
Crt upgrades pt2
Refactor node upgrade to include less serial tasks
This commit moves the pulling of images, packages,
and updating config files into a non-serialized play.
The serialized play is now in charge of marking unschedulable,
draining, stopping and restarting services, and marking
schedulable.
If rpm install / container download takes 60s per host,
this will save 3 hours and 10 minutes at 200 hosts per cluster
and forks of 20 hosts.
Diffstat (limited to 'roles/openshift_node/tasks/upgrade/stop_services.yml')
-rw-r--r-- | roles/openshift_node/tasks/upgrade/stop_services.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/upgrade/stop_services.yml b/roles/openshift_node/tasks/upgrade/stop_services.yml new file mode 100644 index 000000000..bbf1c5f25 --- /dev/null +++ b/roles/openshift_node/tasks/upgrade/stop_services.yml @@ -0,0 +1,43 @@ +--- +- name: Stop node and openvswitch services + service: + name: "{{ item }}" + state: stopped + with_items: + - "{{ openshift_service_type }}-node" + - openvswitch + failed_when: false + +- name: Ensure containerized services stopped before Docker restart + service: + name: "{{ item }}" + state: stopped + with_items: + - etcd_container + - openvswitch + - "{{ openshift_service_type }}-master-api" + - "{{ openshift_service_type }}-master-controllers" + - "{{ openshift_service_type }}-node" + failed_when: false + when: openshift.common.is_containerized | bool + +- service: + name: docker + state: stopped + register: l_openshift_node_upgrade_docker_stop_result + until: not l_openshift_node_upgrade_docker_stop_result | failed + retries: 3 + delay: 30 + when: + - l_docker_upgrade is defined + - l_docker_upgrade | bool + +- name: Stop rpm based services + service: + name: "{{ item }}" + state: stopped + with_items: + - "{{ openshift_service_type }}-node" + - openvswitch + failed_when: false + when: not openshift.common.is_containerized | bool |