Repository navigation
fix: attach only to pod uplinks (eth<N>, net<N>) and log interface events at debug - #173
Merged
Merged
Conversation
…ents at debug In pods with a nested runtime (docker-in-docker, kind) snoopy attached to docker0 and to every veth a job container created, so each container start cost an eBPF load, and the operator summed traffic that crosses veth, bridge and eth0 two or three times. - new `--interface-prefix` (repeatable, default `eth`, `net`): attach only to interfaces named <prefix><digits>; `--exclude-interface` still wins - interface removed/changed, closed module and the memlock notice are logged at debug: the events are on stdout already, and a CI runner pod produced ~20 info lines per minute in the operator log Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Found in node-metrics debug logs on homeserver after rolling out v0.4.39: an ARC runner pod runs docker-in-docker as a native sidecar, so its netns contains
docker0plus one veth per job container.docker0and to every new veth: one eBPF object load (verifier run) per job container startdocker0andeth0, so it was counted two or three timesChanges
--interface-prefix(repeatable, defaulteth,net): only interfaces named<prefix><digits>get counters, i.e. the pod uplinks (eth<N>from the CNI,net<N>from Multus).--exclude-interfacestill applies on top.interface was removed,interface changed,closed ebpf moduleand the RLIMIT_MEMLOCK notice are logged at debug.All interface events are still printed to stdout, so the operator keeps seeing them.
Verification (homeserver, isolated netns)
Interfaces
lo,eth0,hostside,docker0,vethabc(on docker0),vethin, plusvethdef/vethin2added at runtime → 8InterfaceAddedevents, counters attached only toeth0; stderr at default level only shows the shutdown line.cargo fmt,cargo clippy --release,cargo testclean.The operator side (count only uplinks, works with any snoopy version) is in mogenius/mogenius-operator branch
fix/node-metrics-uplinks-sidecars.🤖 Generated with Claude Code