diff options
author | Vadim Rutkovsky <vrutkovs@redhat.com> | 2018-01-31 17:31:08 +0100 |
---|---|---|
committer | Vadim Rutkovsky <vrutkovs@redhat.com> | 2018-01-31 19:29:03 +0100 |
commit | 0fad99cb1c15212ddf6eb6d3862b4ded0b614166 (patch) | |
tree | edc104744058a074573fb83d97eb3b4931c62f33 /playbooks | |
parent | 6f7d06beeaccedc31e8505dcb1db9e633ed4223e (diff) | |
download | openshift-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')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 6 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/v3_9/upgrade_control_plane.yml | 14 |
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 |