Remove backend deprecated variables

MANILA_MULTI_BACKEND has been deprecated for five years now, we should remove
it from our code base.

This variable was removed from the settings scripts along with:
MANILA_BACKEND1_CONFIG_GROUP_NAME and MANILA_SHARE_BACKEND1_NAME;
MANILA_BACKEND2_CONFIG_GROUP_NAME and MANILA_SHARE_BACKEND2_NAME.
Because they work in the same context.

Instead of them, the already implemented and in use,
MANILA_ENABLED_BACKENDS variable was placed to garantee the successful
back-end setup. The same replacement was made in the contribution
samples scripts.

Apart from this, we avoid configuring generic1 and generic2 if
another backend/s are selected.

Closes-Bug: #1898791
Closes-Bug: #1878477

Change-Id: I67036a65da9255694a00a9c8d56cfdefbdf23c05
This commit is contained in:
liviacavalcanti 2020-10-18 12:25:18 -03:00 committed by Victoria Martinez de la Cruz
parent 42b709e446
commit be794fb168
9 changed files with 21 additions and 79 deletions

View File

@ -42,10 +42,7 @@ echo "IDENTITY_API_VERSION=3" >> $localconf
# 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=100.0" >> $localconf
echo "MANILA_BACKEND1_CONFIG_GROUP_NAME=london" >> $localconf
echo "MANILA_BACKEND2_CONFIG_GROUP_NAME=paris" >> $localconf
echo "MANILA_SHARE_BACKEND1_NAME=LONDON" >> $localconf
echo "MANILA_SHARE_BACKEND2_NAME=PARIS" >> $localconf
echo "MANILA_ENABLED_BACKENDS=london,paris" >> $localconf
echo "MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=${MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE:=True}" >> $localconf
@ -68,12 +65,6 @@ echo "MANILA_OPTGROUP_paris_driver_handles_share_servers=$DHSS" >> $localconf
echo "MANILA_USE_SERVICE_INSTANCE_PASSWORD=True" >> $localconf
echo "MANILA_USE_DOWNGRADE_MIGRATIONS=True" >> $localconf
if [[ "$BACK_END_TYPE" == "multibackend" ]]; then
echo "MANILA_MULTI_BACKEND=True" >> $localconf
else
echo "MANILA_MULTI_BACKEND=False" >> $localconf
fi
# Set MANILA_ADMIN_NET_RANGE for admin_network and data_service IP
echo "MANILA_ADMIN_NET_RANGE=${MANILA_ADMIN_NET_RANGE:=10.2.5.0/24}" >> $localconf
echo "MANILA_DATA_NODE_IP=${MANILA_DATA_NODE_IP:=$MANILA_ADMIN_NET_RANGE}" >> $localconf

View File

