From 2b148c3f9299642e0bb068983de68ec6441a23be Mon Sep 17 00:00:00 2001 From: He Qing Date: Wed, 7 Sep 2016 05:07:25 +0000 Subject: [PATCH] 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 --- neutron/agent/l3/dvr_edge_ha_router.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/neutron/agent/l3/dvr_edge_ha_router.py b/neutron/agent/l3/dvr_edge_ha_router.py index 9e0f257bce3..fb7a23240b0 100644 --- a/neutron/agent/l3/dvr_edge_ha_router.py +++ b/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)