openstack-armada-app/upstream/openstack/openstack-ras/openstack-ras/pkill_orphaned_processes.patch

2057 lines
61 KiB
Diff

---
ocf/ceilometer-agent-central | 24 +++++++++++++++++++++
ocf/ceilometer-agent-notification | 24 +++++++++++++++++++++
ocf/ceilometer-alarm-evaluator | 24 +++++++++++++++++++++
ocf/ceilometer-alarm-notifier | 24 +++++++++++++++++++++
ocf/ceilometer-api | 24 +++++++++++++++++++++
ocf/ceilometer-collector | 24 +++++++++++++++++++++
ocf/cinder-api | 42 ++++++++++++++++++++++---------------
ocf/cinder-schedule | 24 +++++++++++++++++++++
ocf/cinder-volume | 26 ++++++++++++++++++++++
ocf/glance-api | 25 ++++++++++++++++++++++
ocf/glance-registry | 43 ++++++++++++++++++++++----------------
ocf/heat-api | 24 +++++++++++++++++++++
ocf/heat-api-cfn | 24 +++++++++++++++++++++
ocf/heat-api-cloudwatch | 24 +++++++++++++++++++++
ocf/heat-engine | 24 +++++++++++++++++++++
ocf/keystone | 25 ++++++++++++++++++++++
ocf/neutron-agent-dhcp | 24 +++++++++++++++++++++
ocf/neutron-agent-l3 | 24 +++++++++++++++++++++
ocf/neutron-metadata-agent | 25 ++++++++++++++++++++++
ocf/neutron-server | 42 ++++++++++++++++++++++---------------
ocf/nova-api | 42 ++++++++++++++++++++++---------------
ocf/nova-cert | 24 +++++++++++++++++++++
ocf/nova-conductor | 24 +++++++++++++++++++++
ocf/nova-consoleauth | 24 +++++++++++++++++++++
ocf/nova-network | 24 +++++++++++++++++++++
ocf/nova-novnc | 41 +++++++++++++++++++-----------------
ocf/nova-scheduler | 24 +++++++++++++++++++++
ocf/validation | 7 ++++++
28 files changed, 663 insertions(+), 87 deletions(-)
--- a/ocf/glance-registry
+++ b/ocf/glance-registry
@@ -12,6 +12,13 @@
#
# (c) 2012 hastexo Professional Services GmbH
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
+#
# See usage() function below for more details ...
#
# OCF instance parameters:
@@ -227,14 +234,13 @@ glance_registry_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack ImageService (glance-registry) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
glance_registry_monitor() {
local rc
- local token
- local http_code
glance_registry_status
rc=$?
@@ -246,25 +252,11 @@ glance_registry_monitor() {
# Check whether we are supposed to monitor by logging into glance-registry
# and do it if that's the case.
-# 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`
-# 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
-# ocf_log err "Failed to connect to the OpenStack ImageService (glance-registry): $rc and $http_code"
-# return $OCF_NOT_RUNNING
-# fi
-# fi
- #suppress the information displayed while checking detailed information about this specific version of the API
if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
+ ocf_log err "Failed to connect to the OpenStack ImageService (glance-registry): $rc"
return $OCF_NOT_RUNNING
fi
fi
@@ -305,6 +297,20 @@ glance_registry_start() {
return $OCF_SUCCESS
}
+glance_registry_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
glance_registry_stop() {
local rc
local pid
@@ -313,6 +319,7 @@ glance_registry_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack ImageService (glance-registry) already stopped"
+ glance_registry_confirm_stop
return $OCF_SUCCESS
fi
@@ -322,6 +329,7 @@ glance_registry_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack ImageService (glance-registry) couldn't be stopped"
+ glance_registry_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -350,6 +358,7 @@ glance_registry_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ glance_registry_confirm_stop
ocf_log info "OpenStack ImageService (glance-registry) stopped"
--- a/ocf/glance-api
+++ b/ocf/glance-api
@@ -12,6 +12,13 @@
#
# (c) 2012 hastexo Professional Services GmbH
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
+#
# See usage() function below for more details ...
#
# OCF instance parameters:
@@ -220,6 +227,7 @@ glance_api_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack ImageService (glance-api) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -253,6 +261,20 @@ glance_api_monitor() {
return $OCF_SUCCESS
}
+glance_api_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
glance_api_start() {
local rc
@@ -293,6 +315,7 @@ glance_api_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack ImageService (glance-api) already stopped"
+ glance_api_confirm_stop
return $OCF_SUCCESS
fi
@@ -302,6 +325,7 @@ glance_api_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack ImageService (glance-api) couldn't be stopped"
+ glance_api_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -330,6 +354,7 @@ glance_api_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ glance_api_confirm_stop
ocf_log info "OpenStack ImageService (glance-api) stopped"
--- a/ocf/cinder-api
+++ b/ocf/cinder-api
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -226,14 +232,13 @@ cinder_api_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Cinder API (cinder-api) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
cinder_api_monitor() {
local rc
- local token
- local http_code
cinder_api_status
rc=$?
@@ -244,25 +249,11 @@ cinder_api_monitor() {
fi
# Check detailed information about this specific version of the API.
-# 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`
-# 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
-# ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
-# return $OCF_NOT_RUNNING
-# fi
-# fi
- #suppress the information displayed while checking detailed information about this specific version of the API
if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
+ ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc"
return $OCF_NOT_RUNNING
fi
fi
@@ -303,6 +294,20 @@ cinder_api_start() {
return $OCF_SUCCESS
}
+cinder_api_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
cinder_api_stop() {
local rc
local pid
@@ -311,6 +316,7 @@ cinder_api_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Cinder API (cinder-api) already stopped"
+ cinder_api_confirm_stop
return $OCF_SUCCESS
fi
@@ -320,6 +326,7 @@ cinder_api_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Cinder API (cinder-api) couldn't be stopped"
+ cinder_api_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -348,6 +355,7 @@ cinder_api_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ cinder_api_confirm_stop
ocf_log info "OpenStack Cinder API (cinder-api) stopped"
--- a/ocf/cinder-schedule
+++ b/ocf/cinder-schedule
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ cinder_scheduler_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Cinder Scheduler (cinder-schedule) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -268,6 +275,20 @@ cinder_scheduler_start() {
return $OCF_SUCCESS
}
+cinder_scheduler_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
cinder_scheduler_stop() {
local rc
local pid
@@ -276,6 +297,7 @@ cinder_scheduler_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Cinder Scheduler (cinder-schedule) already stopped"
+ cinder_scheduler_confirm_stop
return $OCF_SUCCESS
fi
@@ -285,6 +307,7 @@ cinder_scheduler_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Cinder Scheduler (cinder-schedule) couldn't be stopped"
+ cinder_scheduler_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -313,6 +336,7 @@ cinder_scheduler_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ cinder_scheduler_confirm_stop
ocf_log info "OpenStack Cinder Scheduler (cinder-schedule) stopped"
--- a/ocf/cinder-volume
+++ b/ocf/cinder-volume
@@ -11,6 +11,14 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# (c) 2012 hastexo Professional Services GmbH
+#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -194,6 +202,7 @@ cinder_volume_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Cinder Volume (cinder-volume) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -273,6 +282,20 @@ cinder_volume_start() {
return $OCF_SUCCESS
}
+cinder_volume_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
cinder_volume_stop() {
local rc
local pid
@@ -281,6 +304,7 @@ cinder_volume_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Cinder Volume (cinder-volume) already stopped"
+ cinder_volume_confirm_stop
return $OCF_SUCCESS
fi
@@ -290,6 +314,7 @@ cinder_volume_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Cinder Volume (cinder-volume) couldn't be stopped"
+ cinder_volume_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -318,6 +343,7 @@ cinder_volume_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ cinder_volume_confirm_stop
ocf_log info "OpenStack Cinder Volume (cinder-volume) stopped"
--- a/ocf/ceilometer-agent-central
+++ b/ocf/ceilometer-agent-central
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ ceilometer_agent_central_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer Central Agent (ceilometer-agent-central) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -258,6 +265,20 @@ ceilometer_agent_central_start() {
return $OCF_SUCCESS
}
+ceilometer_agent_central_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_agent_central_stop() {
local rc
local pid
@@ -266,6 +287,7 @@ ceilometer_agent_central_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-central) already stopped"
+ ceilometer_agent_central_confirm_stop
return $OCF_SUCCESS
fi
@@ -275,6 +297,7 @@ ceilometer_agent_central_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer Central Agent (ceilometer-agent-central) couldn't be stopped"
+ ceilometer_agent_central_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -303,6 +326,7 @@ ceilometer_agent_central_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_agent_central_confirm_stop
ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-central) stopped"
--- a/ocf/ceilometer-agent-notification
+++ b/ocf/ceilometer-agent-notification
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ ceilometer_agent_notification_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer Central Agent (ceilometer-agent-notification) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -258,6 +265,20 @@ ceilometer_agent_notification_start() {
return $OCF_SUCCESS
}
+ceilometer_agent_notification_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_agent_notification_stop() {
local rc
local pid
@@ -266,6 +287,7 @@ ceilometer_agent_notification_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-notification) already stopped"
+ ceilometer_agent_notification_confirm_stop
return $OCF_SUCCESS
fi
@@ -275,6 +297,7 @@ ceilometer_agent_notification_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer Central Agent (ceilometer-agent-notification) couldn't be stopped"
+ ceilometer_agent_notification_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -303,6 +326,7 @@ ceilometer_agent_notification_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_agent_notification_confirm_stop
ocf_log info "OpenStack Ceilometer Central Agent (ceilometer-agent-notification) stopped"
--- a/ocf/ceilometer-alarm-evaluator
+++ b/ocf/ceilometer-alarm-evaluator
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -175,6 +181,7 @@ ceilometer_alarm_evaluator_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer Alarm Evaluator (ceilometer-alarm-evaluator) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -227,6 +234,20 @@ ceilometer_alarm_evaluator_start() {
return $OCF_SUCCESS
}
+ceilometer_alarm_evaluator_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_alarm_evaluator_stop() {
local rc
local pid
@@ -235,6 +256,7 @@ ceilometer_alarm_evaluator_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer Alarm Evaluator (ceilometer-alarm-evaluator) already stopped"
+ ceilometer_alarm_evaluator_confirm_stop
return $OCF_SUCCESS
fi
@@ -244,6 +266,7 @@ ceilometer_alarm_evaluator_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer Alarm Evaluator (ceilometer-alarm-evaluator) couldn't be stopped"
+ ceilometer_alarm_evaluator_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -272,6 +295,7 @@ ceilometer_alarm_evaluator_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_alarm_evaluator_confirm_stop
ocf_log info "OpenStack Ceilometer Alarm Evaluator (ceilometer-alarm-evaluator) stopped"
--- a/ocf/ceilometer-alarm-notifier
+++ b/ocf/ceilometer-alarm-notifier
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ ceilometer_alarm_notifier_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer Alarm Notifier (ceilometer-alarm-notifier) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -268,6 +275,20 @@ ceilometer_alarm_notifier_start() {
return $OCF_SUCCESS
}
+ceilometer_alarm_notifier_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_alarm_notifier_stop() {
local rc
local pid
@@ -276,6 +297,7 @@ ceilometer_alarm_notifier_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer Alarm Notifier (ceilometer-alarm-notifier) already stopped"
+ ceilometer_alarm_notifier_confirm_stop
return $OCF_SUCCESS
fi
@@ -285,6 +307,7 @@ ceilometer_alarm_notifier_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer Alarm Notifier (ceilometer-alarm-notifier) couldn't be stopped"
+ ceilometer_alarm_notifier_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -313,6 +336,7 @@ ceilometer_alarm_notifier_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_alarm_notifier_confirm_stop
ocf_log info "OpenStack Ceilometer Alarm Notifier (ceilometer-alarm-notifier) stopped"
--- a/ocf/ceilometer-api
+++ b/ocf/ceilometer-api
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ ceilometer_api_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer API (ceilometer-api) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -268,6 +275,20 @@ ceilometer_api_start() {
return $OCF_SUCCESS
}
+ceilometer_api_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_api_stop() {
local rc
local pid
@@ -276,6 +297,7 @@ ceilometer_api_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer API (ceilometer-api) already stopped"
+ ceilometer_api_confirm_stop
return $OCF_SUCCESS
fi
@@ -285,6 +307,7 @@ ceilometer_api_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer API (ceilometer-api) couldn't be stopped"
+ ceilometer_api_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -313,6 +336,7 @@ ceilometer_api_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_api_confirm_stop
ocf_log info "OpenStack Ceilometer API (ceilometer-api) stopped"
--- a/ocf/ceilometer-collector
+++ b/ocf/ceilometer-collector
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -206,6 +212,7 @@ ceilometer_collector_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Ceilometer Collector (ceilometer-collector) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -269,6 +276,20 @@ ceilometer_collector_start() {
return $OCF_SUCCESS
}
+ceilometer_collector_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
ceilometer_collector_stop() {
local rc
local pid
@@ -277,6 +298,7 @@ ceilometer_collector_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Ceilometer Collector (ceilometer-collector) already stopped"
+ ceilometer_collector_confirm_stop
return $OCF_SUCCESS
fi
@@ -286,6 +308,7 @@ ceilometer_collector_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Ceilometer Collector (ceilometer-collector) couldn't be stopped"
+ ceilometer_collector_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -314,6 +337,7 @@ ceilometer_collector_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ ceilometer_collector_confirm_stop
ocf_log info "OpenStack Ceilometer Collector (ceilometer-collector) stopped"
--- a/ocf/heat-api
+++ b/ocf/heat-api
@@ -10,6 +10,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -205,6 +211,7 @@ heat_api_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Orchestration Engine (heat-api) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -266,6 +273,20 @@ heat_api_start() {
return $OCF_SUCCESS
}
+heat_api_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
heat_api_stop() {
local rc
local pid
@@ -274,6 +295,7 @@ heat_api_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Orchestration Engine (heat-api) already stopped"
+ heat_api_confirm_stop
return $OCF_SUCCESS
fi
@@ -283,6 +305,7 @@ heat_api_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Orchestration Engine (heat-api) couldn't be stopped"
+ heat_api_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -311,6 +334,7 @@ heat_api_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ heat_api_confirm_stop
ocf_log info "OpenStack Orchestration Engine (heat-api) stopped"
--- a/ocf/heat-api-cfn
+++ b/ocf/heat-api-cfn
@@ -10,6 +10,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -205,6 +211,7 @@ heat_api_cfn_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Orchestration Engine (heat-api-cfn) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -266,6 +273,20 @@ heat_api_cfn_start() {
return $OCF_SUCCESS
}
+heat_api_cfn_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
heat_api_cfn_stop() {
local rc
local pid
@@ -274,6 +295,7 @@ heat_api_cfn_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Orchestration Engine (heat-api-cfn) already stopped"
+ heat_api_cfn_confirm_stop
return $OCF_SUCCESS
fi
@@ -283,6 +305,7 @@ heat_api_cfn_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Orchestration Engine (heat-api-cfn) couldn't be stopped"
+ heat_api_cfn_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -311,6 +334,7 @@ heat_api_cfn_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ heat_api_cfn_confirm_stop
ocf_log info "OpenStack Orchestration Engine (heat-api-cfn) stopped"
--- a/ocf/heat-api-cloudwatch
+++ b/ocf/heat-api-cloudwatch
@@ -10,6 +10,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -205,6 +211,7 @@ heat_api_cloudwatch_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Orchestration Engine (heat-api-cloudwatch) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -266,6 +273,20 @@ heat_api_cloudwatch_start() {
return $OCF_SUCCESS
}
+heat_api_cloudwatch_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
heat_api_cloudwatch_stop() {
local rc
local pid
@@ -274,6 +295,7 @@ heat_api_cloudwatch_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Orchestration Engine (heat-api-cloudwatch) already stopped"
+ heat_api_cloudwatch_confirm_stop
return $OCF_SUCCESS
fi
@@ -283,6 +305,7 @@ heat_api_cloudwatch_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Orchestration Engine (heat-api-cloudwatch) couldn't be stopped"
+ heat_api_cloudwatch_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -311,6 +334,7 @@ heat_api_cloudwatch_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ heat_api_cloudwatch_confirm_stop
ocf_log info "OpenStack Orchestration Engine (heat-api-cloudwatch) stopped"
--- a/ocf/heat-engine
+++ b/ocf/heat-engine
@@ -10,6 +10,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -227,6 +233,7 @@ heat_engine_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Orchestration Engine (heat-engine) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -304,6 +311,20 @@ heat_engine_start() {
return $OCF_SUCCESS
}
+heat_engine_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
heat_engine_stop() {
local rc
local pid
@@ -312,6 +333,7 @@ heat_engine_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Orchestration Engine (heat-engine) already stopped"
+ heat_engine_confirm_stop
return $OCF_SUCCESS
fi
@@ -321,6 +343,7 @@ heat_engine_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Orchestration Engine (heat-engine) couldn't be stopped"
+ heat_engine_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -349,6 +372,7 @@ heat_engine_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ heat_engine_confirm_stop
ocf_log info "OpenStack Orchestration Engine (heat-engine) stopped"
--- a/ocf/keystone
+++ b/ocf/keystone
@@ -12,6 +12,13 @@
#
# (c) 2012 hastexo Professional Services GmbH
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
+#
# See usage() function below for more details ...
#
# OCF instance parameters:
@@ -220,6 +227,7 @@ keystone_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Identity (Keystone) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -287,6 +295,20 @@ keystone_start() {
return $OCF_SUCCESS
}
+keystone_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
keystone_stop() {
local rc
local pid
@@ -295,6 +317,7 @@ keystone_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Identity (Keystone) already stopped"
+ keystone_confirm_stop
return $OCF_SUCCESS
fi
@@ -304,6 +327,7 @@ keystone_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Identity (Keystone) couldn't be stopped"
+ keystone_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -332,6 +356,7 @@ keystone_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ keystone_confirm_stop
ocf_log info "OpenStack Identity (Keystone) stopped"
--- a/ocf/neutron-agent-dhcp
+++ b/ocf/neutron-agent-dhcp
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -196,6 +202,7 @@ neutron_dhcp_agent_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack DHCP Server (neutron-dhcp-agent) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -261,6 +268,20 @@ neutron_dhcp_agent_start() {
return $OCF_SUCCESS
}
+neutron_dhcp_agent_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
neutron_dhcp_agent_stop() {
local rc
local pid
@@ -269,6 +290,7 @@ neutron_dhcp_agent_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack DHCP Server (neutron-dhcp-agent) already stopped"
+ neutron_dhcp_agent_confirm_stop
return $OCF_SUCCESS
fi
@@ -279,6 +301,7 @@ neutron_dhcp_agent_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack DHCP Server (neutron-dhcp-agent) couldn't be stopped"
+ neutron_dhcp_agent_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -307,6 +330,7 @@ neutron_dhcp_agent_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ neutron_dhcp_agent_confirm_stop
ocf_log info "OpenStack DHCP Server (neutron-dhcp-agent) stopped"
--- a/ocf/neutron-agent-l3
+++ b/ocf/neutron-agent-l3
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -196,6 +202,7 @@ neutron_l3_agent_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack L3 Server (neutron-l3-agent) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -261,6 +268,20 @@ neutron_l3_agent_start() {
return $OCF_SUCCESS
}
+neutron_l3_agent_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
neutron_l3_agent_stop() {
local rc
local pid
@@ -269,6 +290,7 @@ neutron_l3_agent_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack L3 Server (neutron-l3-agent) already stopped"
+ neutron_l3_agent_confirm_stop
return $OCF_SUCCESS
fi
@@ -278,6 +300,7 @@ neutron_l3_agent_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack L3 Server (neutron-l3-agent) couldn't be stopped"
+ neutron_l3_agent_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -306,6 +329,7 @@ neutron_l3_agent_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ neutron_l3_agent_confirm_stop
ocf_log info "OpenStack L3 Server (neutron-l3-agent) stopped"
--- a/ocf/neutron-metadata-agent
+++ b/ocf/neutron-metadata-agent
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -193,6 +199,7 @@ neutron_metadata_agent_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Neutron Metadata Agent (neutron-metadata-agent) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -214,6 +221,7 @@ neutron_metadata_agent_monitor() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Neutron Metadata Agent (neutron-metadata-agent) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -252,6 +260,20 @@ neutron_metadata_agent_start() {
return $OCF_SUCCESS
}
+neutron_metadata_agent_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
neutron_metadata_agent_stop() {
local rc
local pid
@@ -260,6 +282,7 @@ neutron_metadata_agent_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Neutron Metadata Agent (neutron-metadata-agent) already stopped"
+ neutron_metadata_agent_confirm_stop
return $OCF_SUCCESS
fi
@@ -269,6 +292,7 @@ neutron_metadata_agent_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Neutron Metadata Agent (neutron-metadata-agent) couldn't be stopped"
+ neutron_metadata_agent_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -297,6 +321,7 @@ neutron_metadata_agent_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ neutron_metadata_agent_confirm_stop
ocf_log info "OpenStack Neutron Metadata Agent (neutron-metadata-agent) stopped"
--- a/ocf/neutron-server
+++ b/ocf/neutron-server
@@ -12,6 +12,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -238,14 +244,13 @@ neutron_server_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Neutron Server (neutron-server) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
neutron_server_monitor() {
local rc
- local token
- local http_code
neutron_server_status
rc=$?
@@ -256,25 +261,11 @@ neutron_server_monitor() {
fi
# Check detailed information about this specific version of the API.
-# 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`
-# 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
-# ocf_log err "Failed to connect to the OpenStack Neutron API (neutron-server): $rc and $http_code"
-# return $OCF_NOT_RUNNING
-# fi
-# fi
- #suppress the information displayed while checking detailed information about this specific version of the API
if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
+ ocf_log err "Failed to connect to the OpenStack Neutron Server (neutron-server): $rc"
return $OCF_NOT_RUNNING
fi
fi
@@ -317,6 +308,20 @@ neutron_server_start() {
return $OCF_SUCCESS
}
+neutron_server_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
neutron_server_stop() {
local rc
local pid
@@ -325,6 +330,7 @@ neutron_server_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Neutron Server (neutron-server) already stopped"
+ neutron_server_confirm_stop
return $OCF_SUCCESS
fi
@@ -334,6 +340,7 @@ neutron_server_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Neutron Server (neutron-server) couldn't be stopped"
+ neutron_server_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -362,6 +369,7 @@ neutron_server_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ neutron_server_confirm_stop
ocf_log info "OpenStack Neutron Server (neutron-server) stopped"
--- a/ocf/nova-api
+++ b/ocf/nova-api
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -226,14 +232,13 @@ nova_api_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova API (nova-api) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
nova_api_monitor() {
local rc
- local token
- local http_code
nova_api_status
rc=$?
@@ -244,25 +249,11 @@ nova_api_monitor() {
fi
# Check detailed information about this specific version of the API.
-# 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`
-# 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
-# ocf_log err "Failed to connect to the OpenStack Nova API (nova-api): $rc and $http_code"
-# return $OCF_NOT_RUNNING
-# fi
-# fi
- #suppress the information displayed while checking detailed information about this specific version of the API
if [ -n "$OCF_RESKEY_os_username"] && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_get_token_url" ]; then
./validation $OCF_RESKEY_keystone_get_token_url $OCF_RESKEY_os_username $OCF_RESKEY_os_tenant_name
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "Failed to connect to the OpenStack Cinder API (cinder-api): $rc and $http_code"
+ ocf_log err "Failed to connect to the OpenStack Nova API (nova-api): $rc"
return $OCF_NOT_RUNNING
fi
fi
@@ -306,6 +297,20 @@ nova_api_start() {
return $OCF_SUCCESS
}
+nova_api_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_api_stop() {
local rc
local pid
@@ -314,6 +319,7 @@ nova_api_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova API (nova-api) already stopped"
+ nova_api_confirm_stop
return $OCF_SUCCESS
fi
@@ -323,6 +329,7 @@ nova_api_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova API (nova-api) couldn't be stopped"
+ nova_api_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -351,6 +358,7 @@ nova_api_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_api_confirm_stop
ocf_log info "OpenStack Nova API (nova-api) stopped"
--- a/ocf/nova-cert
+++ b/ocf/nova-cert
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -228,6 +234,7 @@ nova_cert_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova Cert (nova-cert) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -310,6 +317,20 @@ nova_cert_start() {
return $OCF_SUCCESS
}
+nova_cert_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_cert_stop() {
local rc
local pid
@@ -318,6 +339,7 @@ nova_cert_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova Cert (nova-cert) already stopped"
+ nova_cert_confirm_stop
return $OCF_SUCCESS
fi
@@ -327,6 +349,7 @@ nova_cert_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova Cert (nova-cert) couldn't be stopped"
+ nova_cert_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -355,6 +378,7 @@ nova_cert_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_cert_confirm_stop
ocf_log info "OpenStack Nova Cert (nova-cert) stopped"
--- a/ocf/nova-conductor
+++ b/ocf/nova-conductor
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -228,6 +234,7 @@ nova_conductor_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova Conductor (nova-conductor) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -308,6 +315,20 @@ nova_conductor_start() {
return $OCF_SUCCESS
}
+nova_conductor_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_conductor_stop() {
local rc
local pid
@@ -316,6 +337,7 @@ nova_conductor_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova Conductor (nova-conductor) already stopped"
+ nova_conductor_confirm_stop
return $OCF_SUCCESS
fi
@@ -325,6 +347,7 @@ nova_conductor_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova Conductor (nova-conductor) couldn't be stopped"
+ nova_conductor_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -353,6 +376,7 @@ nova_conductor_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_conductor_confirm_stop
ocf_log info "OpenStack Nova Conductor (nova-conductor) stopped"
--- a/ocf/nova-consoleauth
+++ b/ocf/nova-consoleauth
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -228,6 +234,7 @@ nova_consoleauth_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova Console Auth (nova-consoleauth) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -310,6 +317,20 @@ nova_consoleauth_start() {
return $OCF_SUCCESS
}
+nova_consoleauth_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_consoleauth_stop() {
local rc
local pid
@@ -318,6 +339,7 @@ nova_consoleauth_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova ConsoleAuth (nova-consoleauth) already stopped"
+ nova_consoleauth_confirm_stop
return $OCF_SUCCESS
fi
@@ -327,6 +349,7 @@ nova_consoleauth_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova ConsoleAuth (nova-consoleauth) couldn't be stopped"
+ nova_consoleauth_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -355,6 +378,7 @@ nova_consoleauth_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_consoleauth_confirm_stop
ocf_log info "OpenStack Nova ConsoleAuth (nova-consoleauth) stopped"
--- a/ocf/nova-network
+++ b/ocf/nova-network
@@ -12,6 +12,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -207,6 +213,7 @@ nova_network_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova Network (nova-network) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -289,6 +296,20 @@ nova_network_start() {
return $OCF_SUCCESS
}
+nova_network_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_network_stop() {
local rc
local pid
@@ -297,6 +318,7 @@ nova_network_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova Network (nova-network) already stopped"
+ nova_network_confirm_stop
return $OCF_SUCCESS
fi
@@ -307,6 +329,7 @@ nova_network_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova Network (nova-network) couldn't be stopped"
+ nova_network_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -335,6 +358,7 @@ nova_network_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_network_confirm_stop
ocf_log info "OpenStack Nova Network (nova-network) stopped"
--- a/ocf/nova-novnc
+++ b/ocf/nova-novnc
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -195,6 +201,7 @@ nova_vnc_console_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova VNC Console (nova-novncproxy) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -260,21 +267,18 @@ nova_vnc_console_start() {
return $OCF_SUCCESS
}
-nova_vnc_console_stop_all() {
- # Make sure nova-novncproxy and all the children are stopped.
- for sig in TERM KILL
- do
- for pid in $(ps -eo pid,cmd | grep python |\
- grep "nova-novncproxy" | \
- grep -v grep | awk '{print $1}')
- do
- ocf_log info "Manually killing $pid with $sig"
- kill -$sig $pid
- done
- sleep 1
- done
-
- return $OCF_SUCCESS
+nova_vnc_console_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
}
nova_vnc_console_stop() {
@@ -285,7 +289,7 @@ nova_vnc_console_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova VNC Console (nova-novncproxy) already stopped"
- nova_vnc_console_stop_all
+ nova_vnc_console_confirm_stop
return $OCF_SUCCESS
fi
@@ -295,7 +299,7 @@ nova_vnc_console_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova VNC Console (nova-novncproxy) couldn't be stopped"
- nova_vnc_console_stop_all
+ nova_vnc_console_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -324,13 +328,12 @@ nova_vnc_console_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_vnc_console_confirm_stop
ocf_log info "OpenStack Nova VNC Console (nova-novncproxy) stopped"
rm -f $OCF_RESKEY_pid
- nova_vnc_console_stop_all
-
return $OCF_SUCCESS
}
--- a/ocf/nova-scheduler
+++ b/ocf/nova-scheduler
@@ -11,6 +11,12 @@
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
#
# See usage() function below for more details ...
#
@@ -228,6 +234,7 @@ nova_scheduler_status() {
return $OCF_SUCCESS
else
ocf_log info "Old PID file found, but OpenStack Nova Scheduler (nova-scheduler) is not running"
+ rm -f $OCF_RESKEY_pid
return $OCF_NOT_RUNNING
fi
}
@@ -308,6 +315,20 @@ nova_scheduler_start() {
return $OCF_SUCCESS
}
+nova_scheduler_confirm_stop() {
+ local my_bin
+ local my_processes
+
+ my_binary=`which ${OCF_RESKEY_binary}`
+ my_processes=`pgrep -l -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"`
+
+ if [ -n "${my_processes}" ]
+ then
+ ocf_log info "About to SIGKILL the following: ${my_processes}"
+ pkill -KILL -f "^(python|/usr/bin/python|/usr/bin/python2) ${my_binary}([^\w-]|$)"
+ fi
+}
+
nova_scheduler_stop() {
local rc
local pid
@@ -316,6 +337,7 @@ nova_scheduler_stop() {
rc=$?
if [ $rc -eq $OCF_NOT_RUNNING ]; then
ocf_log info "OpenStack Nova Scheduler (nova-scheduler) already stopped"
+ nova_scheduler_confirm_stop
return $OCF_SUCCESS
fi
@@ -325,6 +347,7 @@ nova_scheduler_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "OpenStack Nova Scheduler (nova-scheduler) couldn't be stopped"
+ nova_scheduler_confirm_stop
exit $OCF_ERR_GENERIC
fi
@@ -353,6 +376,7 @@ nova_scheduler_stop() {
using SIGTERM. Trying SIGKILL ..."
ocf_run kill -s KILL $pid
fi
+ nova_scheduler_confirm_stop
ocf_log info "OpenStack Nova Scheduler (nova-scheduler) stopped"
--- a/ocf/validation
+++ b/ocf/validation
@@ -1,4 +1,11 @@
#!/usr/bin/env python
+#
+# Copyright (c) 2014 Wind River Systems, Inc.
+# SPDX-License-Identifier: Apache-2.0
+#
+#
+#
+#
from keystoneclient import probe