diff options
author | Andrew Butcher <abutcher@redhat.com> | 2016-01-22 11:08:11 -0500 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-01-22 11:08:11 -0500 |
commit | bead60a6502f37ff0f733123fb137709b7976aaa (patch) | |
tree | 31d87dff5e391ddbdcc37f5673bf8662db0797ff /playbooks/common/openshift-master/restart.yml | |
parent | 74b73d3c83165e45398af8b60eeb25f9d11dd13c (diff) | |
download | openshift-bead60a6502f37ff0f733123fb137709b7976aaa.tar.gz openshift-bead60a6502f37ff0f733123fb137709b7976aaa.tar.bz2 openshift-bead60a6502f37ff0f733123fb137709b7976aaa.tar.xz openshift-bead60a6502f37ff0f733123fb137709b7976aaa.zip |
Fail when master restart playbook finds no active masters rather than any failed masters.
Diffstat (limited to 'playbooks/common/openshift-master/restart.yml')
-rw-r--r-- | playbooks/common/openshift-master/restart.yml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml index 052892863..02449e40d 100644 --- a/playbooks/common/openshift-master/restart.yml +++ b/playbooks/common/openshift-master/restart.yml @@ -77,13 +77,6 @@ when: openshift.master.cluster_method | default(None) == 'pacemaker' 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' @@ -92,6 +85,13 @@ hosts: localhost become: no tasks: + - fail: + msg: > + Did not receive active status from any masters. Please verify pacemaker cluster. + when: "{{ hostvars[groups.oo_first_master.0].openshift.master.cluster_method | default(None) == 'pacemaker' and 'True' not in (hostvars + | oo_select_keys(groups['oo_masters_to_config']) + | oo_collect('is_active') + | list) }}" - name: Evaluate oo_active_masters add_host: name: "{{ item }}" |