Browse Source

Fix wrong HA router state

When we add/remove router interface from HA router, l3 agent
will send SIGHUP signal to keepalived for reloading configuraion.

But for DVR+HA router, l3 agent will send SIGHUP signal TWICE which
will cause VRRP sub-process terminated and vip addresses and routes
left over. Keepalived then restart VRRP process and there will be
a re-election between VRRP peers. After the election, if the former
is still master, the state showed from Neutron will be correct. But
if the former master transitioned to backup, the new VRRP process
will NOT delete vips and routes because it is not the one who
configured them. There will be two active agent showed from Neutron.

HaRouter.enable_keepalived() will send SIGHUP signal to keepalived.
DvrEdgeHaRouter.process() should not call enable_keepalived() by
itself because it has inherited from class HaRouter.

Closes-Bug: 1602320
Change-Id: I647269665a22b4becb3e326e1f4b03ddd961d6b1
changes/93/366493/3
He Qing 6 years ago
parent
commit
2b148c3f92
  1. 5
      neutron/agent/l3/dvr_edge_ha_router.py

5
neutron/agent/l3/dvr_edge_ha_router.py

@ -90,11 +90,6 @@ class DvrEdgeHaRouter(dvr_edge_router.DvrEdgeRouter,
self._create_snat_namespace()
super(DvrEdgeHaRouter, self).initialize(process_monitor)
def process(self, agent):
super(DvrEdgeHaRouter, self).process(agent)
if self.ha_port:
self.enable_keepalived()
def get_router_cidrs(self, device):
return router_info.RouterInfo.get_router_cidrs(self, device)

Loading…
Cancel
Save