diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-04-05 16:14:39 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-04-05 16:14:39 +0000 |
commit | 517f6b27a92fc7a12c0a561d90bde106ef35bf54 (patch) | |
tree | 4cc849b18421cb0825434a855b33b4d4dc3c68da | |
parent | fa24ef5944281bc17e202eab9ecb76e8080fa937 (diff) | |
parent | 05b2a200ca2adc5b34bc1460d350f25f1fc18bbe (diff) |
Merge "Filter for local nodes in check_resource function"
-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 |