summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2018-01-25 13:25:49 -0500
committerMichael Gugino <mgugino@redhat.com>2018-01-25 13:25:49 -0500
commit4f7d963986a1e28ecc6abd15532b0c1aece99be1 (patch)
tree6b405ee61567f27344f37ee6be6a01097cbab8da /roles/openshift_master/tasks
parent6c921b0877c38c2a6e55cd5852a740ec88fde8fb (diff)
downloadopenshift-4f7d963986a1e28ecc6abd15532b0c1aece99be1.tar.gz
openshift-4f7d963986a1e28ecc6abd15532b0c1aece99be1.tar.bz2
openshift-4f7d963986a1e28ecc6abd15532b0c1aece99be1.tar.xz
openshift-4f7d963986a1e28ecc6abd15532b0c1aece99be1.zip
Remove master_ha bool checks
Most of these checks are no longer applicable to the tasks on which they are applied. This commit removes incorrect ha checks to ensure services are restarted at appropriate times. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1500897
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r--roles/openshift_master/tasks/main.yml2
-rw-r--r--roles/openshift_master/tasks/restart.yml17
2 files changed, 8 insertions, 11 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index b12a6b346..41f2ee2a5 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -227,7 +227,7 @@
- pause:
seconds: 15
when:
- - openshift.master.ha | bool
+ - openshift_master_ha | bool
- name: Start and enable master api all masters
systemd:
diff --git a/roles/openshift_master/tasks/restart.yml b/roles/openshift_master/tasks/restart.yml
index 715347101..f7697067a 100644
--- a/roles/openshift_master/tasks/restart.yml
+++ b/roles/openshift_master/tasks/restart.yml
@@ -3,7 +3,6 @@
service:
name: "{{ openshift_service_type }}-master-api"
state: restarted
- when: openshift_master_ha | bool
- name: Wait for master API to come back online
wait_for:
host: "{{ openshift.common.hostname }}"
@@ -11,12 +10,10 @@
delay: 10
port: "{{ openshift.master.api_port }}"
timeout: 600
- when: openshift_master_ha | bool
-- name: Restart master controllers
- service:
- name: "{{ openshift_service_type }}-master-controllers"
- state: restarted
- # Ignore errrors since it is possible that type != simple for
- # pre-3.1.1 installations.
- ignore_errors: true
- when: openshift_master_ha | bool
+# We retry the controllers because the API may not be 100% initialized yet.
+- name: restart master controllers
+ command: "systemctl restart {{ openshift_service_type }}-master-controllers"
+ retries: 3
+ delay: 5
+ register: result
+ until: result.rc == 0