diff options
author | Raoul Scarazzini <rscarazz@redhat.com> | 2016-04-01 15:52:33 +0200 |
---|---|---|
committer | Giulio Fidente <gfidente@redhat.com> | 2016-04-04 10:41:37 +0200 |
commit | 05b2a200ca2adc5b34bc1460d350f25f1fc18bbe (patch) | |
tree | 0cac771651c05f08e0070601def83a984c6ce6b7 /extraconfig/tasks | |
parent | 4e862ccee2b4afbb3c8b2265217f408a2d503af7 (diff) |
Filter for local nodes in check_resource function
While having extra customizations inside a TripleO deployed
Pacemaker environment, say you have instance HA with
pacemaker_remoted or you need to configure an external arbitrator
for something, then the status of the resources for remote nodes
is "Stopped".
This leads to failures while, for example, scaling up.
This fixes the way status is checked, filtering just local nodes.
Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
Change-Id: I8dc25f5d7031c265858afd5a266fda5315ae37a0
Diffstat (limited to 'extraconfig/tasks')
-rwxr-xr-x | extraconfig/tasks/pacemaker_common_functions.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh index 0808763e..7d794c97 100755 --- a/extraconfig/tasks/pacemaker_common_functions.sh +++ b/extraconfig/tasks/pacemaker_common_functions.sh @@ -19,8 +19,9 @@ function check_resource { match_for_incomplete='Stopped' fi + nodes_local=$(pcs status | grep ^Online | sed 's/.*\[ \(.*\) \]/\1/g' | sed 's/ /\|/g') if timeout -k 10 $timeout crm_resource --wait; then - node_states=$(pcs status --full | grep "$service" | grep -v Clone) + node_states=$(pcs status --full | grep "$service" | grep -v Clone | { egrep "$nodes_local" || true; } ) if echo "$node_states" | grep -q "$match_for_incomplete"; then echo_error "ERROR: cluster finished transition but $service was not in $state state, exiting." exit 1 |