Fix Cinder's NoValidHostFound errors

Manila CI jobs create lots of shares and for Generic driver it means
lots of Cinder volumes. After merge of [1] to Cinder project, we started
having NoValidHostFound errors in Cinder logs, it changed default
oversubscription ratio to 1.0 from 20.0. But Manila CI requires it
be bigger than 1.0, so set it explicitly to Cinder's default value 20.0
that is used by all other driver but not LVM.

[1] I5a214462b573d00d26086512821b4f8cc1db4fc3

Change-Id: If0a6e535b92b1471572e1de98e3b44ab6a2c65c9
Closes-Bug: #1540947
This commit is contained in:
vponomaryov 2016-02-02 17:22:19 +02:00
parent 1149274eee
commit 8c3c73ada6
3 changed files with 22 additions and 0 deletions

View File

@ -27,6 +27,10 @@ echo "TEMPEST_SERVICES+=,manila" >> $localrc_path
echo "VOLUME_BACKING_FILE_SIZE=22G" >> $localrc_path
echo "CINDER_LVM_TYPE=thin" >> $localrc_path
# NOTE(vponomaryov): Set oversubscription ratio for Cinder LVM driver
# bigger than 1.0, because in CI we do not need such small value.
# It will allow us to avoid exceeding real capacity in CI test runs.
echo "CINDER_OVERSUBSCRIPTION_RATIO=20.0" >> $localrc_path
echo "MANILA_BACKEND1_CONFIG_GROUP_NAME=london" >> $localrc_path
echo "MANILA_BACKEND2_CONFIG_GROUP_NAME=paris" >> $localrc_path
echo "MANILA_SHARE_BACKEND1_NAME=LONDON" >> $localrc_path

View File

@ -541,9 +541,21 @@ elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
init_manila
echo_summary "Installing extra libraries"
install_libraries
# Neutron config update
if is_service_enabled neutron; then
iniset $Q_DHCP_CONF_FILE DEFAULT dnsmasq_local_resolv False
fi
# Cinder config update
if [[ -n "$CINDER_OVERSUBSCRIPTION_RATIO" ]]; then
CINDER_CONF=${CINDER_CONF:-/etc/cinder/cinder.conf}
CINDER_ENABLED_BACKENDS=$(iniget $CINDER_CONF DEFAULT enabled_backends)
for BN in ${CINDER_ENABLED_BACKENDS//,/ }; do
iniset $CINDER_CONF $BN lvm_max_over_subscription_ratio $CINDER_OVERSUBSCRIPTION_RATIO
done
iniset $CINDER_CONF DEFAULT max_over_subscription_ratio $CINDER_OVERSUBSCRIPTION_RATIO
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Creating Manila entities for auth service"
create_manila_accounts

View File

@ -20,6 +20,12 @@
# 'MANILA_BACKEND1_CONFIG_GROUP_NAME' and 'MANILA_BACKEND2_CONFIG_GROUP_NAME'
# to the env var 'MANILA_ENABLED_BACKENDS' or will be enabled
# if 'MANILA_ENABLED_BACKENDS' is empty.
#
# 4) 'CINDER_OVERSUBSCRIPTION_RATIO' - manila devstack-plugin env var that is
# useful for all share drivers that use Cinder. If it is set, then it will be
# applied for two Cinder options: 'max_over_subscription_ratio' and
# 'lvm_max_over_subscription_ratio'. Should be float. Example:
# CINDER_OVERSUBSCRIPTION_RATIO=20.0
# Defaults