From b743ce036c69b8cda75c19bf73e3a7e1005fc35d Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Tue, 17 Jul 2018 14:21:01 +0200 Subject: [PATCH] Test bgp-dragent in scenario004 Adds testing for the bgp-dragent that is shipped by neutron-dynamic-routing in scenario004. Depends-On: https://review.openstack.org/#/c/586462/ Change-Id: I8998a1a0f0a8e944cd5f836b3cbe568aa99fcedb --- README.md | 1 + fixtures/scenario004.pp | 6 ++++-- manifests/neutron.pp | 15 ++++++++++++++- manifests/tempest.pp | 6 ++++++ run_tests.sh | 14 +++++++++++++- 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9cf0f4fb0..cf1f6d90e 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ scenario](#all-in-one). | vitrage | X | | | | | | watcher | | | | X | | | bgpvpn-api | | | | X | | +| bgp-dr | | | | X | | | redis | X | | | | | | l2gw | | | | X | | | om rpc | amqp1 | rabbit | rabbit | rabbit | rabbit | diff --git a/fixtures/scenario004.pp b/fixtures/scenario004.pp index 9dcd801cb..b162fe1a7 100644 --- a/fixtures/scenario004.pp +++ b/fixtures/scenario004.pp @@ -53,8 +53,9 @@ class { '::openstack_integration::glance': backend => 'swift', } class { '::openstack_integration::neutron': - bgpvpn_enabled => $bgpvpn_enabled, - l2gw_enabled => $l2gw_enabled, + bgpvpn_enabled => $bgpvpn_enabled, + l2gw_enabled => $l2gw_enabled, + bgp_dragent_enabled => true, } class { '::openstack_integration::nova': libvirt_rbd => true, @@ -77,4 +78,5 @@ class { '::openstack_integration::tempest': bgpvpn => $bgpvpn_enabled, l2gw => $l2gw_enabled, l2gw_switch => 'cell08-5930-01::FortyGigE1/0/1|100', + dr => true, } diff --git a/manifests/neutron.pp b/manifests/neutron.pp index 471fdf8fc..f6cebd8c7 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -14,6 +14,10 @@ # (optional) Flag to enable L2GW. # Defaults to false. # +# [*bgp_dragent_enabled*] +# (optional) Flag to enable BGP dragent +# Defaults to false. +# # [*notification_topics*] # (optional) AMQP topic used for OpenStack notifications # Defaults to $::os_service_default. @@ -22,6 +26,7 @@ class openstack_integration::neutron ( $driver = 'openvswitch', $bgpvpn_enabled = false, $l2gw_enabled = false, + $bgp_dragent_enabled = false, $notification_topics = $::os_service_default, ) { @@ -124,7 +129,11 @@ class openstack_integration::neutron ( true => 'networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin', default => undef, } - $plugins_list = delete_undef_values(['router', 'metering', 'firewall', 'lbaasv2', 'qos', 'trunk', $bgpvpn_plugin, $l2gw_plugin]) + $bgp_dr_plugin = $bgp_dragent_enabled ? { + true => 'neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin', + default => undef, + } + $plugins_list = delete_undef_values(['router', 'metering', 'firewall', 'lbaasv2', 'qos', 'trunk', $bgpvpn_plugin, $l2gw_plugin, $bgp_dr_plugin]) if $driver == 'linuxbridge' { $global_physnet_mtu = '1450' @@ -188,6 +197,7 @@ class openstack_integration::neutron ( rpc_workers => 2, validate => $validate_neutron_server_service, service_providers => $providers_list, + ensure_dr_package => $bgp_dragent_enabled, } class { '::neutron::services::lbaas': } @@ -235,4 +245,7 @@ class openstack_integration::neutron ( service_providers => 'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default' } } + if $bgp_dragent_enabled { + include ::neutron::agents::bgp_dragent + } } diff --git a/manifests/tempest.pp b/manifests/tempest.pp index edc103edd..cc495f198 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -60,6 +60,10 @@ # (optional) Define a switch name for testing. # Default to undef. # +# [*dr*] +# (optional) Define if Neutron Dynamic routing needs to be tested. +# Default to false. +# # [*mistral*] # (optional) Define if Mistral needs to be tested. # Default to false. @@ -125,6 +129,7 @@ class openstack_integration::tempest ( $ironic = false, $l2gw = false, $l2gw_switch = undef, + $dr = false, $mistral = false, $murano = false, $neutron = true, @@ -225,6 +230,7 @@ class openstack_integration::tempest ( neutron_bgpvpn_available => $bgpvpn, neutron_lbaas_available => true, neutron_l2gw_available => $l2gw, + neutron_dr_available => $dr, neutron_fwaas_available => true, ceilometer_available => $ceilometer, aodh_available => $aodh, diff --git a/run_tests.sh b/run_tests.sh index e4838cf49..27ee67a41 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -315,6 +315,10 @@ echo "test_create_show_list_update_delete_l2gateway" >> /tmp/openstack/tempest/t if uses_debs; then # TODO (amoralej) tempest tests for object_storage are not working in master with current version of tempest in uca (16.1.0). EXCLUDES="--regex=^(?!mistral_tempest_tests.tests.api.v2.test_executions.ExecutionTestsV2.test_get_list_executions.*$)(?!ceilometer.tests.tempest.api.test_telemetry_notification_api.TelemetryNotificationAPITest.test_check_glance_v2_notifications.*$)(?!tempest.api.object_storage.*$).*" + + # TODO(tobias-urdin): We must have the neutron-tempest-plugin to even test Neutron, is also required by + # vpnaas and dynamic routing projects. + $SUDO pip install neutron-tempest-plugin else # https://review.openstack.org/#/c/504345/ has changed the behavior of tempest when running with --regex and --whitelist-file # and now operator between them is OR when filtering tests (which is how it was documented, btw). In order to promote @@ -322,7 +326,15 @@ else # Note these tests were disabled in https://review.openstack.org/#/c/461969/ and hopefully it's more stable now and allows # us to run it until we can implement --blacklist-file in a stable way. #EXCLUDES="--regex=^(?!tempest.scenario.gnocchi.test.live_assert_vcpus_metric_is_really_expurged.test_request.*$)(?!tempest.scenario.gnocchi.test.live_assert_no_delete_metrics_have_the_gabbilive_policy.test_request.*$).*" - EXCLUDES="" + + # TODO(tobias-urdin): An ugly fix to make sure we get the ryu.tests.integrated.common module which is removed + # from the ryu RPM package. Remove this if we push a fix for the ryu centos package (4.26 is the packaged version). + git clone -b v4.26 https://github.com/osrg/ryu.git /tmp/openstack/ryu + $SUDO cp -R /tmp/openstack/ryu/ryu/tests/integrated/common/ /usr/lib/python2.7/site-packages/ryu/tests/integrated/ + + # NOTE(tobias-urdin): Blacklist the dynamic routing scenario tests because they use Docker which is not available and also + # requires the above mentioned ryu.tests.integrated.common module (we need to init tempest workspace now). + EXCLUDES="--black-regex=^neutron_dynamic_routing.tests.tempest.scenario.*" fi print_header 'Running Tempest' cd /tmp/openstack/tempest