Delete nova-volume in cinder-volume
This commit is contained in:
parent
86c0a8da1b
commit
2a5e05595b
|
@ -49,7 +49,7 @@ usage() {
|
|||
cat <<UEND
|
||||
usage: $0 (start|stop|validate-all|meta-data|status|monitor)
|
||||
|
||||
$0 manages an OpenStack Nova Volume (cinder-volume) process as an HA resource
|
||||
$0 manages an OpenStack Cinder Volume (cinder-volume) process as an HA resource
|
||||
|
||||
The 'start' operation starts the volume service.
|
||||
The 'stop' operation stops the volume service.
|
||||
|
@ -69,42 +69,42 @@ meta_data() {
|
|||
<version>1.0</version>
|
||||
|
||||
<longdesc lang="en">
|
||||
Resource agent for the OpenStack Nova Volume (cinder-volume)
|
||||
Resource agent for the OpenStack Cinder Volume (cinder-volume)
|
||||
May manage a cinder-volume instance or a clone set that
|
||||
creates a distributed cinder-volume cluster.
|
||||
</longdesc>
|
||||
<shortdesc lang="en">Manages the OpenStack Nova Volume (cinder-volume)</shortdesc>
|
||||
<shortdesc lang="en">Manages the OpenStack Cinder Volume (cinder-volume)</shortdesc>
|
||||
<parameters>
|
||||
|
||||
<parameter name="binary" unique="0" required="0">
|
||||
<longdesc lang="en">
|
||||
Location of the OpenStack Nova Volume server binary (cinder-volume)
|
||||
Location of the OpenStack Cinder Volume server binary (cinder-volume)
|
||||
</longdesc>
|
||||
<shortdesc lang="en">OpenStack Nova Volume server binary (cinder-volume)</shortdesc>
|
||||
<shortdesc lang="en">OpenStack Cinder Volume server binary (cinder-volume)</shortdesc>
|
||||
<content type="string" default="${OCF_RESKEY_binary_default}" />
|
||||
</parameter>
|
||||
|
||||
<parameter name="config" unique="0" required="0">
|
||||
<longdesc lang="en">
|
||||
Location of the OpenStack Nova Volume (cinder-volume) configuration file
|
||||
Location of the OpenStack Cinder Volume (cinder-volume) configuration file
|
||||
</longdesc>
|
||||
<shortdesc lang="en">OpenStack Nova Volume (cinder-volume) config file</shortdesc>
|
||||
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) config file</shortdesc>
|
||||
<content type="string" default="${OCF_RESKEY_config_default}" />
|
||||
</parameter>
|
||||
|
||||
<parameter name="user" unique="0" required="0">
|
||||
<longdesc lang="en">
|
||||
User running OpenStack Nova Volume (cinder-volume)
|
||||
User running OpenStack Cinder Volume (cinder-volume)
|
||||
</longdesc>
|
||||
<shortdesc lang="en">OpenStack Nova Volume (cinder-volume) user</shortdesc>
|
||||
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) user</shortdesc>
|
||||
<content type="string" default="${OCF_RESKEY_user_default}" />
|
||||
</parameter>
|
||||
|
||||
<parameter name="pid" unique="0" required="0">
|
||||
<longdesc lang="en">
|
||||
The pid file to use for this OpenStack Nova Volume (cinder-volume) instance
|
||||
The pid file to use for this OpenStack Cinder Volume (cinder-volume) instance
|
||||
</longdesc>
|
||||
<shortdesc lang="en">OpenStack Nova Volume (cinder-volume) pid file</shortdesc>
|
||||
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) pid file</shortdesc>
|
||||
<content type="string" default="${OCF_RESKEY_pid_default}" />
|
||||
</parameter>
|
||||
|
||||
|
@ -119,7 +119,7 @@ The listening port number of the AMQP server. Mandatory to perform a monitor che
|
|||
|
||||
<parameter name="additional_parameters" unique="0" required="0">
|
||||
<longdesc lang="en">
|
||||
Additional parameters to pass on to the OpenStack Nova Volume (cinder-volume)
|
||||
Additional parameters to pass on to the OpenStack Cinder Volume (cinder-volume)
|
||||
</longdesc>
|
||||
<shortdesc lang="en">Additional parameters for cinder-volume</shortdesc>
|
||||
<content type="string" />
|
||||
|
@ -142,7 +142,7 @@ END
|
|||
#######################################################################
|
||||
# Functions invoked by resource manager actions
|
||||
|
||||
nova_volume_validate() {
|
||||
cinder_volume_validate() {
|
||||
local rc
|
||||
|
||||
check_binary $OCF_RESKEY_binary
|
||||
|
@ -168,12 +168,12 @@ nova_volume_validate() {
|
|||
true
|
||||
}
|
||||
|
||||
nova_volume_status() {
|
||||
cinder_volume_status() {
|
||||
local pid
|
||||
local rc
|
||||
|
||||
if [ ! -f $OCF_RESKEY_pid ]; then
|
||||
ocf_log info "OpenStack Nova Volume (cinder-volume) is not running"
|
||||
ocf_log info "OpenStack Cinder Volume (cinder-volume) is not running"
|
||||
return $OCF_NOT_RUNNING
|
||||
else
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
|
@ -184,17 +184,17 @@ nova_volume_status() {
|
|||
if [ $rc -eq 0 ]; then
|
||||
return $OCF_SUCCESS
|
||||
else
|
||||
ocf_log info "Old PID file found, but OpenStack Nova Volume (cinder-volume) is not running"
|
||||
ocf_log info "Old PID file found, but OpenStack Cinder Volume (cinder-volume) is not running"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
}
|
||||
|
||||
nova_volume_monitor() {
|
||||
cinder_volume_monitor() {
|
||||
local rc
|
||||
local pid
|
||||
local volume_amqp_check
|
||||
|
||||
nova_volume_status
|
||||
cinder_volume_status
|
||||
rc=$?
|
||||
|
||||
# If status returned anything but success, return that immediately
|
||||
|
@ -210,18 +210,18 @@ nova_volume_monitor() {
|
|||
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 "Nova Volume is not connected to the AMQP server: $rc"
|
||||
ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Nova Volume (cinder-volume) monitor succeeded"
|
||||
ocf_log debug "OpenStack Cinder Volume (cinder-volume) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
||||
nova_volume_start() {
|
||||
cinder_volume_start() {
|
||||
local rc
|
||||
|
||||
nova_volume_status
|
||||
cinder_volume_status
|
||||
rc=$?
|
||||
if [ $rc -eq $OCF_SUCCESS ]; then
|
||||
ocf_log info "OpenStack Cinder Volume (cinder-volume) already running"
|
||||
|
@ -236,7 +236,7 @@ nova_volume_start() {
|
|||
# Spin waiting for the server to come up.
|
||||
# Let the CRM/LRM time us out if required
|
||||
while true; do
|
||||
nova_volume_monitor
|
||||
cinder_volume_monitor
|
||||
rc=$?
|
||||
[ $rc -eq $OCF_SUCCESS ] && break
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
|
@ -250,11 +250,11 @@ nova_volume_start() {
|
|||
return $OCF_SUCCESS
|
||||
}
|
||||
|
||||
nova_volume_stop() {
|
||||
cinder_volume_stop() {
|
||||
local rc
|
||||
local pid
|
||||
|
||||
nova_volume_status
|
||||
cinder_volume_status
|
||||
rc=$?
|
||||
if [ $rc -eq $OCF_NOT_RUNNING ]; then
|
||||
ocf_log info "OpenStack Cinder Volume (cinder-volume) already stopped"
|
||||
|
@ -277,7 +277,7 @@ nova_volume_stop() {
|
|||
fi
|
||||
count=0
|
||||
while [ $count -lt $shutdown_timeout ]; do
|
||||
nova_volume_status
|
||||
cinder_volume_status
|
||||
rc=$?
|
||||
if [ $rc -eq $OCF_NOT_RUNNING ]; then
|
||||
break
|
||||
|
@ -287,7 +287,7 @@ nova_volume_stop() {
|
|||
ocf_log debug "OpenStack Cinder Volume (cinder-volume) still hasn't stopped yet. Waiting ..."
|
||||
done
|
||||
|
||||
nova_volume_status
|
||||
cinder_volume_status
|
||||
rc=$?
|
||||
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||
# SIGTERM didn't help either, try SIGKILL
|
||||
|
@ -313,14 +313,14 @@ case "$1" in
|
|||
esac
|
||||
|
||||
# Anything except meta-data and help must pass validation
|
||||
nova_volume_validate || exit $?
|
||||
cinder_volume_validate || exit $?
|
||||
|
||||
# What kind of method was invoked?
|
||||
case "$1" in
|
||||
start) nova_volume_start;;
|
||||
stop) nova_volume_stop;;
|
||||
status) nova_volume_status;;
|
||||
monitor) nova_volume_monitor;;
|
||||
start) cinder_volume_start;;
|
||||
stop) cinder_volume_stop;;
|
||||
status) cinder_volume_status;;
|
||||
monitor) cinder_volume_monitor;;
|
||||
validate-all) ;;
|
||||
*) usage
|
||||
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||
|
|
Loading…
Reference in New Issue