You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Netlink listings fail during concurrent link changes #1133
Most netlink listings of links, addresses, routes, neighbours and rules make a single attempt, so they fail whenever another process changes that state while they run. The ingress sidecar hit this in #1130, and #1132 added a shared, bounded retry for link, address and route listings and moved the sidecar and the VRF helpers onto it.
The same single-attempt listings remain in garbage collection and datapath repair, the host gateway, the CNI installer, the eBPF attach code, SRv6 plain routes, VIP binding and loopback address detection.
Neighbour and rule listings need the same retry, which the shared helper does not offer yet.
Acceptance criteria
Every link, address, route, neighbour and rule listing in the node binaries retries an interrupted listing a bounded number of times and never acts on a partial result.
Garbage collection, datapath repair and the host gateway each complete a pass while links and routes change on the node, as the sidecar inventory does.
internal/plumbing/ebpf/attach/interfaces.go, internal/plumbing/ebpf/attach/egress_reattach.go, and the linkListFn defaults in edgeattach, natattach and xdpattach
internal/plumbing/ebpf/egressroutemap/egressroute.go and internal/plumbing/srv6/egress.go (neighbour listings)
internal/plumbing/srv6/plainroute.go (rule and route listings)
internal/plumbing/vip/vip.go and internal/plumbing/loaddr/loaddr.go (address listings)
Reproduction: a root test ran garbage collection's VRF lookup (resolveVRFKernelState) in a network namespace while two goroutines added and removed links. 139 of 300 lookups failed with execute netlink request after 1 attempts: results may be incomplete or inconsistent, from the single-attempt link listing.
Two findings that go beyond the summary above:
The handle-based listings in the CNI plugins (internal/cni, internal/cniroute) and in the edge agent (internal/edge/hostattach) make single attempts too. The fix covers them through a nldump form that retries over a handle the caller already holds.
On a 7.1 kernel, only link and address dumps were reported interrupted under churn. Route, neighbor and rule dumps of up to 4,000 entries were not. The fix still retries all five kinds, since netlink documents that each can return an interrupted dump. The churn tests use link and address churn, which is what makes garbage collection, datapath repair and the host gateway fail today.
Plan:
Add neighbor and rule listings to nldump, counted under new kind values on the existing galactic_netlink_dump_* counters.
Move every remaining listing in the node binaries onto nldump. hack/returnpath-lab is a lab tool and stays as it is.
Add root churn tests in which garbage collection, datapath repair and the host gateway each complete passes while links and addresses change.
Fix is up for review in #1137. It also moves the CNI plugins and the edge agent onto the shared retry, and adds root churn tests for garbage collection, datapath repair and the host gateway that fail on the previous main.
Activity
privateip commentedon Oct 27, 2026
Remaining single-attempt listings on main at 20d8313, excluding the sidecar and VRF call sites that #1132 moves:
internal/gc/gc.go(listAllLinksFn) andinternal/gc/datapath_repair.go(route and address listings)internal/hostgw/hostgw.go(route listing) andinternal/hostgw/tapneigh.go(link, route and neighbour listings)internal/hostconf/hostconf.go,internal/installer/installer.go,internal/installer/locatorroute.go,internal/installer/sidecarreturn.gointernal/plumbing/ebpf/attach/interfaces.go,internal/plumbing/ebpf/attach/egress_reattach.go, and thelinkListFndefaults inedgeattach,natattachandxdpattachinternal/plumbing/ebpf/egressroutemap/egressroute.goandinternal/plumbing/srv6/egress.go(neighbour listings)internal/plumbing/srv6/plainroute.go(rule and route listings)internal/plumbing/vip/vip.goandinternal/plumbing/loaddr/loaddr.go(address listings)privateip commentedon Oct 27, 2026
Confirmed on main at 1a9d0f1.
Reproduction: a root test ran garbage collection's VRF lookup (
resolveVRFKernelState) in a network namespace while two goroutines added and removed links. 139 of 300 lookups failed withexecute netlink request after 1 attempts: results may be incomplete or inconsistent, from the single-attempt link listing.Two findings that go beyond the summary above:
internal/cni,internal/cniroute) and in the edge agent (internal/edge/hostattach) make single attempts too. The fix covers them through anldumpform that retries over a handle the caller already holds.Plan:
nldump, counted under newkindvalues on the existinggalactic_netlink_dump_*counters.nldump.hack/returnpath-labis a lab tool and stays as it is.privateip commentedon Oct 27, 2026
Fix is up for review in #1137. It also moves the CNI plugins and the edge agent onto the shared retry, and adds root churn tests for garbage collection, datapath repair and the host gateway that fail on the previous main.