Browse Source

[devstack][ci] Move bgp setup to plugin

We currently use a legacy devstack-gate script
to create the bgp speaker, and peer required
to communicate to and from the tenant private
IPv6 networks.

Move this logic to the devstack plugin so that
we can invoke it automatically with the existing
devstack variable MANILA_SETUP_IPV6.

Change-Id: Iea90e3f04ae05e5783c3163bbf2d2dabd128c7b5
(cherry picked from commit 2277c20c02)
(cherry picked from commit fc9ac3cb49)
(cherry picked from commit d4e0627e93)
changes/46/726946/1
Goutham Pacha Ravi 2 months ago
parent
commit
4b0d0a702d
2 changed files with 14 additions and 9 deletions
  1. +0
    -9
      contrib/ci/post_test_hook.sh
  2. +14
    -0
      devstack/plugin.sh

+ 0
- 9
contrib/ci/post_test_hook.sh View File

@@ -346,15 +346,6 @@ 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

# Set config to run IPv6 tests according to env var
iniset $TEMPEST_CONFIG share run_ipv6_tests $RUN_MANILA_IPV6_TESTS



+ 14
- 0
devstack/plugin.sh View File

@@ -1173,6 +1173,14 @@ function setup_ipv6 {

}

function setup_bgp_for_ipv6 {
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
}

# Main dispatcher
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Manila Client"
@@ -1291,6 +1299,12 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
allow_host_ports_for_share_mounting
fi

if [[ "$(trueorfalse False MANILA_SETUP_IPV6)" == "True" ]]; then
# Now that all plugins are loaded, setup BGP
echo_summary "Setting up BGP speaker to advertise routes to project networks"
setup_bgp_for_ipv6
fi

fi

if [[ "$1" == "unstack" ]]; then


Loading…
Cancel
Save