Skip to content

Commit

Permalink
Horizon fix
Browse files Browse the repository at this point in the history
Closes-Bug: #1532692
Kilo requires Cinder v2 service endpoints to be configured in keystone
identity_uri and auth_uri needs to be configured in cinder.conf

Change-Id: I7a1d6c20f13cdfc13a5b23af7e69279a90fe0281
  • Loading branch information
Jeya ganesh babu J committed Jan 13, 2016
1 parent d0d80dd commit 8e10ac9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 8 additions & 11 deletions contrail_provisioning/openstack/scripts/cinder-server-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [ -f /etc/lsb-release ] && egrep -q 'DISTRIB_ID.*Ubuntu' /etc/lsb-release; th
is_redhat=0
web_svc=apache2
mysql_svc=mysql
os_cinder=$(dpkg-query -W -f='${Version}' openstack-cinder)
os_cinder=$(dpkg-query -W -f='${Version}' cinder-api | cut -d ':' -f 2)
fi
echo "$0: Openstack Cinder Version: ( $os_cinder )"

Expand Down Expand Up @@ -110,17 +110,14 @@ export SERVICE_TOKEN
# Update all config files with service username and password
for svc in cinder; do

# If cinder is Kilo based in centos7/rhel7, needed more
# more settings
if [ $is_redhat -eq 1 ]; then
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
# If cinder is Kilo based, need additional settings
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
print LooseVersion('$os_cinder') >= LooseVersion('2015.1.1')")
if [ "$is_kilo_or_above" == "True" ]; then
openstack-config --set /etc/$svc/$svc.conf keystone_authtoken \
auth_uri http://${controller_ip}:5000/v2.0
openstack-config --set /etc/$svc/$svc.conf keystone_authtoken \
identity_uri http://${controller_ip}:35357
fi
if [ "$is_kilo_or_above" == "True" ]; then
openstack-config --set /etc/$svc/$svc.conf keystone_authtoken \
auth_uri http://${controller_ip}:5000/v2.0
openstack-config --set /etc/$svc/$svc.conf keystone_authtoken \
identity_uri http://${controller_ip}:35357
fi

openstack-config --set /etc/$svc/$svc.conf keystone_authtoken admin_tenant_name service
Expand Down
19 changes: 11 additions & 8 deletions contrail_provisioning/openstack/scripts/contrail-keystone-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,19 @@ fi
CINDER_SERVICE=""
CINDER_USER=""
CINDER_SERVICE_TYPE=v1
# If cinder is Kilo based in centos7/rhel7, volumev2 services are required
# If cinder is Kilo based, volumev2 services are required
if [ -f /etc/redhat-release ]; then
os_cinder=$(rpm -q --queryformat="%{VERSION}" openstack-cinder)
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
print LooseVersion('$os_cinder') >= LooseVersion('2015.1.1')")
if [ "$is_kilo_or_above" == "True" ]; then
CINDER_SERVICE=$(get_service "cinderv2" volumev2 "Cinder V2 Service")
CINDER_USER=$(get_service_user cinderv2)
CINDER_SERVICE_TYPE=v2
fi
fi
if [ -f /etc/lsb-release ] && egrep -q 'DISTRIB_ID.*Ubuntu' /etc/lsb-release; then
os_cinder=$(dpkg-query -W -f='${Version}' cinder-api | cut -d ':' -f 2)
fi
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
print LooseVersion('$os_cinder') >= LooseVersion('2015.1.1')")
if [ "$is_kilo_or_above" == "True" ]; then
CINDER_SERVICE=$(get_service "cinderv2" volumev2 "Cinder V2 Service")
CINDER_USER=$(get_service_user cinderv2)
CINDER_SERVICE_TYPE=v2
fi

# Create cinder service if not created in above steps
Expand Down

0 comments on commit 8e10ac9

Please sign in to comment.