Merge "Fix failover with L3 HA"
This commit is contained in:
commit
04ab6d5b50
@ -89,7 +89,7 @@ class VPNAgent(l3_extension.L3AgentExtension):
|
|||||||
for device_driver in self.device_drivers:
|
for device_driver in self.device_drivers:
|
||||||
if router_id in device_driver.processes:
|
if router_id in device_driver.processes:
|
||||||
process = device_driver.processes[router_id]
|
process = device_driver.processes[router_id]
|
||||||
if state == 'master':
|
if state in ('master', 'primary'):
|
||||||
process.enable()
|
process.enable()
|
||||||
else:
|
else:
|
||||||
process.disable()
|
process.disable()
|
||||||
|
@ -489,7 +489,7 @@ class TestIPSecBase(framework.L3AgentTestFramework):
|
|||||||
site.backup_router = self.create_router(self.failover_agent,
|
site.backup_router = self.create_router(self.failover_agent,
|
||||||
backup_info)
|
backup_info)
|
||||||
linux_utils.wait_until_true(
|
linux_utils.wait_until_true(
|
||||||
lambda: site.router.ha_state == 'master')
|
lambda: site.router.ha_state in ('master', 'primary'))
|
||||||
linux_utils.wait_until_true(
|
linux_utils.wait_until_true(
|
||||||
lambda: site.backup_router.ha_state == 'backup')
|
lambda: site.backup_router.ha_state == 'backup')
|
||||||
|
|
||||||
@ -557,7 +557,8 @@ class TestIPSecBase(framework.L3AgentTestFramework):
|
|||||||
device_name = router1.get_ha_device_name()
|
device_name = router1.get_ha_device_name()
|
||||||
ha_device = ip_lib.IPDevice(device_name, router1.ns_name)
|
ha_device = ip_lib.IPDevice(device_name, router1.ns_name)
|
||||||
ha_device.link.set_down()
|
ha_device.link.set_down()
|
||||||
linux_utils.wait_until_true(lambda: router2.ha_state == 'master')
|
linux_utils.wait_until_true(
|
||||||
|
lambda: router2.ha_state in ('master', 'primary'))
|
||||||
linux_utils.wait_until_true(lambda: router1.ha_state == 'backup')
|
linux_utils.wait_until_true(lambda: router1.ha_state == 'backup')
|
||||||
|
|
||||||
def _ipsec_process_exists(self, conf, router, pid_files):
|
def _ipsec_process_exists(self, conf, router, pid_files):
|
||||||
|
Loading…
Reference in New Issue
Block a user