Merge "Use crudini instead of openstack-config"

This commit is contained in:
Jenkins 2016-01-14 08:51:07 +00:00 committed by Gerrit Code Review
commit 8906297008

View File

@ -250,7 +250,7 @@ nova_validate() {
rc=$OCF_SUCCESS rc=$OCF_SUCCESS
fence_options="" fence_options=""
check_binary openstack-config check_binary crudini
check_binary nova-compute check_binary nova-compute
if [ ! -f /etc/nova/nova.conf ]; then if [ ! -f /etc/nova/nova.conf ]; then
@ -310,7 +310,7 @@ nova_validate() {
# we take a chance here and hope that host is either not configured # we take a chance here and hope that host is either not configured
# or configured in nova.conf # 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 [ $? = 1 ]; then
if [ "x${OCF_RESKEY_domain}" != x ]; then if [ "x${OCF_RESKEY_domain}" != x ]; then
NOVA_HOST=$(uname -n | awk -F. '{print $1}') NOVA_HOST=$(uname -n | awk -F. '{print $1}')
@ -320,7 +320,7 @@ nova_validate() {
fi fi
# We only need to check a configured value, calculated ones are fine # We only need to check a configured value, calculated ones are fine
openstack-config --get /etc/nova/nova.conf DEFAULT host 2>/dev/null crudini --get /etc/nova/nova.conf DEFAULT host 2>/dev/null
if [ $? = 0 ]; then if [ $? = 0 ]; then
if [ "x${OCF_RESKEY_domain}" != x ]; then if [ "x${OCF_RESKEY_domain}" != x ]; then
short_host=$(uname -n | awk -F. '{print $1}') short_host=$(uname -n | awk -F. '{print $1}')