5 function check_resource {
7 if [ "$#" -ne 3 ]; then
8 echo_error "ERROR: check_resource function expects 3 parameters, $# given"
16 if [ "$state" = "stopped" ]; then
17 match_for_incomplete='Started'
19 match_for_incomplete='Stopped'
22 if timeout -k 10 $timeout crm_resource --wait; then
23 node_states=$(pcs status --full | grep "$service" | grep -v Clone)
24 if echo "$node_states" | grep -q "$match_for_incomplete"; then
25 echo_error "ERROR: cluster finished transition but $service was not in $state state, exiting."
28 echo "$service has $state"
31 echo_error "ERROR: cluster remained unstable for more than $timeout seconds, exiting."
38 echo "$@" | tee /dev/fd2
41 function systemctl_swift {
43 for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \
44 openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \
45 openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do