Browse Source

Fix losses of ovs flows when ovs is restarted

Reinitialize conj_ip_manager when OVS is restarted.

Closes-Bug: #1912651
Change-Id: I5b5cf563f0c3d6ea352303f76323177cffc57c6e
(cherry picked from commit 412160b97f)
changes/32/774132/1
Marc Gariepy 9 months ago
committed by Rodolfo Alonso
parent
commit
a6bb79261a
  1. 10
      neutron/agent/linux/openvswitch_firewall/firewall.py

10
neutron/agent/linux/openvswitch_firewall/firewall.py

@ -477,9 +477,7 @@ class OVSFirewallDriver(firewall.FirewallDriver):
"""
self.permitted_ethertypes = cfg.CONF.SECURITYGROUP.permitted_ethertypes
self.int_br = self.initialize_bridge(integration_bridge)
self.sg_port_map = SGPortMap()
self.conj_ip_manager = ConjIPFlowManager(self)
self.sg_to_delete = set()
self._initialize_sg()
self._update_cookie = None
self._deferred = False
self.iptables_helper = iptables.Helper(self.int_br.br)
@ -493,8 +491,14 @@ class OVSFirewallDriver(firewall.FirewallDriver):
def _init_firewall_callback(self, resource, event, trigger, **kwargs):
LOG.info("Reinitialize Openvswitch firewall after OVS restart.")
self._initialize_sg()
self._initialize_firewall()
def _initialize_sg(self):
self.sg_port_map = SGPortMap()
self.conj_ip_manager = ConjIPFlowManager(self)
self.sg_to_delete = set()
def _initialize_firewall(self):
self._drop_all_unmatched_flows()
self._initialize_common_flows()

Loading…
Cancel
Save