summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-master/restart.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.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.yml')
-rw-r--r--playbooks/common/openshift-master/restart.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml
index 7603f0d61..fa13a64cb 100644
--- a/playbooks/common/openshift-master/restart.yml
+++ b/playbooks/common/openshift-master/restart.yml
@@ -73,6 +73,7 @@
register: active_check_output
when: openshift.master.cluster_method == 'pacemaker'
failed_when: active_check_output.stdout not in ['active', 'inactive']
+ changed_when: false
- set_fact:
is_active: "{{ active_check_output.stdout == 'active' }}"
when: openshift.master.cluster_method == 'pacemaker'
@@ -98,6 +99,18 @@
with_items: "{{ groups.oo_masters_to_config | default([]) }}"
when: (hostvars[item]['current_host'] | default(false)) | bool
+- name: Validate pacemaker cluster
+ hosts: oo_active_masters
+ tasks:
+ - name: Retrieve pcs status
+ command: pcs status
+ register: pcs_status_output
+ changed_when: false
+ - fail:
+ msg: >
+ Pacemaker cluster validation failed. One or more nodes are not online.
+ when: not (pcs_status_output.stdout | validate_pcs_cluster(groups.oo_masters_to_config)) | bool
+
- name: Restart masters
hosts: oo_masters_to_config:!oo_active_masters:!oo_current_masters
vars: