From 29f4ada3153115fd0962ce540048147bca627f23 Mon Sep 17 00:00:00 2001 From: Elvira Garcia Date: Tue, 21 Oct 2025 17:05:57 +0200 Subject: [PATCH] [OVS] Avoid duplicate logging of network packets We have 2 classes inheriting from BaseNeutronAgentOSKenApp: OVSNeutronAgentOSKenApp and OVSLogOSKenApp. The instantiation of packet_in_handlers as a static property in BaseNeutronAgentOSKenApp created a shared list between all the different objects created by the inheriting classes. This ended up creating duplicated processing of events and therefore duplicate logging in the ML2/OVS log API. Closes-Bug: #2121961 Change-Id: I6c37fbed8d724b7215ca21d155dde00e1229c6ea Signed-off-by: Elvira Garcia --- .../openvswitch/agent/openflow/native/base_oskenapp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/base_oskenapp.py b/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/base_oskenapp.py index 354acb4cac2..1387fe7befc 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/base_oskenapp.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/base_oskenapp.py @@ -24,7 +24,10 @@ LOG = logging.getLogger(__name__) class BaseNeutronAgentOSKenApp(app_manager.OSKenApp): OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] - packet_in_handlers = [] + + def __init__(self): + super().__init__() + self.packet_in_handlers = [] def register_packet_in_handler(self, caller): self.packet_in_handlers.append(caller)