summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2018-01-31 17:31:08 +0100
committerVadim Rutkovsky <vrutkovs@redhat.com>2018-01-31 19:29:03 +0100
commit0fad99cb1c15212ddf6eb6d3862b4ded0b614166 (patch)
treeedc104744058a074573fb83d97eb3b4931c62f33 /playbooks/common
parent6f7d06beeaccedc31e8505dcb1db9e633ed4223e (diff)
downloadopenshift-0fad99cb1c15212ddf6eb6d3862b4ded0b614166.tar.gz
openshift-0fad99cb1c15212ddf6eb6d3862b4ded0b614166.tar.bz2
openshift-0fad99cb1c15212ddf6eb6d3862b4ded0b614166.tar.xz
openshift-0fad99cb1c15212ddf6eb6d3862b4ded0b614166.zip
Disable master controllers before upgrade and re-enable those when restart mode is system
This removes a start/stop after control plane upgrade
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml6
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml14
2 files changed, 14 insertions, 6 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index a10fd4bee..fdcdb17ff 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -96,6 +96,12 @@
- include_tasks: "{{ openshift_master_upgrade_hook }}"
when: openshift_master_upgrade_hook is defined
+ - name: Disable master controller
+ service:
+ name: "{{ openshift_service_type }}-master-controllers"
+ enabled: false
+ when: openshift.common.rolling_restart_mode == 'system'
+
- include_tasks: ../../../openshift-master/private/tasks/restart_hosts.yml
when: openshift.common.rolling_restart_mode == 'system'
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml
index fe1fdefff..d7441290d 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml
@@ -123,14 +123,16 @@
roles:
- role: openshift_facts
tasks:
- - name: Stop {{ openshift_service_type }}-master-controllers
- systemd:
+ - name: Restart master controllers to force new leader election mode
+ service:
name: "{{ openshift_service_type }}-master-controllers"
- state: stopped
- - name: Start {{ openshift_service_type }}-master-controllers
- systemd:
+ state: restart
+ when: openshift.common.rolling_restart_mode == 'service'
+ - name: Re-enable master controllers to force new leader election mode
+ service:
name: "{{ openshift_service_type }}-master-controllers"
- state: started
+ enabled: true
+ when: openshift.common.rolling_restart_mode == 'system'
- import_playbook: ../post_control_plane.yml