summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-10-17 13:58:52 -0400
committerGitHub <noreply@github.com>2017-10-17 13:58:52 -0400
commit8eabfab30f268874af8b555b57f88d1551c75ca6 (patch)
tree7ce454ae39147710e4249d1d77417c309a2cf90f /playbooks/common
parent7a36a31df7b86f56a3d54662a7b27522dc5836ec (diff)
parent8a94e1b2fc7272e2d56b9eb10e39fa4e41bff5ad (diff)
downloadopenshift-8eabfab30f268874af8b555b57f88d1551c75ca6.tar.gz
openshift-8eabfab30f268874af8b555b57f88d1551c75ca6.tar.bz2
openshift-8eabfab30f268874af8b555b57f88d1551c75ca6.tar.xz
openshift-8eabfab30f268874af8b555b57f88d1551c75ca6.zip
Merge pull request #5730 from sdodson/restart-controllers
Restart all controllers to force reconfiguration during upgrade
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml16
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml14
2 files changed, 30 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
index f1ca1edb9..bf3b94682 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml
@@ -119,8 +119,24 @@
tasks:
- include: ../cleanup_unused_images.yml
+#TODO: Why doesn't this compose using ./upgrade_control_plane rather than
+# ../upgrade_control_plane?
- include: ../upgrade_control_plane.yml
+# All controllers must be stopped at the same time then restarted
+- name: Cycle all controller services to force new leader election mode
+ hosts: oo_etcd_to_config
+ gather_facts: no
+ tasks:
+ - name: Stop {{ openshift.common.service_type }}-master-controllers
+ systemd:
+ name: "{{ openshift.common.service_type }}-master-controllers"
+ state: stopped
+ - name: Start {{ openshift.common.service_type }}-master-controllers
+ systemd:
+ name: "{{ openshift.common.service_type }}-master-controllers"
+ state: started
+
- include: ../upgrade_nodes.yml
- include: ../post_control_plane.yml
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
index 6c4f9671b..b91bea617 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
@@ -128,4 +128,18 @@
vars:
master_config_hook: "v3_7/master_config_upgrade.yml"
+# All controllers must be stopped at the same time then restarted
+- name: Cycle all controller services to force new leader election mode
+ hosts: oo_etcd_to_config
+ gather_facts: no
+ tasks:
+ - name: Stop {{ openshift.common.service_type }}-master-controllers
+ systemd:
+ name: "{{ openshift.common.service_type }}-master-controllers"
+ state: stopped
+ - name: Start {{ openshift.common.service_type }}-master-controllers
+ systemd:
+ name: "{{ openshift.common.service_type }}-master-controllers"
+ state: started
+
- include: ../post_control_plane.yml