[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 <egarciar@redhat.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user