Configure per backend availability zones in devstack
Every enabled backend gets assigned to its own AZ. Test cases in manila-tempest-plugin already exercise creating shares (and replicas) across AZs when multiple AZs are available. This is done for all back-end drivers that are not the Generic driver. Configuring backend AZ for each Generic driver based back end will require configuring Nova and Cinder in a similar fashion. Partially-implements: bp per-backend-availability-zones Depends-On: https://review.openstack.org/#/c/630886/ Depends-On: https://review.openstack.org/#/c/629958/ Change-Id: I1b6ff535a22f10e70d379377767c8ffac3ef5286
This commit is contained in:
parent
8f88779778
commit
22d25e834d
@ -374,6 +374,10 @@ if ! [[ -z "$OVERRIDE_IP_FOR_NFS_ACCESS" ]]; then
|
|||||||
iniset $TEMPEST_CONFIG share override_ip_for_nfs_access $OVERRIDE_IP_FOR_NFS_ACCESS
|
iniset $TEMPEST_CONFIG share override_ip_for_nfs_access $OVERRIDE_IP_FOR_NFS_ACCESS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Manila service details"
|
||||||
|
source $BASE/new/devstack/openrc admin admin
|
||||||
|
manila service-list
|
||||||
|
|
||||||
echo "Running tempest manila test suites"
|
echo "Running tempest manila test suites"
|
||||||
cd $BASE/new/tempest/
|
cd $BASE/new/tempest/
|
||||||
# List plugins in logs to enable debugging
|
# List plugins in logs to enable debugging
|
||||||
|
@ -144,6 +144,23 @@ function set_cinder_quotas {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_backend_availability_zones {
|
||||||
|
ENABLED_BACKENDS=$1
|
||||||
|
echo_summary "Setting up backend_availability_zone option \
|
||||||
|
for any enabled backends that do not use the Generic driver. \
|
||||||
|
Availability zones for the Generic driver must coincide with those \
|
||||||
|
created for Nova and Cinder."
|
||||||
|
local zonenum
|
||||||
|
generic_driver='manila.share.drivers.generic.GenericShareDriver'
|
||||||
|
for BE in ${ENABLED_BACKENDS//,/ }; do
|
||||||
|
share_driver=$(iniget $MANILA_CONF $BE share_driver)
|
||||||
|
if [[ $share_driver != $generic_driver ]]; then
|
||||||
|
zone="manila-zone-$((zonenum++))"
|
||||||
|
iniset $MANILA_CONF $BE backend_availability_zone $zone
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# configure_manila - Set config files, create data dirs, etc
|
# configure_manila - Set config files, create data dirs, etc
|
||||||
function configure_manila {
|
function configure_manila {
|
||||||
if [[ ! -d $MANILA_CONF_DIR ]]; then
|
if [[ ! -d $MANILA_CONF_DIR ]]; then
|
||||||
@ -272,6 +289,7 @@ function configure_manila {
|
|||||||
MANILA_CONFIGURE_GROUPS=${MANILA_CONFIGURE_GROUPS:-"$MANILA_ENABLED_BACKENDS"}
|
MANILA_CONFIGURE_GROUPS=${MANILA_CONFIGURE_GROUPS:-"$MANILA_ENABLED_BACKENDS"}
|
||||||
set_config_opts $MANILA_CONFIGURE_GROUPS
|
set_config_opts $MANILA_CONFIGURE_GROUPS
|
||||||
set_config_opts DEFAULT
|
set_config_opts DEFAULT
|
||||||
|
set_backend_availability_zones $MANILA_ENABLED_BACKENDS
|
||||||
|
|
||||||
if [ $(trueorfalse False MANILA_USE_MOD_WSGI) == True ]; then
|
if [ $(trueorfalse False MANILA_USE_MOD_WSGI) == True ]; then
|
||||||
_config_manila_apache_wsgi
|
_config_manila_apache_wsgi
|
||||||
|
Loading…
Reference in New Issue
Block a user