Repository navigation
Conversation
|
Implementation detail for review. Where. Everything is in Pins. Links are pinned at Why the head, not the tail. The approved plan put the link at the tail, the order packets see today. tcx runs the next program only after a Ordering. Links use Health text. The error is now Tests to run as root. Run
Downgrade. The previous release manages only the classic filter. Remove |
02af20b to
9ec50ac
Compare
Cilium deletes every classic tc filter on a device it attaches to through tcx, after each reload of its own programs, without checking whose they are. It reloads on pod and link churn, so galactic_usid_ingress vanished from shared uplinks for about a second at a time until the watch loop put it back. In that window the CNI health check and the gateway's local delivery check both failed, and core stopped serving the node's backends. usid_ingress now attaches through a tcx link pinned under /sys/fs/bpf/galactic/links/usid_ingress, which Cilium does not touch. The link goes at the head of the chain. Cilium's cil_from_netdev returns TC_ACT_OK, which tcx treats as final, so a program behind it never sees the packets it passes; the classic filter had the same blind spot. usid_ingress returns TC_ACT_UNSPEC for packets it does not handle, so Cilium still sees all other traffic. A restart updates the pinned link in place and removes any classic filter an earlier version left. Kernels without tcx keep the classic filter. A renamed device's pin is adopted under the new name. Pins whose device is gone are removed on every attach and reconcile. When another program's link lands ahead of ours, the health check asks for a reconcile, which moves ours back to the head. Cilium attaches its own links at the tail and updates them in place, so it never triggers this. The kernel refuses one program twice on a hook, so the classic filter stands in during the move and stays when the move fails. A failed move is logged, not returned, since Start treats attach errors as fatal. The health check and IngressAttachedTo accept either attachment. Fixes #1561
9ec50ac to
cdeda23
Compare
|
First pass: pr-adversary returned hold and pr-conventions-reviewer returned hold. The human decided both decision findings: the overlap with draft #598 is settled by whichever PR lands second rebasing, and this PR goes ready on green CI including the root unit tests, with the Containerlab link-churn run following on the staging labs. Fixes applied: the classic filter is kept when a tcx move fails, with a test that fails without the fix; the Cilium tail-anchor citation; the conventional title; the checkbox test plan; and the history squashed to one commit wrapped at 72. Second pass: pr-rereviewer returned merge. pr-conventions-reviewer returned hold on history only, which the squash resolved. CI's root unit tests then failed four older tests that assumed a classic uplink filter. They were rewritten to count and clear either attachment kind. A narrow re-review found no assertion weakened. CI on head cdeda23: Unit Tests (root), Unit Tests, Build, Lint and ci / Build and test all pass. Not run: Kind e2e and the Containerlab run. Auto-merge was left off on purpose. A person merges after approval. |
Fixes #1561
Each time Cilium reloads, it deletes Galactic's uplink ingress filter, so gateways flap their local delivery report for about a second. Galactic now attaches that program through the kernel's tcx mechanism, which Cilium leaves alone, and pins it so it survives a CNI restart. The program runs ahead of Cilium, because Cilium ends processing for the packets it passes and today's filter never sees them. Kernels without tcx keep the classic filter.
Testing
This goes ready once CI, including the root unit tests, is green. The Containerlab run follows on the staging labs.
Risk