fix(k3s): raise ARP neighbour table limits to stop table overflow - #41
Merged
Conversation
There was a problem hiding this comment.
{
"verdict": "approve",
"summary": "The PR raises ARP neighbour table gc_thresh limits (4096/8192/16384) to prevent table overflow on k3s nodes running many pods. The change is well-documented with a production incident reference. Values are correctly ordered (4096 < 8192 < 16384) and typed as strings per the config schema. The blank-line removal in metadata.py is incidental formatting with no functional impact.",
"comments": [],
"concerns_addressed": [
"correctness: blank line removal in bundles/intellij/metadata.py is incidental formatting, not a bug",
"correctness: sysctl gc_thresh values are string types as the config schema expects",
"correctness: gc_thresh invariant (4096 < 8192 < 16384) is satisfied"
]
}
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
nuke-k3s-prod-0logged 31,904neighbour: arp_cache: neighbor table overflow!today — ~7000/hour, continuously since boot.Once
arp_tblhitsgc_thresh3,neigh_alloc()fails and any packet needing a new neighbour entry is silently dropped. That caused:getent hosts <registry>: 0/40 succeeded)ImagePullBackOffacross prod (peaked at 8 pods), including the MT5 tick pipelinesystemd-resolvedreporting zero timeouts — its queries never left the boxWhy it wasn't obvious
arp_tblis a single global kernel table counting entries across every netns, butip neigh showonly displays the host namespace. prod-0 showed 404 entries against the 1024 default — apparent 60% headroom — while overflowing constantly, because ~389 pod netns held the rest.Thresholds were stock kernel defaults (
128/512/1024), never tuned for node density.Change
Adds
sysctl.optionsto thek3sgroup (13hm.nuke-k3s-*nodes):Group-scoped rather than node-scoped deliberately:
dev-0runs 379 veth against prod-0's 389 — clean today only because it hasn't crossed the line.Entries are allocated on demand, so the raised ceiling is free on small nodes (~4 MB worst case if a table ever actually filled). No reboot: the
sysctlbundle triggerssystemd-sysctlrestart.Verification — applied via
bw apply -i k3s, 13/13 fixed, 0 failedgetent hosts <registry>ip neigh showNote
hm.hellruns k3s but does not match this group's.*k3s.*member pattern, so it is not covered. Pre-existing gap, left alone here.