Revert "[L3][HA] Retry when setting HA router GW status."
In short this patch can cause the privsep reader thread to die resulting in the l3 agent getting stuck and e.g. not processing any router updates. See related LP bug for full explanation. Closes-Bug: #1927868 This reverts commit 662f483120972a373e19bde52f16392e2ccb9c82. Change-Id: Ide7e9771d08eb623dd75941e425813d9b857b4c6 (cherry picked from commit 344fc0c8d2ce7d942606c834a54cb81f0b47aa37)
This commit is contained in:
parent
407fdfacdb
commit
5049a8faf1
@ -544,11 +544,8 @@ class HaRouter(router.RouterInfo):
|
||||
if ex_gw_port_id:
|
||||
interface_name = self.get_external_device_name(ex_gw_port_id)
|
||||
ns_name = self.get_gw_ns_name()
|
||||
if (not self.driver.set_link_status(
|
||||
interface_name, namespace=ns_name, link_up=link_up) and
|
||||
link_up):
|
||||
LOG.error('Gateway interface for router %s was not set up; '
|
||||
'router will not work properly', self.router_id)
|
||||
self.driver.set_link_status(interface_name, ns_name,
|
||||
link_up=link_up)
|
||||
if link_up and set_gw:
|
||||
preserve_ips = self.get_router_preserve_ips()
|
||||
self._external_gateway_settings(ex_gw_port, interface_name,
|
||||
|
@ -322,20 +322,14 @@ class LinuxInterfaceDriver(object, metaclass=abc.ABCMeta):
|
||||
|
||||
def set_link_status(self, device_name, namespace=None, link_up=True):
|
||||
ns_dev = ip_lib.IPWrapper(namespace=namespace).device(device_name)
|
||||
try:
|
||||
utils.wait_until_true(ns_dev.exists, timeout=3)
|
||||
except utils.WaitTimeout:
|
||||
LOG.debug('Device %s may have been deleted concurrently',
|
||||
device_name)
|
||||
return False
|
||||
|
||||
if not ns_dev.exists():
|
||||
LOG.debug("Device %s may concurrently be deleted.", device_name)
|
||||
return
|
||||
if link_up:
|
||||
ns_dev.link.set_up()
|
||||
else:
|
||||
ns_dev.link.set_down()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class NullDriver(LinuxInterfaceDriver):
|
||||
def plug_new(self, network_id, port_id, device_name, mac_address,
|
||||
|
Loading…
x
Reference in New Issue
Block a user