Repository navigation
fix(worker): Stop misreading a live NAT veth pair as missing - #1481
Conversation
Local confirmed a NAT pair's peer, and a routed link's pod end, with
netlink.VethPeerIndex, which asks ethtool through two SIOCETHTOOL
ioctls. Under CPU load that call fails about once in 300,000 to
1,000,000 calls, returning "unexpected EOF". readPair then reported an
existing pair missing. Read marked it Pending ("not created yet"),
Plan wanted to write again, and Apply would have deleted and recreated
the live pair.
A veth reports its peer's ifindex as IFLA_LINK in the link dump Local
already reads, and carries IFLA_LINK_NETNSID only when the peer is in
another namespace. readPair now requires each end to name the other
from this namespace. The routed-link read, creation and handoff report
take the pod end's ifindex from the same attribute. galactic-nat's
tenantEndMAC finds the tenant end the same way.
TestSteadyStateRoot reads a ready rig and plans it 200 times, expecting
Ready and an empty plan each pass. Without CPU stress it catches the
old failure only by chance.
Fixes #1471
|
Both first-pass reviewers returned a merge verdict. pr-adversary: "VERDICT: merge. Nothing I checked disagrees with the PR body." It ran: gh pr view; git diff base...head; grep netlink in go.mod and the cached netlink source; sed kernel.go; gh pr checks. It did not run the stress or root suites. pr-conventions-reviewer: "VERDICT: merge. No blocker; the only open point is a likely rebase against #1463 and #1480." It ran: gh pr view; git diff base...head; gh pr list --state open; gh pr diff 1480/1474/1463 hunks. No findings needed a code change, so no commits were added. The two warnings are merge-order notes: #1463 and #1480 touch nearby code, and whichever PR merges second resolves the textual conflict. CI: every check on the head completed with success or skipped, including the unit, root unit and end-to-end test jobs. Merge method: merge commit, the default, because the base branch ruleset has no pull request rule. The ruleset carries no review requirement here, so auto-merge can complete without a human approval; with all checks green, the PR merged as soon as it was enabled. |
fix(worker): Stop misreading a live NAT veth pair as missing
fix(worker): Stop misreading a live NAT veth pair as missing
fix(worker): Stop misreading a live NAT veth pair as missing
Fixes #1471, part of #1430.
Under CPU load, Worker's local module sometimes read an existing NAT veth pair as missing, reported it Pending, and on its next write would have deleted and recreated the live pair. The cause was the ethtool lookup of a veth's peer, which fails about once in 300,000 to 1,000,000 calls for a reason inside the netlink library that is still unproven (reproduction). The module and galactic-nat now read the peer from the link list they already fetch, with no ethtool call.
Test plan