summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-master/restart_hosts.yml
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-01-12 16:39:06 -0500
committerAndrew Butcher <abutcher@redhat.com>2016-01-12 16:39:06 -0500
commit97be5890e2a34036a22d2d1e2586c83009ae6064 (patch)
treec52d7a106680601fec959154a7a80fae5f4735b9 /playbooks/common/openshift-master/restart_hosts.yml
parentf9aaa8ac13adf841823f35be594641bdc2ebecac (diff)
downloadopenshift-97be5890e2a34036a22d2d1e2586c83009ae6064.tar.gz
openshift-97be5890e2a34036a22d2d1e2586c83009ae6064.tar.bz2
openshift-97be5890e2a34036a22d2d1e2586c83009ae6064.tar.xz
openshift-97be5890e2a34036a22d2d1e2586c83009ae6064.zip
Validate pacemaker cluster members.
Diffstat (limited to 'playbooks/common/openshift-master/restart_hosts.yml')
-rw-r--r--playbooks/common/openshift-master/restart_hosts.yml15
1 files changed, 13 insertions, 2 deletions
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/common/openshift-master/restart_hosts.yml
index 598e1ad63..ff206f5a2 100644
--- a/playbooks/common/openshift-master/restart_hosts.yml
+++ b/playbooks/common/openshift-master/restart_hosts.yml
@@ -16,8 +16,6 @@
delay=10
port="{{ openshift.master.api_port }}"
when: openshift.master.cluster_method != 'pacemaker'
-# When cluster_method is pacemaker we can only ensure that the host
-# restarted successfully.
- name: Wait for master to start
become: no
local_action:
@@ -25,4 +23,17 @@
host="{{ inventory_hostname }}"
state=started
delay=10
+ port=22
when: openshift.master.cluster_method == 'pacemaker'
+- name: Wait for master to become available
+ command: pcs status
+ register: pcs_status_output
+ until: pcs_status_output.stdout | validate_pcs_cluster([inventory_hostname]) | bool
+ retries: 15
+ delay: 2
+ changed_when: false
+ when: openshift.master.cluster_method == 'pacemaker'
+- fail:
+ msg: >
+ Pacemaker cluster validation failed {{ inventory hostname }} is not online.
+ when: openshift.master.cluster_method == 'pacemaker' and not (pcs_status_output.stdout | validate_pcs_cluster([inventory_hostname])) | bool