From ad0881a25dd42b6cecdb0b3ba0b2bb8ef3247729 Mon Sep 17 00:00:00 2001 From: Alex Katz Date: Wed, 4 Nov 2020 18:13:56 +0200 Subject: [PATCH] Fix connectivity issue during external bridge recreation test In the faults test where we are testing if neutron-openvswitch-agent can properly recover after deletion and recreation of the external bridges, we are deleting all bridges which are in bridge-mappings for the neutron-openvswitch-agent. As we are doing that usually for an agent which runs on controller, we may lost connectivity to the OpenStack api as well. Better to save ip address to ping before the test to not to query API when it might be not accessible. Change-Id: Ieb9a59223639e3bbd997c6af748593d21cf8cba7 --- tobiko/tests/faults/neutron/test_ovs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tobiko/tests/faults/neutron/test_ovs.py b/tobiko/tests/faults/neutron/test_ovs.py index 17837745b..4b25e7f19 100644 --- a/tobiko/tests/faults/neutron/test_ovs.py +++ b/tobiko/tests/faults/neutron/test_ovs.py @@ -75,7 +75,8 @@ class OpenvswitchTest(testtools.TestCase): @undercloud.skip_if_missing_undercloud def test_recreate_physical_bridge(self): # Check if vm is reachable before test - ping.ping_until_received(self.stack.ip_address).assert_replied() + ip_add = self.stack.ip_address + ping.ping_until_received(ip_add).assert_replied() network_l3_agents = neutron.list_l3_agent_hosting_routers( self.router_id) @@ -86,6 +87,6 @@ class OpenvswitchTest(testtools.TestCase): agent['host'], ovs_agent['configurations']['bridge_mappings'].values()) - ping.ping_until_unreceived(self.stack.ip_address).assert_not_replied() + ping.ping_until_unreceived(ip_add).assert_not_replied() self._create_bridges() - ping.ping_until_received(self.stack.ip_address).assert_replied() + ping.ping_until_received(ip_add).assert_replied()