You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

169 lines
5.7 KiB

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