Add fullstack test to restart agent with active l3-ha router

Re-start of the l3 agent hosting the active l3-ha router
shouldn't cause data plane interruption, assuming there
is no failover.  Create a test explicitly for that.

Change-Id: I5963c21e2b382a09c40b81e2446350696e16d265
Related-Bug: #1776459
This commit is contained in:
Brian Haley 2018-07-03 13:31:02 -04:00
parent 878ac9b463
commit 88a0ebbe7f
1 changed files with 6 additions and 1 deletions

View File

@ -335,7 +335,7 @@ class TestHAL3Agent(TestL3Agent):
"master",
self._get_keepalived_state(keepalived_state_file))
def test_ha_router_restart_standby_agents_no_packet_lost(self):
def test_ha_router_restart_agents_no_packet_lost(self):
tenant_id = uuidutils.generate_uuid()
ext_net, ext_sub = self._create_external_network_and_subnet(tenant_id)
router = self.safe_client.create_router(tenant_id, ha=True,
@ -367,6 +367,11 @@ class TestHAL3Agent(TestL3Agent):
l3_agents = [host.agents['l3'] for host in self.environment.hosts]
l3_standby_agents = self._get_l3_agents_with_ha_state(
l3_agents, router['id'], 'standby')
l3_active_agents = self._get_l3_agents_with_ha_state(
l3_agents, router['id'], 'active')
self._assert_ping_during_agents_restart(
l3_standby_agents, external_vm.namespace, [router_ip], count=60)
self._assert_ping_during_agents_restart(
l3_active_agents, external_vm.namespace, [router_ip], count=60)