Always call create_rtr_2_fip_link

Always call create_rtr_2_fip_link to ensure that the routes
are setup even though the interface may already exist.

This is necessary since Ida165d1ecf5c07af31dac11d9daed33ccaaf5605
changed the routing setup to use rules instead of default routes
and upgrading from an l3 agent before that change results in a
FIP namespace without the routing rules setup.

Conflicts:
      neutron/agent/l3/dvr_local_router.py

Closes-Bug: #1698517
Change-Id: I83d4b461fa4125c781227677ec9ed46704e832e9
(cherry picked from commit a175e48248)
This commit is contained in:
Kevin Benton 2017-06-16 23:34:49 -07:00 committed by Armando Migliaccio
parent 008d1ab7d3
commit 4401777d5c
2 changed files with 7 additions and 7 deletions

View File

@ -294,10 +294,11 @@ class FipNamespace(namespaces.Namespace):
# Now add the filter match rule for the table.
ip_rule = ip_lib.IPRule(namespace=self.get_name())
ip_rule.rule.add(ip=str(fip_2_rtr.ip),
iif=fip_2_rtr_name,
table=rt_tbl_index,
priority=rt_tbl_index)
ip_rule.rule.add(**{'ip': str(fip_2_rtr.ip),
'iif': fip_2_rtr_name,
'table': rt_tbl_index,
'priority': rt_tbl_index,
'from': '0.0.0.0/0'})
def _update_gateway_port(self, agent_gateway_port, interface_name):
if (self.agent_gateway_port and

View File

@ -558,10 +558,9 @@ class DvrLocalRouter(dvr_router_base.DvrRouterBase):
else:
self.fip_ns.create_or_update_gateway_port(fip_agent_port)
if (self.fip_ns.agent_gateway_port and
(self.dist_fip_count == 0)):
if self.fip_ns.agent_gateway_port:
self.fip_ns.create_rtr_2_fip_link(self)
self.routes_updated([], self.router['routes'])
self.routes_updated(self.routes, self.router['routes'])
def update_routing_table(self, operation, route):
# TODO(Swami): The static routes should be added to the