@ -81,16 +81,12 @@ function _config_manila_apache_wsgi {
" -i $manila_api_apache_conf
}
# configure_default_backends - configures default Manila backends with generic driver.
function configure_default_backends {
# Configure two default backends with generic drivers onboard
for group_name in $MANILA_BACKEND1_CONFIG_GROUP_NAME $MANILA_BACKEND2_CONFIG_GROUP_NAME; do
# configure_backends - Configures backends enabled by MANILA_ENABLED_BACKENDS
function configure_backends {
# Configure MANILA_ENABLED_BACKENDS backends
for group_name in $(echo $MANILA_ENABLED_BACKENDS | sed "s/,/ /g"); do
iniset $MANILA_CONF $group_name share_driver $SHARE_DRIVER
if [ "$MANILA_BACKEND1_CONFIG_GROUP_NAME" == "$group_name" ]; then
iniset $MANILA_CONF $group_name share_backend_name $MANILA_SHARE_BACKEND1_NAME
else
iniset $MANILA_CONF $group_name share_backend_name $MANILA_SHARE_BACKEND2_NAME
fi
iniset $MANILA_CONF $group_name share_backend_name ${group_name^^}
iniset $MANILA_CONF $group_name path_to_public_key $MANILA_PATH_TO_PUBLIC_KEY
iniset $MANILA_CONF $group_name path_to_private_key $MANILA_PATH_TO_PRIVATE_KEY
iniset $MANILA_CONF $group_name service_image_name $MANILA_SERVICE_IMAGE_NAME
@ -270,17 +266,13 @@ function configure_manila {
if is_service_enabled glance; then
configure_keystone_authtoken_middleware $MANILA_CONF glance glance
fi
# Note: set up config group does not mean that this backend will be enabled.
# To enable it, specify its name explicitly using "enabled_share_backends" opt.
configure_default_backends
default_backends=$MANILA_BACKEND1_CONFIG_GROUP_NAME
if [ "$MANILA_MULTI_BACKEND" = "True" ]; then
default_backends+=,$MANILA_BACKEND2_CONFIG_GROUP_NAME
fi
if [ ! $MANILA_ENABLED_BACKENDS ]; then
# If $MANILA_ENABLED_BACKENDS is not set, use configured backends by default
export MANILA_ENABLED_BACKENDS=$default_backends
# MANILA_ENABLED_BACKENDS is a required option
echo -"No configured backends, please set a value to MANILA_ENABLED_BACKENDS"
exit 1
fi
configure_backends
iniset $MANILA_CONF DEFAULT enabled_share_backends $MANILA_ENABLED_BACKENDS
if [ ! -f $MANILA_PATH_TO_PRIVATE_KEY ]; then
@ -1008,13 +1000,11 @@ function remove_docker_service_image {
function install_libraries {
if [ $(trueorfalse False MANILA_MULTI_BACKEND) == True ]; then
if [ $(trueorfalse True RUN_MANILA_HOST_ASSISTED_MIGRATION_TESTS) == True ]; then
if is_ubuntu; then
install_package nfs-common
else
install_package nfs-utils
fi
if [ $(trueorfalse True RUN_MANILA_HOST_ASSISTED_MIGRATION_TESTS) == True ]; then
if is_ubuntu; then
install_package nfs-common
else
install_package nfs-utils
fi
fi
}

View File

@ -14,14 +14,7 @@
# 'MANILA_ENABLED_BACKENDS'.
# DEFAULT group is always defined, no need to specify it within 'MANILA_CONFIGURE_GROUPS'.
#
# 3) Two default backends are used for compatibility with previous approach.
# They have same configuration except name of backend. Both use generic driver.
# They can be enabled by adding values of following env vars:
# '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
# 3) '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:
@ -92,6 +85,7 @@ fi
# Common opts
SHARE_NAME_PREFIX=${SHARE_NAME_PREFIX:-share-}
MANILA_ENABLED_SHARE_PROTOCOLS=${ENABLED_SHARE_PROTOCOLS:-"NFS,CIFS"}
MANILA_ENABLED_BACKENDS=${MANILA_ENABLED_BACKENDS:-generic1,generic2}
MANILA_SCHEDULER_DRIVER=${MANILA_SCHEDULER_DRIVER:-manila.scheduler.filter_scheduler.FilterScheduler}
MANILA_SERVICE_SECGROUP="manila-service"
@ -142,24 +136,6 @@ MANILA_SERVICE_VM_FLAVOR_RAM=${MANILA_SERVICE_VM_FLAVOR_RAM:-320}
MANILA_SERVICE_VM_FLAVOR_DISK=${MANILA_SERVICE_VM_FLAVOR_DISK:-3}
MANILA_SERVICE_VM_FLAVOR_VCPUS=${MANILA_SERVICE_VM_FLAVOR_VCPUS:-1}
# Support for multi backend configuration (default is no support)
MANILA_MULTI_BACKEND=$(trueorfalse False MANILA_MULTI_BACKEND)
DEPRECATED_TEXT="$DEPRECATED_TEXT\n'MANILA_MULTI_BACKEND' is deprecated,
it makes influence only when is set to True and 'MANILA_ENABLED_BACKENDS' is not set.
Use 'MANILA_ENABLED_BACKENDS' instead if you want to use custom setting.
Set there a list of back end names to be enabled.\n
To configure custom back ends use (any opt in any group can be set in this way) following:
MANILA_OPTGROUP_foo_bar=value
where 'foo' is name of config group and 'bar' is name of option.\n"
# First share backend data, that will be used in any installation
MANILA_BACKEND1_CONFIG_GROUP_NAME=${MANILA_BACKEND1_CONFIG_GROUP_NAME:-generic1} # deprecated
MANILA_SHARE_BACKEND1_NAME=${MANILA_SHARE_BACKEND1_NAME:-GENERIC1} # deprecated
# Second share backend data, that will be used only with MANILA_MULTI_BACKEND=True
MANILA_BACKEND2_CONFIG_GROUP_NAME=${MANILA_BACKEND2_CONFIG_GROUP_NAME:-generic2} # deprecated
MANILA_SHARE_BACKEND2_NAME=${MANILA_SHARE_BACKEND2_NAME:-GENERIC2} # deprecated
# Enable this option when using a storage backend that is on the same host
# as the devstack host, these iptable rules are necessary to allow mounting
# shares from the host

View File

@ -61,8 +61,7 @@ local.conf:
.. code-block:: ini
enable_plugin manila https://opendev.org/openstack/manila <ref>
MANILA_BACKEND1_CONFIG_GROUP_NAME=london
MANILA_SHARE_BACKEND1_NAME=LONDON
MANILA_ENABLED_BACKENDS=london
MANILA_OPTGROUP_london_driver_handles_share_servers=True
MANILA_OPTGROUP_london_neutron_host_id=<hostname>
SHARE_DRIVER=manila.share.drivers.container.driver.ContainerShareDriver

View File

@ -25,10 +25,6 @@ enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest
MANILA_SERVICE_IMAGE_ENABLED=False
SHARE_DRIVER=manila.share.drivers.container.driver.ContainerShareDriver
MANILA_ENABLED_BACKENDS=vienna,prague
MANILA_BACKEND1_CONFIG_GROUP_NAME=vienna
MANILA_BACKEND2_CONFIG_GROUP_NAME=prague
MANILA_SHARE_BACKEND1_NAME=VIENNA
MANILA_SHARE_BACKEND2_NAME=PRAGUE
MANILA_OPTGROUP_vienna_driver_handles_share_servers=True
MANILA_OPTGROUP_prague_driver_handles_share_servers=True
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='snapshot_support=false'

View File

@ -25,10 +25,6 @@ enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest
# Generic Back end config options
SHARE_DRIVER=manila.share.drivers.generic.GenericShareDriver
MANILA_ENABLED_BACKENDS=tokyo,shanghai
MANILA_BACKEND1_CONFIG_GROUP_NAME=tokyo
MANILA_BACKEND2_CONFIG_GROUP_NAME=shanghai
MANILA_SHARE_BACKEND1_NAME=TOKYO
MANILA_SHARE_BACKEND2_NAME=SHANGHAI
MANILA_OPTGROUP_tokyo_driver_handles_share_servers=True
MANILA_OPTGROUP_shanghai_driver_handles_share_servers=True
MANILA_OPTGROUP_tokyo_connect_share_server_to_tenant_network=True

View File

@ -25,10 +25,6 @@ enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest
MANILA_SERVICE_IMAGE_ENABLED=False
SHARE_DRIVER=manila.share.drivers.lvm.LVMShareDriver
MANILA_ENABLED_BACKENDS=chicago,denver
MANILA_BACKEND1_CONFIG_GROUP_NAME=chicago
MANILA_BACKEND2_CONFIG_GROUP_NAME=denver
MANILA_SHARE_BACKEND1_NAME=CHICAGO
MANILA_SHARE_BACKEND2_NAME=DENVER
MANILA_OPTGROUP_chicago_driver_handles_share_servers=False
MANILA_OPTGROUP_denver_driver_handles_share_servers=False
SHARE_BACKING_FILE_SIZE=32000M

View File

@ -25,10 +25,6 @@ enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest
MANILA_SERVICE_IMAGE_ENABLED=False
SHARE_DRIVER=manila.share.drivers.zfsonlinux.driver.ZFSonLinuxShareDriver
MANILA_ENABLED_BACKENDS=bangalore,mumbai
MANILA_BACKEND1_CONFIG_GROUP_NAME=bangalore
MANILA_BACKEND2_CONFIG_GROUP_NAME=mumbai
MANILA_SHARE_BACKEND1_NAME=BANGALORE
MANILA_SHARE_BACKEND2_NAME=MUMBAI
MANILA_OPTGROUP_bangalore_driver_handles_share_servers=False
MANILA_OPTGROUP_mumbai_driver_handles_share_servers=False
MANILA_REPLICA_STATE_UPDATE_INTERVAL=60

View File

@ -29,6 +29,8 @@
MANILA_CONFIGURE_DEFAULT_TYPES: true
SHARE_DRIVER: manila.share.drivers.lvm.LVMShareDriver
MANILA_ENABLED_BACKENDS: london,paris
# TODO(vkmc) Grenade uses prior branch for running tests
# Drop this variables in Xena once Wallaby is shipped
MANILA_BACKEND1_CONFIG_GROUP_NAME: london
MANILA_BACKEND2_CONFIG_GROUP_NAME: paris
MANILA_SHARE_BACKEND1_NAME: LONDON