Merge "Filter for local nodes in check_resource function"
This commit is contained in:
commit
517f6b27a9
@ -19,8 +19,9 @@ function check_resource {
|
|||||||
match_for_incomplete='Stopped'
|
match_for_incomplete='Stopped'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
nodes_local=$(pcs status | grep ^Online | sed 's/.*\[ \(.*\) \]/\1/g' | sed 's/ /\|/g')
|
||||||
if timeout -k 10 $timeout crm_resource --wait; then
|
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
|
if echo "$node_states" | grep -q "$match_for_incomplete"; then
|
||||||
echo_error "ERROR: cluster finished transition but $service was not in $state state, exiting."
|
echo_error "ERROR: cluster finished transition but $service was not in $state state, exiting."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user