Skip to content

Commit

Permalink
Merge "Cinder provision issue fix in liberty" into R3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 8, 2016
2 parents 2df7c0a + 0ab179c commit 0879c5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,14 @@ CINDER_SERVICE_TYPE=v1
# 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')")
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)
os_cinder=$(dpkg-query -W -f='${Version}' cinder-api)
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
print LooseVersion('$os_cinder') >= LooseVersion('1:2015.1.1')")
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,14 @@ CINDER_SERVICE_TYPE=v1
# 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')")
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)
os_cinder=$(dpkg-query -W -f='${Version}' cinder-api)
is_kilo_or_above=$(python -c "from distutils.version import LooseVersion; \
print LooseVersion('$os_cinder') >= LooseVersion('1:2015.1.1')")
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)
Expand Down

0 comments on commit 0879c5e

Please sign in to comment.