|
|
937446 |
diff -uNr a/heartbeat/nova-compute-wait b/heartbeat/nova-compute-wait
|
|
|
937446 |
--- a/heartbeat/nova-compute-wait 2016-05-13 11:50:54.434532591 +0200
|
|
|
937446 |
+++ b/heartbeat/nova-compute-wait 2016-05-13 12:04:41.997856291 +0200
|
|
|
937446 |
@@ -52,34 +52,25 @@
|
|
|
937446 |
<parameters>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="auth_url" unique="0" required="1">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Authorization URL for connecting to keystone in admin context
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Authorization URL</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
<content type="string" default="" />
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="username" unique="0" required="1">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Username for connecting to keystone in admin context
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Username</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="password" unique="0" required="1">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Password for connecting to keystone in admin context
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Password</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
<content type="string" default="" />
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="tenant_name" unique="0" required="1">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Tenant name for connecting to keystone in admin context.
|
|
|
937446 |
-Note that with Keystone V3 tenant names are only unique within a domain.
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Tenant name</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
<content type="string" default="" />
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
@@ -92,18 +83,14 @@
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="endpoint_type" unique="0" required="0">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Nova API location (internal, public or admin URL)
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Nova API location (internal, public or admin URL)</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
<content type="string" default="" />
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
<parameter name="no_shared_storage" unique="0" required="0">
|
|
|
937446 |
-<longdesc lang="en">
|
|
|
937446 |
-Disable shared storage recovery for instances. Use at your own risk!
|
|
|
937446 |
-</longdesc>
|
|
|
937446 |
-<shortdesc lang="en">Disable shared storage recovery for instances</shortdesc>
|
|
|
937446 |
+<longdesc lang="en">Deprecated - do not use anymore.</longdesc>
|
|
|
937446 |
+<shortdesc lang="en">Deprecated - do not use anymore</shortdesc>
|
|
|
937446 |
<content type="boolean" default="0" />
|
|
|
937446 |
</parameter>
|
|
|
937446 |
|
|
|
937446 |
@@ -186,9 +173,8 @@
|
|
|
937446 |
|
|
|
937446 |
nova_validate() {
|
|
|
937446 |
rc=$OCF_SUCCESS
|
|
|
937446 |
- fence_options=""
|
|
|
937446 |
|
|
|
937446 |
- check_binary openstack-config
|
|
|
937446 |
+ check_binary crudini
|
|
|
937446 |
check_binary nova-compute
|
|
|
937446 |
|
|
|
937446 |
if [ ! -f /etc/nova/nova.conf ]; then
|
|
|
937446 |
@@ -196,81 +182,14 @@
|
|
|
937446 |
exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
fi
|
|
|
937446 |
|
|
|
937446 |
- if [ -z "${OCF_RESKEY_auth_url}" ]; then
|
|
|
937446 |
- ocf_exit_reason "auth_url not configured"
|
|
|
937446 |
- exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- fence_options="${fence_options} -k ${OCF_RESKEY_auth_url}"
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -z "${OCF_RESKEY_username}" ]; then
|
|
|
937446 |
- ocf_exit_reason "username not configured"
|
|
|
937446 |
- exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- fence_options="${fence_options} -l ${OCF_RESKEY_username}"
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -z "${OCF_RESKEY_password}" ]; then
|
|
|
937446 |
- ocf_exit_reason "password not configured"
|
|
|
937446 |
- exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- fence_options="${fence_options} -p ${OCF_RESKEY_password}"
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -z "${OCF_RESKEY_tenant_name}" ]; then
|
|
|
937446 |
- ocf_exit_reason "tenant_name not configured"
|
|
|
937446 |
- exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- fence_options="${fence_options} -t ${OCF_RESKEY_tenant_name}"
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -n "${OCF_RESKEY_domain}" ]; then
|
|
|
937446 |
- fence_options="${fence_options} -d ${OCF_RESKEY_domain}"
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -n "${OCF_RESKEY_no_shared_storage}" ]; then
|
|
|
937446 |
- if ocf_is_true "${OCF_RESKEY_no_shared_storage}"; then
|
|
|
937446 |
- fence_options="${fence_options} --no-shared-storage"
|
|
|
937446 |
- fi
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- if [ -n "${OCF_RESKEY_endpoint_type}" ]; then
|
|
|
937446 |
- case ${OCF_RESKEY_endpoint_type} in
|
|
|
937446 |
- adminURL|publicURL|internalURL) ;;
|
|
|
937446 |
- *)
|
|
|
937446 |
- ocf_exit_reason "endpoint_type ${OCF_RESKEY_endpoint_type} not valid. Use adminURL or publicURL or internalURL"
|
|
|
937446 |
- exit $OCF_ERR_CONFIGURED
|
|
|
937446 |
- ;;
|
|
|
937446 |
- esac
|
|
|
937446 |
- fence_options="${fence_options} -e ${OCF_RESKEY_endpoint_type}"
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- # we take a chance here and hope that host is either not configured
|
|
|
937446 |
- # or configured in nova.conf
|
|
|
937446 |
-
|
|
|
937446 |
- NOVA_HOST=$(openstack-config --get /etc/nova/nova.conf DEFAULT host 2>/dev/null)
|
|
|
937446 |
+ NOVA_HOST=$(crudini --get /etc/nova/nova.conf DEFAULT host 2>/dev/null)
|
|
|
937446 |
if [ $? = 1 ]; then
|
|
|
937446 |
- if [ "x${OCF_RESKEY_domain}" != x ]; then
|
|
|
937446 |
- NOVA_HOST=$(uname -n | awk -F. '{print $1}')
|
|
|
937446 |
- else
|
|
|
937446 |
- NOVA_HOST=$(uname -n)
|
|
|
937446 |
- fi
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- # We only need to check a configured value, calculated ones are fine
|
|
|
937446 |
- openstack-config --get /etc/nova/nova.conf DEFAULT host 2>/dev/null
|
|
|
937446 |
- if [ $? = 0 ]; then
|
|
|
937446 |
- if [ "x${OCF_RESKEY_domain}" != x ]; then
|
|
|
937446 |
- short_host=$(uname -n | awk -F. '{print $1}')
|
|
|
937446 |
- if [ "x$NOVA_HOST" != "x${short_host}" ]; then
|
|
|
937446 |
- ocf_exit_reason "Invalid Nova host name, must be ${short_host} in order for instance recovery to function"
|
|
|
937446 |
- rc=$OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
-
|
|
|
937446 |
- elif [ "x$NOVA_HOST" != "x$(uname -n)" ]; then
|
|
|
937446 |
- ocf_exit_reason "Invalid Nova host name, must be $(uname -n) in order for instance recovery to function"
|
|
|
937446 |
- rc=$OCF_ERR_CONFIGURED
|
|
|
937446 |
- fi
|
|
|
937446 |
+ short_host=$(uname -n | awk -F. '{print $1}')
|
|
|
937446 |
+ if [ "x${OCF_RESKEY_domain}" != x ]; then
|
|
|
937446 |
+ NOVA_HOST=${short_host}.${OCF_RESKEY_domain}
|
|
|
937446 |
+ else
|
|
|
937446 |
+ NOVA_HOST=$(uname -n)
|
|
|
937446 |
+ fi
|
|
|
937446 |
fi
|
|
|
937446 |
|
|
|
937446 |
if [ $rc != $OCF_SUCCESS ]; then
|