Merge "Fix bashate E002 violations"
This commit is contained in:
commit
076ae60516
@ -314,7 +314,8 @@ nova_validate() {
|
|||||||
|
|
||||||
if [ -n "${OCF_RESKEY_endpoint_type}" ]; then
|
if [ -n "${OCF_RESKEY_endpoint_type}" ]; then
|
||||||
case ${OCF_RESKEY_endpoint_type} in
|
case ${OCF_RESKEY_endpoint_type} in
|
||||||
adminURL|publicURL|internalURL) ;;
|
adminURL|publicURL|internalURL)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
ocf_exit_reason "endpoint_type ${OCF_RESKEY_endpoint_type} not valid. Use adminURL or publicURL or internalURL"
|
ocf_exit_reason "endpoint_type ${OCF_RESKEY_endpoint_type} not valid. Use adminURL or publicURL or internalURL"
|
||||||
exit $OCF_ERR_CONFIGURED
|
exit $OCF_ERR_CONFIGURED
|
||||||
@ -359,21 +360,36 @@ nova_validate() {
|
|||||||
|
|
||||||
: ${OCF_RESKEY_evacuation_delay=120}
|
: ${OCF_RESKEY_evacuation_delay=120}
|
||||||
case $__OCF_ACTION in
|
case $__OCF_ACTION in
|
||||||
meta-data) meta_data
|
meta-data)
|
||||||
|
meta_data
|
||||||
exit $OCF_SUCCESS
|
exit $OCF_SUCCESS
|
||||||
;;
|
;;
|
||||||
usage|help) nova_usage
|
usage|help)
|
||||||
|
nova_usage
|
||||||
exit $OCF_SUCCESS
|
exit $OCF_SUCCESS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $__OCF_ACTION in
|
case $__OCF_ACTION in
|
||||||
start) nova_validate; nova_start;;
|
start)
|
||||||
stop) nova_stop;;
|
nova_validate
|
||||||
monitor) nova_validate; nova_monitor;;
|
nova_start
|
||||||
notify) nova_notify;;
|
;;
|
||||||
validate-all) exit $OCF_SUCCESS;;
|
stop)
|
||||||
*) nova_usage
|
nova_stop
|
||||||
|
;;
|
||||||
|
monitor)
|
||||||
|
nova_validate
|
||||||
|
nova_monitor
|
||||||
|
;;
|
||||||
|
notify)
|
||||||
|
nova_notify
|
||||||
|
;;
|
||||||
|
validate-all)
|
||||||
|
exit $OCF_SUCCESS
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
nova_usage
|
||||||
exit $OCF_ERR_UNIMPLEMENTED
|
exit $OCF_ERR_UNIMPLEMENTED
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -184,9 +184,13 @@ handle_evacuations() {
|
|||||||
need_evacuate=0
|
need_evacuate=0
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
"") ;;
|
"")
|
||||||
no) ocf_log debug "$node is either fine or already handled";;
|
;;
|
||||||
yes) need_evacuate=1;;
|
no)
|
||||||
|
ocf_log debug "$node is either fine or already handled"
|
||||||
|
;;
|
||||||
|
yes) need_evacuate=1
|
||||||
|
;;
|
||||||
*@*)
|
*@*)
|
||||||
where=$(echo $state | awk -F@ '{print $1}')
|
where=$(echo $state | awk -F@ '{print $1}')
|
||||||
when=$(echo $state | awk -F@ '{print $2}')
|
when=$(echo $state | awk -F@ '{print $2}')
|
||||||
@ -321,7 +325,8 @@ evacuate_validate() {
|
|||||||
|
|
||||||
if [ -n "${OCF_RESKEY_endpoint_type}" ]; then
|
if [ -n "${OCF_RESKEY_endpoint_type}" ]; then
|
||||||
case ${OCF_RESKEY_endpoint_type} in
|
case ${OCF_RESKEY_endpoint_type} in
|
||||||
adminURL|publicURL|internalURL) ;;
|
adminURL|publicURL|internalURL)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
ocf_exit_reason "endpoint_type ${OCF_RESKEY_endpoint_type} not valid. Use adminURL or publicURL or internalURL"
|
ocf_exit_reason "endpoint_type ${OCF_RESKEY_endpoint_type} not valid. Use adminURL or publicURL or internalURL"
|
||||||
exit $OCF_ERR_CONFIGURED
|
exit $OCF_ERR_CONFIGURED
|
||||||
@ -339,17 +344,30 @@ evacuate_validate() {
|
|||||||
statefile="${HA_RSCTMP}/${OCF_RESOURCE_INSTANCE}.active"
|
statefile="${HA_RSCTMP}/${OCF_RESOURCE_INSTANCE}.active"
|
||||||
|
|
||||||
case $__OCF_ACTION in
|
case $__OCF_ACTION in
|
||||||
start) evacuate_validate; evacuate_start;;
|
start)
|
||||||
stop) evacuate_stop;;
|
evacuate_validate
|
||||||
monitor) evacuate_validate; evacuate_monitor;;
|
evacuate_start
|
||||||
meta-data) meta_data
|
;;
|
||||||
|
stop)
|
||||||
|
evacuate_stop
|
||||||
|
;;
|
||||||
|
monitor)
|
||||||
|
evacuate_validate
|
||||||
|
evacuate_monitor
|
||||||
|
;;
|
||||||
|
meta-data)
|
||||||
|
meta_data
|
||||||
exit $OCF_SUCCESS
|
exit $OCF_SUCCESS
|
||||||
;;
|
;;
|
||||||
usage|help) evacuate_usage
|
usage|help)
|
||||||
|
evacuate_usage
|
||||||
exit $OCF_SUCCESS
|
exit $OCF_SUCCESS
|
||||||
;;
|
;;
|
||||||
validate-all) exit $OCF_SUCCESS;;
|
validate-all)
|
||||||
*) evacuate_usage
|
exit $OCF_SUCCESS
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
evacuate_usage
|
||||||
exit $OCF_ERR_UNIMPLEMENTED
|
exit $OCF_ERR_UNIMPLEMENTED
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user