Related to #369 , we have reasons (not great reasons, but reasons) to regularly invoke
ovs-vsctl set port bond0 other_config:bond-hash-basis=N
where N is "a different value".
Having recently rebased to 3.5.2, this bond-hash-basis flip is sufficient to drop traffic.
Steps to repro:
- Build a 2-member LACP bond with
bond_mode=balance_tcp
- Generate a lot of flows, causing
dpctl/dump-flows count to exceed 20000
- Change
bond-hash-basis
That's it. My environment is using qemu/kvm VMs with tap interfaces, but I don't know that this is required.
This is the traffic-generating script I've been using. Note that it will actually egress junk MAC addresses to the network, which may be disruptive. The eth0 referred to is from a VM guest using a tap interface, not the system where ovs-vswitchd itself is running.
from scapy.all import Ether, IP, UDP, sendp
import random
pkts = [
Ether(src="02:00:%02x:%02x:%02x:%02x" % tuple(random.randint(0, 255) for _ in range(4)))
/ IP(dst="10.10.10.10") / UDP(dport=random.randint(1, 65535))
for _ in range(20000)
]
while True:
sendp(pkts, iface="eth0")
To recover, from the console we can run a simple/no-op change to trigger bridge reconfigure:
ovs-vsctl set bridge br0 external_ids:bond-nudge="$(date +%s%N)"
The above repro has been crafted, and this bug report written by me, a real human, although the debugging was LLM-assisted with visibility of the ovs codebase which I'm unfamiliar with.
With that LLM disclaimer, here is the one-line summary of what it concludes:
In balance-tcp bonds, changing bond-hash-basis can delete all post-recirc internal rules; if packet xlate repopulates bond->hash before bond_update_post_recirc_rules__ runs, OVS believes no rule update is needed and leaves TBL_INTERNAL without recirc_id/dp_hash output rules, causing persistent drop until a later bridge reconfigure.
Related to #369 , we have reasons (not great reasons, but reasons) to regularly invoke
where N is "a different value".
Having recently rebased to 3.5.2, this
bond-hash-basisflip is sufficient to drop traffic.Steps to repro:
bond_mode=balance_tcpdpctl/dump-flowscount to exceed 20000bond-hash-basisThat's it. My environment is using qemu/kvm VMs with tap interfaces, but I don't know that this is required.
This is the traffic-generating script I've been using. Note that it will actually egress junk MAC addresses to the network, which may be disruptive. The
eth0referred to is from a VM guest using a tap interface, not the system where ovs-vswitchd itself is running.To recover, from the console we can run a simple/no-op change to trigger bridge reconfigure:
The above repro has been crafted, and this bug report written by me, a real human, although the debugging was LLM-assisted with visibility of the ovs codebase which I'm unfamiliar with.
With that LLM disclaimer, here is the one-line summary of what it concludes: