summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-master
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-01-18 13:32:47 -0500
committerAndrew Butcher <abutcher@redhat.com>2016-01-18 13:35:54 -0500
commit29594da3ab999bd2f3869959d16d215468c050f5 (patch)
tree2b587a006bc8e330e107d5a8c632cb6f6bd207c5 /playbooks/common/openshift-master
parent18e639f0249dba701e9f6c9bc4545db15927806d (diff)
downloadopenshift-29594da3ab999bd2f3869959d16d215468c050f5.tar.gz
openshift-29594da3ab999bd2f3869959d16d215468c050f5.tar.bz2
openshift-29594da3ab999bd2f3869959d16d215468c050f5.tar.xz
openshift-29594da3ab999bd2f3869959d16d215468c050f5.zip
Improve pacemaker 'is-active' check.
Diffstat (limited to 'playbooks/common/openshift-master')
-rw-r--r--playbooks/common/openshift-master/restart.yml10
1 files changed, 9 insertions, 1 deletions
diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml
index d9d857b1a..052892863 100644
--- a/playbooks/common/openshift-master/restart.yml
+++ b/playbooks/common/openshift-master/restart.yml
@@ -68,14 +68,22 @@
- name: Determine which masters are currently active
hosts: oo_masters_to_config
+ any_errors_fatal: true
tasks:
- name: Check master service status
command: >
systemctl is-active {{ openshift.common.service_type }}-master
register: active_check_output
when: openshift.master.cluster_method | default(None) == 'pacemaker'
- failed_when: active_check_output.stdout not in ['active', 'inactive', 'unknown']
+ failed_when: false
changed_when: false
+ # Any master which did not report 'active' or 'inactive' is likely
+ # unhealthy. Other possible states are 'unknown' or 'failed'.
+ - fail:
+ msg: >
+ Got invalid service state from {{ openshift.common.service_type }}-master
+ on {{ inventory_hostname }}. Please verify pacemaker cluster.
+ when: openshift.master.cluster_method | default(None) == 'pacemaker' and active_check_output.stdout not in ['active', 'inactive']
- set_fact:
is_active: "{{ active_check_output.stdout == 'active' }}"
when: openshift.master.cluster_method | default(None) == 'pacemaker'