Ignore fwg which has no ports when restarting l3-agent
When restarting l3 agent, it will detect whether the router is updated. If the port in the firewall group is not updated, it will also change its status. This patch skips updating the status of firewall group which has no ports. Change-Id: Ife294430409a9fb2944917a28a08323f41c89c0d Closes-Bug:#1783327
This commit is contained in:
parent
070068941b
commit
a7e85121f7
|
@ -271,6 +271,9 @@ class FWaaSL3AgentExtension(l3_extension.L3AgentExtension):
|
|||
ports_to_process = (set(firewall_group['add-port-ids'] +
|
||||
firewall_group['del-port-ids']) &
|
||||
all_router_ports)
|
||||
# ensure no port in router is associated with the firewall group
|
||||
if not ports_to_process:
|
||||
continue
|
||||
# A port can have at most one firewall group.
|
||||
port_ids_to_exclude = ports_to_process & processed_ports
|
||||
if port_ids_to_exclude:
|
||||
|
|
Loading…
Reference in New Issue