[manila] Fix pre-test-hook to not setup ipv6 always

IPv6 export policy support was added to the Manila
CephFS-via-NFS driver in the Train release. This
devstack plugin is branchless, so we'll need to
check for the relevant branch to setup the ipv6
test harness.

The pre-test and post-test hooks will be deleted soon
when devstack-gate is dropped by manila test jobs
in the Victoria cycle. So this code is temporary
but required to make ceph-via-nfs tests pass
in stable/queens-stein branches.

Change-Id: I91a54a8f72d1d514afbfa769c7e8f2ac21d502dc
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2020-05-19 11:59:02 -07:00
parent df5462d3a9
commit ad7e234ff6
1 changed files with 4 additions and 5 deletions

View File

@ -64,17 +64,16 @@ echo 'ENABLE_ISOLATED_METADATA=True' >> $localconf
# Need VMs to be able to access CephFS shares
echo "MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST=True" >> $localconf
if [[ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]]; then
export MANILA_SETUP_IPV6=True
fi
if [[ "$MANILA_SETUP_IPV6" == True ]]; then
# NOTE(gouthamr): These bash hooks will be deleted in the Victoria cycle,
# so the branch regex is deliberate.
IPv6_SUPPORTED_BRANCHES="stable/train stable/ussuri master"
if [[ $MANILA_CEPH_DRIVER == 'cephfsnfs' && $IPv6_SUPPORTED_BRANCHES =~ $ZUUL_BRANCH ]]; 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 "MANILA_SETUP_IPV6=True" >> $localconf
echo "MANILA_RESTORE_IPV6_DEFAULT_ROUTE=False" >> $localconf
echo "NEUTRON_CREATE_INITIAL_NETWORKS=False" >> $localconf
echo "IP_VERSION=4+6" >> $localconf
fi
# Go to Tempest dir and checkout stable commit to avoid possible