2014-05-31 21:50:53 +03:00
|
|
|
#!/bin/bash -xe
|
2014-05-22 20:12:12 +03:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
|
|
|
# This script is executed inside pre_test_hook function in devstack gate.
|
2015-02-09 18:14:08 +02:00
|
|
|
# First argument ($1) expects boolean as value where:
|
|
|
|
# 'False' means share driver will not handle share servers
|
|
|
|
# 'True' means it will handle share servers.
|
2014-05-22 20:12:12 +03:00
|
|
|
|
2020-07-21 13:04:58 -07:00
|
|
|
# Import devstack function 'trueorfalse', 'deprecated'
|
2015-02-09 18:14:08 +02:00
|
|
|
source $BASE/new/devstack/functions
|
|
|
|
|
2020-07-21 13:04:58 -07:00
|
|
|
deprecated "Manila's pre_test_hook and post_test_hook scripts are DEPRECATED. Please use alternate tools to configure devstack's local.conf file"
|
|
|
|
|
2017-02-24 10:04:16 -05:00
|
|
|
localconf=$BASE/new/devstack/local.conf
|
|
|
|
|
|
|
|
echo "[[local|localrc]]" >> $localconf
|
|
|
|
echo "DEVSTACK_GATE_TEMPEST_ALLOW_TENANT_ISOLATION=1" >> $localconf
|
|
|
|
echo "API_RATE_LIMIT=False" >> $localconf
|
|
|
|
echo "VOLUME_BACKING_FILE_SIZE=22G" >> $localconf
|
|
|
|
echo "CINDER_LVM_TYPE=thin" >> $localconf
|
2014-06-26 05:12:08 -04:00
|
|
|
|
2018-09-24 15:51:54 -07:00
|
|
|
# Set DevStack's PYTHON3_VERSION variable if CI scripts specify it
|
2019-03-28 14:46:06 -04:00
|
|
|
if [[ ! -z "$PYTHON3_VERSION" ]]; then
|
|
|
|
echo "PYTHON3_VERSION=$PYTHON3_VERSION" >> $localconf
|
2018-09-24 15:51:54 -07:00
|
|
|
fi
|
|
|
|
|
2016-03-09 14:51:58 +01:00
|
|
|
# NOTE(mkoderer): switch to keystone v3 by default
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "IDENTITY_API_VERSION=3" >> $localconf
|
2016-03-09 14:51:58 +01:00
|
|
|
|
2016-02-02 17:22:19 +02:00
|
|
|
# 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.
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "CINDER_OVERSUBSCRIPTION_RATIO=100.0" >> $localconf
|
2020-10-18 12:25:18 -03:00
|
|
|
echo "MANILA_ENABLED_BACKENDS=london,paris" >> $localconf
|
2014-06-26 05:12:08 -04:00
|
|
|
|
2019-07-29 17:10:49 -07:00
|
|
|
echo "MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=${MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE:=True}" >> $localconf
|
|
|
|
|
[devstack][ci] Modify firewall in ds-plugin
To set up some first party backends such as
ZFSOnLinux, CephFS via NFS gateway, Container
(where the NAS server is containerized) and LVM,
manila's devstack plugin creates a NAS server
on the devstack host.
On test machines, access to this NAS server is
firewalled from networks outside of the host's
internal network namespace (including from private
project networks that are in different network
namespaces, on the same devstack host).
We currently use a legacy devstack-gate script
to disable firewall on NFS ports; however,
anyone that installs devstack with LVM, Container,
ZFSOnLinux, CephFS-NFS drivers will need these
firewall ports to be opened to be able to mount
shares exported off their devstack host machines.
Move these firewall commands to the devstack plugin.
These commands can be invoked by setting the localrc
variable MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST to True.
The value of this variable is False by default,
to preserve existing behavior.
Change-Id: Ic9cad47662f1edf2e5c710dbe64d580bc5f01d44
2020-04-28 17:32:07 -07:00
|
|
|
echo "MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST=${MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST:=False}" >> $localconf
|
|
|
|
|
2015-12-28 14:23:58 +02:00
|
|
|
# === Handle script arguments ===
|
|
|
|
# First argument is expected to be a boolean-like value for DHSS.
|
|
|
|
DHSS=$1
|
|
|
|
DHSS=$(trueorfalse True DHSS)
|
2015-02-09 18:14:08 +02:00
|
|
|
|
2015-12-28 14:23:58 +02:00
|
|
|
# Second argument is expected to have codename of a share driver.
|
|
|
|
DRIVER=$2
|
|
|
|
|
|
|
|
# Third argument is expected to contain value equal either to 'singlebackend'
|
|
|
|
# or 'multibackend' that defines how many back-ends should be configured.
|
|
|
|
BACK_END_TYPE=$3
|
|
|
|
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "MANILA_OPTGROUP_london_driver_handles_share_servers=$DHSS" >> $localconf
|
|
|
|
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
|
2015-07-10 13:01:07 +03:00
|
|
|
|
2016-08-23 09:25:52 -03:00
|
|
|
# Set MANILA_ADMIN_NET_RANGE for admin_network and data_service IP
|
2017-02-24 10:04:16 -05:00
|
|
|
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
|
|
|
|
echo "MANILA_DATA_COPY_CHECK_HASH=${MANILA_DATA_COPY_CHECK_HASH:=True}" >> $localconf
|
2016-08-23 09:25:52 -03:00
|
|
|
|
2016-06-06 17:10:06 -03:00
|
|
|
# Share Migration CI tests migration_continue period task interval
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "MANILA_SHARE_MIGRATION_PERIOD_TASK_INTERVAL=${MANILA_SHARE_MIGRATION_PERIOD_TASK_INTERVAL:=1}" >> $localconf
|
2020-06-19 14:34:36 +00:00
|
|
|
# Share Server Migration CI tests migration_continue period task interval
|
|
|
|
echo "MANILA_SERVER_MIGRATION_PERIOD_TASK_INTERVAL=${MANILA_SERVER_MIGRATION_PERIOD_TASK_INTERVAL:=10}" >> $localconf
|
2016-06-06 17:10:06 -03:00
|
|
|
|
2016-12-12 09:14:57 -02:00
|
|
|
MANILA_SERVICE_IMAGE_ENABLED=${MANILA_SERVICE_IMAGE_ENABLED:-False}
|
2016-08-16 22:36:13 -04:00
|
|
|
DEFAULT_EXTRA_SPECS=${DEFAULT_EXTRA_SPECS:-"'snapshot_support=True create_share_from_snapshot_support=True'"}
|
|
|
|
|
2020-07-21 13:04:58 -07:00
|
|
|
if [[ "$DRIVER" == "windows" ]]; then
|
2016-03-04 21:48:19 +02:00
|
|
|
MANILA_SERVICE_IMAGE_ENABLED=True
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "SHARE_DRIVER=manila.share.drivers.windows.windows_smb_driver.WindowsSMBDriver" >> $localconf
|
2015-12-16 16:39:28 +02:00
|
|
|
fi
|
|
|
|
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "MANILA_SERVICE_IMAGE_ENABLED=$MANILA_SERVICE_IMAGE_ENABLED" >> $localconf
|
2018-12-07 12:10:15 -05:00
|
|
|
if [[ "$MANILA_SERVICE_IMAGE_ENABLED" == True ]]; then
|
|
|
|
echo "MANILA_SERVICE_IMAGE_URL=$MANILA_SERVICE_IMAGE_URL" >> $localconf
|
|
|
|
echo "MANILA_SERVICE_IMAGE_NAME=$MANILA_SERVICE_IMAGE_NAME" >> $localconf
|
|
|
|
fi
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=$DEFAULT_EXTRA_SPECS" >> $localconf
|
2018-07-10 17:23:12 +00:00
|
|
|
echo "MANILA_CONFIGURE_DEFAULT_TYPES=${MANILA_CONFIGURE_DEFAULT_TYPES:-True}" >> $localconf
|
2016-03-04 21:48:19 +02:00
|
|
|
|
2015-06-22 16:03:13 +03:00
|
|
|
# Enabling isolated metadata in Neutron is required because
|
|
|
|
# Tempest creates isolated networks and created vm's in scenario tests don't
|
|
|
|
# have access to Nova Metadata service. This leads to unavailability of
|
|
|
|
# created vm's in scenario tests.
|
2017-02-24 10:04:16 -05:00
|
|
|
echo "ENABLE_ISOLATED_METADATA=True" >> $localconf
|
|
|
|
|
|
|
|
echo "TEMPEST_USE_TEST_ACCOUNTS=True" >> $localconf
|
|
|
|
echo "TEMPEST_ALLOW_TENANT_ISOLATION=False" >> $localconf
|
|
|
|
echo "TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-8}" >> $localconf
|
2015-06-22 16:03:13 +03:00
|
|
|
|
2017-11-21 11:00:45 -02:00
|
|
|
MANILA_SETUP_IPV6=${MANILA_SETUP_IPV6:-False}
|
|
|
|
echo "MANILA_SETUP_IPV6=${MANILA_SETUP_IPV6}" >> $localconf
|
|
|
|
if [[ "$MANILA_SETUP_IPV6" == True ]]; then
|
|
|
|
# When setting up proper IPv6 networks, we should do it ourselves so we can
|
|
|
|
# use Neutron Dynamic Routing plugin with address scopes instead of the
|
|
|
|
# regular Neutron DevStack configuration.
|
|
|
|
echo "NEUTRON_CREATE_INITIAL_NETWORKS=False" >> $localconf
|
|
|
|
echo "IP_VERSION=4+6" >> $localconf
|
2019-07-16 14:55:21 -04:00
|
|
|
echo "MANILA_RESTORE_IPV6_DEFAULT_ROUTE=False" >> $localconf
|
2017-11-21 11:00:45 -02:00
|
|
|
fi
|