Fix bashate E003 violations
This commit fixes bashate E003 (indents are a multiple of 4 spaces) violations in the OCF scripts. Partial-Bug: #1550203 Change-Id: I6fbc935bd5f9b383ca97c45f2dd89d7d33a5780f Signed-off-by: Norbert Illes <norbert.e.illes@ericsson.com>
This commit is contained in:
parent
076ae60516
commit
173a77cec8
@ -250,7 +250,7 @@ ceilometer_agent_central_start() {
|
||||
# run the actual ceilometer-agent-central daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
while true; do
|
||||
@ -310,7 +310,7 @@ ceilometer_agent_central_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-central) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -324,10 +324,13 @@ ceilometer_agent_central_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -335,11 +338,22 @@ ceilometer_agent_central_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) ceilometer_agent_central_start;;
|
||||
stop) ceilometer_agent_central_stop;;
|
||||
status) ceilometer_agent_central_status;;
|
||||
monitor) ceilometer_agent_central_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
ceilometer_agent_central_start
|
||||
;;
|
||||
stop)
|
||||
ceilometer_agent_central_stop
|
||||
;;
|
||||
status)
|
||||
ceilometer_agent_central_status
|
||||
;;
|
||||
monitor)
|
||||
ceilometer_agent_central_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -247,9 +247,9 @@ cinder_api_monitor() {
|
||||
if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
||||
&& [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
||||
token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
||||
@ -275,7 +275,7 @@ cinder_api_start() {
|
||||
# run the actual cinder-api daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -336,7 +336,7 @@ cinder_api_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Cinder API (cinder-api) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -350,10 +350,14 @@ cinder_api_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -361,12 +365,23 @@ cinder_api_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) cinder_api_start;;
|
||||
stop) cinder_api_stop;;
|
||||
status) cinder_api_status;;
|
||||
monitor) cinder_api_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
cinder_api_start
|
||||
;;
|
||||
stop)
|
||||
cinder_api_stop
|
||||
;;
|
||||
status)
|
||||
cinder_api_status
|
||||
;;
|
||||
monitor)
|
||||
cinder_api_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -250,7 +250,7 @@ cinder_scheduler_start() {
|
||||
# run the actual cinder-schedule daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
while true; do
|
||||
@ -310,7 +310,7 @@ cinder_scheduler_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Cinder Scheduler (cinder-schedule) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -324,10 +324,14 @@ cinder_scheduler_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -335,11 +339,22 @@ cinder_scheduler_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) cinder_scheduler_start;;
|
||||
stop) cinder_scheduler_stop;;
|
||||
status) cinder_scheduler_status;;
|
||||
monitor) cinder_scheduler_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
cinder_scheduler_start
|
||||
;;
|
||||
stop)
|
||||
cinder_scheduler_stop
|
||||
;;
|
||||
status)
|
||||
cinder_scheduler_status
|
||||
;;
|
||||
monitor)
|
||||
cinder_scheduler_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -215,26 +215,26 @@ cinder_volume_monitor() {
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
|
||||
if ocf_is_true "$OCF_RESKEY_multibackend"; then
|
||||
# Grab the child's PIDs
|
||||
for i in `ps -o pid --no-headers --ppid $pid`
|
||||
do
|
||||
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$i" | grep -qs "ESTABLISHED"`
|
||||
# Grab the child's PIDs
|
||||
for i in `ps -o pid --no-headers --ppid $pid`
|
||||
do
|
||||
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$i" | grep -qs "ESTABLISHED"`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
ocf_log err "This child process from Cinder Volume is not connected to the AMQP server: $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Check the connections according to the PID
|
||||
# We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
|
||||
# check the connections according to the PID
|
||||
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
ocf_log err "This child process from Cinder Volume is not connected to the AMQP server: $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Check the connections according to the PID
|
||||
# We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
|
||||
# check the connections according to the PID
|
||||
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Cinder Volume (cinder-volume) monitor succeeded"
|
||||
@ -254,7 +254,7 @@ cinder_volume_start() {
|
||||
# run the actual cinder-volume daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -315,7 +315,7 @@ cinder_volume_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Cinder Volume (cinder-volume) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -329,10 +329,14 @@ cinder_volume_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -340,11 +344,22 @@ cinder_volume_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) cinder_volume_start;;
|
||||
stop) cinder_volume_stop;;
|
||||
status) cinder_volume_status;;
|
||||
monitor) cinder_volume_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
cinder_volume_start
|
||||
;;
|
||||
stop)
|
||||
cinder_volume_stop
|
||||
;;
|
||||
status)
|
||||
cinder_volume_status
|
||||
;;
|
||||
monitor)
|
||||
cinder_volume_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -268,7 +268,7 @@ glance_api_start() {
|
||||
# run the actual glance-api daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -329,7 +329,7 @@ glance_api_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack ImageService (glance-api) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -343,10 +343,14 @@ glance_api_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -354,11 +358,22 @@ glance_api_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) glance_api_start;;
|
||||
stop) glance_api_stop;;
|
||||
status) glance_api_status;;
|
||||
monitor) glance_api_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
glance_api_start
|
||||
;;
|
||||
stop)
|
||||
glance_api_stop
|
||||
;;
|
||||
status)
|
||||
glance_api_status
|
||||
;;
|
||||
monitor)
|
||||
glance_api_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -249,9 +249,9 @@ glance_registry_monitor() {
|
||||
if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
||||
&& [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
||||
token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
||||
@ -277,7 +277,7 @@ glance_registry_start() {
|
||||
# run the actual glance-registry daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -338,7 +338,7 @@ glance_registry_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack ImageService (glance-registry) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -352,10 +352,14 @@ glance_registry_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -363,11 +367,22 @@ glance_registry_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) glance_registry_start;;
|
||||
stop) glance_registry_stop;;
|
||||
status) glance_registry_status;;
|
||||
monitor) glance_registry_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
glance_registry_start
|
||||
;;
|
||||
stop)
|
||||
glance_registry_stop
|
||||
;;
|
||||
status)
|
||||
glance_registry_status
|
||||
;;
|
||||
monitor)
|
||||
glance_registry_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -260,7 +260,7 @@ heat_engine_start() {
|
||||
# run the actual heat-engine daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
while true; do
|
||||
@ -320,7 +320,7 @@ heat_engine_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Orchestration Engine (heat-engine) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -334,10 +334,14 @@ heat_engine_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -345,11 +349,22 @@ heat_engine_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) heat_engine_start;;
|
||||
stop) heat_engine_stop;;
|
||||
status) heat_engine_status;;
|
||||
monitor) heat_engine_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
heat_engine_start
|
||||
;;
|
||||
stop)
|
||||
heat_engine_stop
|
||||
;;
|
||||
status)
|
||||
heat_engine_status
|
||||
;;
|
||||
monitor)
|
||||
heat_engine_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
41
ocf/keystone
41
ocf/keystone
@ -270,7 +270,7 @@ keystone_start() {
|
||||
# run the actual keystone daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file $OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -331,7 +331,7 @@ keystone_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Identity (Keystone) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -345,10 +345,14 @@ keystone_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -356,11 +360,22 @@ keystone_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) keystone_start;;
|
||||
stop) keystone_stop;;
|
||||
status) keystone_status;;
|
||||
monitor) keystone_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
keystone_start
|
||||
;;
|
||||
stop)
|
||||
keystone_stop
|
||||
;;
|
||||
status)
|
||||
keystone_status
|
||||
;;
|
||||
monitor)
|
||||
keystone_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -241,8 +241,8 @@ neutron_dhcp_agent_start() {
|
||||
# run the actual neutron-dhcp-agent daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
--config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/dhcp-agent.log $OCF_RESKEY_additional_parameters"' >> \
|
||||
/dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
--config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/dhcp-agent.log $OCF_RESKEY_additional_parameters"' >> \
|
||||
/dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -304,7 +304,7 @@ neutron_dhcp_agent_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack DHCP Server (neutron-dhcp-agent) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -318,10 +318,14 @@ neutron_dhcp_agent_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -329,11 +333,22 @@ neutron_dhcp_agent_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) neutron_dhcp_agent_start;;
|
||||
stop) neutron_dhcp_agent_stop;;
|
||||
status) neutron_dhcp_agent_status;;
|
||||
monitor) neutron_dhcp_agent_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
neutron_dhcp_agent_start
|
||||
;;
|
||||
stop)
|
||||
neutron_dhcp_agent_stop
|
||||
;;
|
||||
status)
|
||||
neutron_dhcp_agent_status
|
||||
;;
|
||||
monitor)
|
||||
neutron_dhcp_agent_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -243,8 +243,8 @@ neutron_l3_agent_start() {
|
||||
# run the actual neutron-l3-agent daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
--config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/l3-agent.log $OCF_RESKEY_additional_parameters"' >> \
|
||||
/dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
--config-file=$OCF_RESKEY_plugin_config --log-file=/var/log/neutron/l3-agent.log $OCF_RESKEY_additional_parameters"' >> \
|
||||
/dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -305,7 +305,7 @@ neutron_l3_agent_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack L3 Server (neutron-l3-agent) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -319,10 +319,14 @@ neutron_l3_agent_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -330,11 +334,22 @@ neutron_l3_agent_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) neutron_l3_agent_start;;
|
||||
stop) neutron_l3_agent_stop;;
|
||||
status) neutron_l3_agent_status;;
|
||||
monitor) neutron_l3_agent_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
neutron_l3_agent_start
|
||||
;;
|
||||
stop)
|
||||
neutron_l3_agent_stop
|
||||
;;
|
||||
status)
|
||||
neutron_l3_agent_status
|
||||
;;
|
||||
monitor)
|
||||
neutron_l3_agent_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -230,10 +230,14 @@ neutron_ha_tool_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -250,11 +254,22 @@ fi
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) neutron_ha_tool_start;;
|
||||
stop) neutron_ha_tool_stop;;
|
||||
status) neutron_ha_tool_status;;
|
||||
monitor) neutron_ha_tool_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
neutron_ha_tool_start
|
||||
;;
|
||||
stop)
|
||||
neutron_ha_tool_stop
|
||||
;;
|
||||
status)
|
||||
neutron_ha_tool_status
|
||||
;;
|
||||
monitor)
|
||||
neutron_ha_tool_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -294,7 +294,7 @@ neutron_metadata_agent_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Neutron Metadata Agent (neutron-metadata-agent) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -308,10 +308,14 @@ neutron_metadata_agent_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -319,11 +323,22 @@ neutron_metadata_agent_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) neutron_metadata_agent_start;;
|
||||
stop) neutron_metadata_agent_stop;;
|
||||
status) neutron_metadata_agent_status;;
|
||||
monitor) neutron_metadata_agent_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
neutron_metadata_agent_start
|
||||
;;
|
||||
stop)
|
||||
neutron_metadata_agent_stop
|
||||
;;
|
||||
status)
|
||||
neutron_metadata_agent_status
|
||||
;;
|
||||
monitor)
|
||||
neutron_metadata_agent_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -347,7 +347,7 @@ neutron_server_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Neutron Server (neutron-server) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -361,10 +361,14 @@ neutron_server_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -372,11 +376,22 @@ neutron_server_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) neutron_server_start;;
|
||||
stop) neutron_server_stop;;
|
||||
status) neutron_server_status;;
|
||||
monitor) neutron_server_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
neutron_server_start
|
||||
;;
|
||||
stop)
|
||||
neutron_server_stop
|
||||
;;
|
||||
status)
|
||||
neutron_server_status
|
||||
;;
|
||||
monitor)
|
||||
neutron_server_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
47
ocf/nova-api
47
ocf/nova-api
@ -247,9 +247,9 @@ nova_api_monitor() {
|
||||
if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \
|
||||
&& [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
|
||||
token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
\"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \
|
||||
-H "Content-type: application/json" $OCF_RESKEY_keystone_get_token_url | tr ',' '\n' | grep '"id":' \
|
||||
| cut -d'"' -f4 | head --lines 1`
|
||||
http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then
|
||||
@ -275,7 +275,7 @@ nova_api_start() {
|
||||
# run the actual nova-api daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -336,7 +336,7 @@ nova_api_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova API (nova-api) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -350,10 +350,14 @@ nova_api_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -361,12 +365,23 @@ nova_api_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_api_start;;
|
||||
stop) nova_api_stop;;
|
||||
status) nova_api_status;;
|
||||
monitor) nova_api_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_api_start
|
||||
;;
|
||||
stop)
|
||||
nova_api_stop
|
||||
;;
|
||||
status)
|
||||
nova_api_status
|
||||
;;
|
||||
monitor)
|
||||
nova_api_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -288,7 +288,7 @@ nova_cert_start() {
|
||||
# run the actual nova-cert daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -349,7 +349,7 @@ nova_cert_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova Cert (nova-cert) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -363,10 +363,14 @@ nova_cert_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -374,12 +378,23 @@ nova_cert_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_cert_start;;
|
||||
stop) nova_cert_stop;;
|
||||
status) nova_cert_status;;
|
||||
monitor) nova_cert_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_cert_start
|
||||
;;
|
||||
stop)
|
||||
nova_cert_stop
|
||||
;;
|
||||
status)
|
||||
nova_cert_status
|
||||
;;
|
||||
monitor)
|
||||
nova_cert_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -288,7 +288,7 @@ nova_consoleauth_start() {
|
||||
# run the actual nova-consoleauth daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -349,7 +349,7 @@ nova_consoleauth_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova ConsoleAuth (nova-consoleauth) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -363,10 +363,14 @@ nova_consoleauth_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -374,12 +378,23 @@ nova_consoleauth_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_consoleauth_start;;
|
||||
stop) nova_consoleauth_stop;;
|
||||
status) nova_consoleauth_status;;
|
||||
monitor) nova_consoleauth_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_consoleauth_start
|
||||
;;
|
||||
stop)
|
||||
nova_consoleauth_stop
|
||||
;;
|
||||
status)
|
||||
nova_consoleauth_status
|
||||
;;
|
||||
monitor)
|
||||
nova_consoleauth_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -267,7 +267,7 @@ nova_network_start() {
|
||||
# run the actual nova-network daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -329,7 +329,7 @@ nova_network_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova Network (nova-network) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -343,10 +343,14 @@ nova_network_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -354,11 +358,22 @@ nova_network_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_network_start;;
|
||||
stop) nova_network_stop;;
|
||||
status) nova_network_status;;
|
||||
monitor) nova_network_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_network_start
|
||||
;;
|
||||
stop)
|
||||
nova_network_stop
|
||||
;;
|
||||
status)
|
||||
nova_network_status
|
||||
;;
|
||||
monitor)
|
||||
nova_network_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
@ -237,7 +237,7 @@ nova_vnc_console_start() {
|
||||
# run the actual nova-novncproxy daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config --web /usr/share/novnc/ \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
@ -298,7 +298,7 @@ nova_vnc_console_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova VNC Console (nova-novncproxy) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -312,10 +312,14 @@ nova_vnc_console_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -323,12 +327,23 @@ nova_vnc_console_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_vnc_console_start;;
|
||||
stop) nova_vnc_console_stop;;
|
||||
status) nova_vnc_console_status;;
|
||||
monitor) nova_vnc_console_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_vnc_console_start
|
||||
;;
|
||||
stop)
|
||||
nova_vnc_console_stop
|
||||
;;
|
||||
status)
|
||||
nova_vnc_console_status
|
||||
;;
|
||||
monitor)
|
||||
nova_vnc_console_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -287,7 +287,7 @@ nova_scheduler_start() {
|
||||
# run the actual nova-scheduler daemon. Don't use ocf_run as we're sending the tool's output
|
||||
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||
|
||||
# Spin waiting for the server to come up.
|
||||
while true; do
|
||||
@ -347,7 +347,7 @@ nova_scheduler_stop() {
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
ocf_log info "OpenStack Nova Scheduler (nova-scheduler) failed to stop after ${shutdown_timeout}s \
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
using SIGTERM. Trying SIGKILL ..."
|
||||
ocf_run kill -s KILL $pid
|
||||
fi
|
||||
|
||||
@ -361,10 +361,14 @@ nova_scheduler_stop() {
|
||||
#######################################################################
|
||||
|
||||
case "$1" in
|
||||
meta-data) meta_data
|
||||
exit $OCF_SUCCESS;;
|
||||
usage|help) usage
|
||||
exit $OCF_SUCCESS;;
|
||||
meta-data)
|
||||
meta_data
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
usage|help)
|
||||
usage
|
||||
exit $OCF_SUCCESS
|
||||
;;
|
||||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
@ -372,12 +376,23 @@ nova_scheduler_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_scheduler_start;;
|
||||
stop) nova_scheduler_stop;;
|
||||
status) nova_scheduler_status;;
|
||||
monitor) nova_scheduler_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
start)
|
||||
nova_scheduler_start
|
||||
;;
|
||||
stop)
|
||||
nova_scheduler_stop
|
||||
;;
|
||||
status)
|
||||
nova_scheduler_status
|
||||
;;
|
||||
monitor)
|
||||
nova_scheduler_monitor
|
||||
;;
|
||||
validate-all)
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user