From: Carl Baldwin Date: Thu, 9 Jul 2015 18:44:16 +0000 (+0000) Subject: Ensure that update_fip_statuses gets called X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=bad95ee97ffc89fc11ed3e123cb031b1af0a253b;p=openstack-build%2Fneutron-build.git Ensure that update_fip_statuses gets called Calling it even when ex_gw_port is None will update fip statuses to down when the gateway port is removed. Change-Id: I0250fda7269bbd79839bf6e7c141f196adc1bd3b Closes-Bug: (bug needs confirmation, found this by inspection) --- diff --git a/neutron/agent/l3/router_info.py b/neutron/agent/l3/router_info.py index 978f2f8c8..830479452 100644 --- a/neutron/agent/l3/router_info.py +++ b/neutron/agent/l3/router_info.py @@ -590,13 +590,12 @@ class RouterInfo(object): action) def process_external(self, agent): + fip_statuses = {} existing_floating_ips = self.floating_ips try: with self.iptables_manager.defer_apply(): ex_gw_port = self.get_ex_gw_port() self._process_external_gateway(ex_gw_port) - # TODO(Carl) Return after setting existing_floating_ips and - # still call update_fip_statuses? if not ex_gw_port: return @@ -614,8 +613,9 @@ class RouterInfo(object): # All floating IPs must be put in error state LOG.exception(e) fip_statuses = self.put_fips_in_error_state() - - agent.update_fip_statuses(self, existing_floating_ips, fip_statuses) + finally: + agent.update_fip_statuses( + self, existing_floating_ips, fip_statuses) @common_utils.exception_logger() def process(self, agent):