From 945f41b398957abd2863a8f5162cbc55716742e3 Mon Sep 17 00:00:00 2001 From: Tom Barron Date: 2019年7月16日 09:07:04 -0400 Subject: [PATCH] run IPv6 scenario tests with CephFS/NFS back end Depends-on: https://review.opendev.org/#/c/671134/ Depends-on: https://review.opendev.org/#/c/670510/ Change-Id: Ib812d2b960b1375129c7ff74c63c1acd2649102f --- manila/post_test_hook.sh | 17 +++++++++++++++++ manila/pre_test_hook.sh | 15 +++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/manila/post_test_hook.sh b/manila/post_test_hook.sh index 4afc1c4f..65eeeff4 100644 --- a/manila/post_test_hook.sh +++ b/manila/post_test_hook.sh @@ -60,10 +60,12 @@ if [[ $MANILA_CEPH_DRIVER == 'cephfsnative' ]]; then # CephFSNative driver does not yet support manage and unmanage operations of shares. RUN_MANILA_MANAGE_TESTS=${RUN_MANILA_MANAGE_TESTS:-False} iniset $TEMPEST_CONFIG share run_manage_unmanage_tests $RUN_MANILA_MANAGE_TESTS + RUN_MANILA_IPV6_TESTS=False elif [[ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]]; then iniset $TEMPEST_CONFIG share enable_protocols nfs iniset $TEMPEST_CONFIG share capability_storage_protocol NFS iniset $TEMPEST_CONFIG share enable_ip_rules_for_protocols nfs + RUN_MANILA_IPV6_TESTS=True fi # If testing a stable branch, we need to ensure we're testing with supported @@ -136,6 +138,21 @@ for ipcmd in iptables ip6tables; do done done +source $BASE/new/devstack/openrc admin admin +public_net_id=$(openstack network list --name $PUBLIC_NETWORK_NAME -f value -c ID ) +iniset $TEMPEST_CONFIG network public_network_id $public_net_id + +if [ $(trueorfalse False MANILA_SETUP_IPV6) == True ]; then + # Now that all plugins are loaded, setup BGP here + public_gateway_ipv6=$(openstack subnet show ipv6-public-subnet -c gateway_ip -f value) + neutron bgp-speaker-create --ip-version 6 --local-as 100 bgpspeaker + neutron bgp-speaker-network-add bgpspeaker $PUBLIC_NETWORK_NAME + neutron bgp-peer-create --peer-ip $public_gateway_ipv6 --remote-as 200 bgppeer + neutron bgp-speaker-peer-add bgpspeaker bgppeer +fi + +iniset $TEMPEST_CONFIG share run_ipv6_tests $RUN_MANILA_IPV6_TESTS + # Let us control if we die or not. set +o errexit cd $BASE/new/tempest diff --git a/manila/pre_test_hook.sh b/manila/pre_test_hook.sh index ca079b63..32f27e36 100644 --- a/manila/pre_test_hook.sh +++ b/manila/pre_test_hook.sh @@ -47,6 +47,8 @@ elif [[ $MANILA_BACKEND_TYPE == 'singlebackend' ]]; then echo "MANILA_MULTI_BACKEND=False">> $localconf fi +echo "SHARE_DRIVER=manila.share.drivers.cephfs.driver.CephFSDriver">> $localconf + echo "DEVSTACK_GATE_TEMPEST_ALLOW_TENANT_ISOLATION=1">> $localconf echo "API_RATE_LIMIT=False">> $localconf echo "MANILA_USE_DOWNGRADE_MIGRATIONS=True">> $localconf @@ -59,6 +61,19 @@ echo "MANILA_USE_SERVICE_INSTANCE_PASSWORD=True">> $localconf # service. This leads to unavailability of created VMs in scenario tests. echo 'ENABLE_ISOLATED_METADATA=True'>> $localconf +if [[ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]]; then + export MANILA_SETUP_IPV6=True +fi +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 "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 # incompatibilities for plugin stored in Manila repo. cd $BASE/new/tempest

AltStyle によって変換されたページ (->オリジナル) /