← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2121961] Re: Duplicate packet logs with openvswitch driver

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/964477
Committed: https://opendev.org/openstack/neutron/commit/29f4ada3153115fd0962ce540048147bca627f23
Submitter: "Zuul (22348)"
Branch:    master

commit 29f4ada3153115fd0962ce540048147bca627f23
Author: Elvira Garcia <egarciar@xxxxxxxxxx>
Date:   Tue Oct 21 17:05:57 2025 +0200

    [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@xxxxxxxxxx>


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2121961

Title:
  Duplicate packet logs with openvswitch driver

Status in neutron:
  Fix Released

Bug description:
  When I am using OVS and the associated log framework, the packet logs
  are all duplicated. Packet are exactly the same, but with a different
  timestamp.

  My openvswitch agent configuration:
  ```
  [securitygroup]
  firewall_driver = openvswitch

  [network_log]
  rate_limit = 100
  burst_limit = 25
  local_output_log_base = /var/log/kolla/neutron/packet-logs.log
  ```

  Packets are logged four times, because they are logged two times in
  the standard neutron-openvswitch-agent.log, and two times in the
  configured /var/log/kolla/neutron/packet-logs.log.

  I tried several configuration, with even /dev/null or empty value in
  the local_output_log_base parameter. The logs are always duplicated.

  It is easy to reproduce with a clean install using ovs and the above
  configuration.

  Here are an example of duplicated log (with a custom debug log added in the code for identifying the cookie):
  ```
  2025-09-03 18:02:07.071 7 DEBUG neutron.services.logapi.drivers.openvswitch.ovs_firewall_log [-] Received packet on Cookie 726062168962206281 packet_in_handler /var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py:178
  2025-09-03 18:02:07.072 7 INFO neutron.services.logapi.drivers.openvswitch.ovs_firewall_log [-] action=ACCEPT project_id=e4ffe9f6413446d7857883745f7dca24 log_resource_ids=['e369d568-259d-4907-b3cd-e5c572d3090c'] vm_port=f53a333d-d134-4c8f-aba8-3ae4a96050b5 direction=OUT pkt=ethernet(dst='fa:16:3e:d1:36:b8',ethertype=2048,src='fa:16:3e:e7:bf:2e'), ipv4(csum=44469,dst='10.0.0.1',flags=2,header_length=5,identification=61471,offset=0,option=None,proto=1,src='10.19.16.12',tos=0,total_length=84,ttl=64,version=4), icmp(code=0,csum=8126,data=echo(data=b'\x02J\xb8h\x00\x00\x00\x00O-\x0f\x00\x00\x00\x00\x00\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234567',id=142,seq=1),type=8)
  2025-09-03 18:02:07.075 7 DEBUG neutron.services.logapi.drivers.openvswitch.ovs_firewall_log [-] Received packet on Cookie 726062168962206281 packet_in_handler /var/lib/kolla/venv/lib64/python3.9/site-packages/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py:178
  2025-09-03 18:02:07.076 7 INFO neutron.services.logapi.drivers.openvswitch.ovs_firewall_log [-] action=ACCEPT project_id=e4ffe9f6413446d7857883745f7dca24 log_resource_ids=['e369d568-259d-4907-b3cd-e5c572d3090c'] vm_port=f53a333d-d134-4c8f-aba8-3ae4a96050b5 direction=OUT pkt=ethernet(dst='fa:16:3e:d1:36:b8',ethertype=2048,src='fa:16:3e:e7:bf:2e'), ipv4(csum=44469,dst='10.0.0.1',flags=2,header_length=5,identification=61471,offset=0,option=None,proto=1,src='10.19.16.12',tos=0,total_length=84,ttl=64,version=4), icmp(code=0,csum=8126,data=echo(data=b'\x02J\xb8h\x00\x00\x00\x00O-\x0f\x00\x00\x00\x00\x00\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234567',id=142,seq=1),type=8)
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2121961/+subscriptions



References