From 0f4db5877371b6730184a3fc9abb881d917e45e8 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Tue, 26 May 2020 14:17:21 +0200 Subject: [PATCH] Enable bridge debugging services on the tempest and grenade jobs This patch moves functions to enable br-ex-tcpdump and br-int-flows services from the ovn devstack plugin to the main neutron devstack plugin and enables it on all tempest and grenade jobs which are using neutron-openvswitch-agent as a L2 backend. Change-Id: Idfea869c08811914124d076da18cec17a12eee49 --- devstack/lib/ovn_agent | 10 ---------- devstack/plugin.sh | 9 +++++++++ zuul.d/grenade.yaml | 6 ++++++ zuul.d/tempest-multinode.yaml | 5 +++++ zuul.d/tempest-singlenode.yaml | 13 +++++++++++++ 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/devstack/lib/ovn_agent b/devstack/lib/ovn_agent index 3e989c9742f..634022ef100 100644 --- a/devstack/lib/ovn_agent +++ b/devstack/lib/ovn_agent @@ -768,16 +768,6 @@ function start_ovn { setup_logging $OVN_META_CONF fi - if is_service_enabled br-ex-tcpdump ; then - # tcpdump monitor on br-ex for ARP, reverse ARP and ICMP v4 / v6 packets - sudo ip link set dev $PUBLIC_BRIDGE up - run_process br-ex-tcpdump "/usr/sbin/tcpdump -i $PUBLIC_BRIDGE arp or rarp or icmp or icmp6 -enlX" "$STACK_GROUP" root - fi - - if is_service_enabled br-int-flows ; then - run_process br-int-flows "/bin/sh -c \"set +e; while true; do echo ovs-ofctl dump-flows br-int; ovs-ofctl dump-flows br-int ; sleep 30; done; \"" "$STACK_GROUP" root - fi - # NOTE(lucasagomes): To keep things simpler, let's reuse the same # RUNDIR for both OVS and OVN. This way we avoid having to specify the # --db option in the ovn-{n,s}bctl commands while playing with DevStack diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 67cb203dbfb..7bd1ea52aed 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -116,6 +116,15 @@ if [[ "$1" == "stack" ]]; then configure_ovn_plugin start_ovn fi + if is_service_enabled br-ex-tcpdump ; then + # tcpdump monitor on br-ex for ARP, reverse ARP and ICMP v4 / v6 packets + sudo ip link set dev $PUBLIC_BRIDGE up + run_process br-ex-tcpdump "/usr/sbin/tcpdump -i $PUBLIC_BRIDGE arp or rarp or icmp or icmp6 -enlX" "$STACK_GROUP" root + fi + + if is_service_enabled br-int-flows ; then + run_process br-int-flows "/bin/sh -c \"set +e; while true; do echo ovs-ofctl dump-flows br-int; ovs-ofctl dump-flows br-int ; sleep 30; done; \"" "$STACK_GROUP" root + fi ;; extra) if is_service_enabled q-sriov-agt neutron-sriov-agent; then diff --git a/zuul.d/grenade.yaml b/zuul.d/grenade.yaml index 657259781e3..b10ede93061 100644 --- a/zuul.d/grenade.yaml +++ b/zuul.d/grenade.yaml @@ -24,6 +24,8 @@ s-container: false s-object: false s-proxy: false + br-ex-tcpdump: true + br-int-flows: true - job: name: neutron-grenade-dvr-multinode @@ -43,6 +45,8 @@ s-container: false s-object: false s-proxy: false + br-ex-tcpdump: true + br-int-flows: true devstack_local_conf: post-config: $NEUTRON_CONF: @@ -76,6 +80,8 @@ q-agt: true q-l3: true q-meta: true + br-ex-tcpdump: true + br-int-flows: true devstack_local_conf: post-config: $NEUTRON_CONF: diff --git a/zuul.d/tempest-multinode.yaml b/zuul.d/tempest-multinode.yaml index aec6e5ebbbf..94e4d1be05e 100644 --- a/zuul.d/tempest-multinode.yaml +++ b/zuul.d/tempest-multinode.yaml @@ -25,6 +25,9 @@ voting: false vars: tox_envlist: integrated-network + devstack_services: + br-ex-tcpdump: true + br-int-flows: true devstack_local_conf: post-config: $NEUTRON_CONF: @@ -59,6 +62,8 @@ q-agt: true q-l3: true q-meta: true + br-ex-tcpdump: true + br-int-flows: true devstack_local_conf: post-config: $NEUTRON_CONF: diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 4f86cf52f55..25a8719ce16 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -10,6 +10,9 @@ tempest_concurrency: 4 devstack_localrc: Q_DVR_MODE: dvr_snat + devstack_services: + br-ex-tcpdump: true + br-int-flows: true irrelevant-files: &irrelevant-files - ^(test-|)requirements.txt$ - ^.*\.rst$ @@ -56,6 +59,8 @@ neutron-segments: true neutron-trunk: true neutron-uplink-status-propagation: true + br-ex-tcpdump: true + br-int-flows: true devstack_local_conf: post-config: $NEUTRON_CONF: @@ -104,6 +109,8 @@ devstack_services: postgresql: true mysql: false + br-ex-tcpdump: true + br-int-flows: true irrelevant-files: *irrelevant-files - job: @@ -117,6 +124,9 @@ vars: devstack_localrc: MYSQL_SERVICE_NAME: mariadb + devstack_services: + br-ex-tcpdump: true + br-int-flows: true # NOTE(ralonsoh): once MariaDB default version in Ubuntu is bumped to # >10.1, this workaround can be removed (bug 1855912) pre-run: playbooks/add_mariadb_repo.yaml @@ -140,6 +150,9 @@ vars: devstack_localrc: NEUTRON_DEPLOY_MOD_WSGI: true + devstack_services: + br-ex-tcpdump: true + br-int-flows: true irrelevant-files: *irrelevant-files - job: