Skip to content

netns churn is invisible in metrics: the per-poll reconcile's add/del deltas are dropped, mapReconciler stores/dels only fire on the 6h ticker #370

Backlog

Description

@randomizedcoder

Measured by the red-team harness (rt-4-6 namespace churn storm, run 20261130T041837-848ebbe00-1287288, 149 netns add+del cycles over 240 s):

  • mapReconciler stores/dels counters stayed 0 through 149 namespace create/destroy cycles — they only increment in the background ticker loop (ns_reconcile.go:52-53), whose default period is 6 h (reconcileFrequencyCst). In a 4-min run the ticker never ticks; the startup reconcile's counts are not recorded either.
  • The ACTUAL discovery path in the default shape is the per-poll reconcile (reconcileBeforePoll, one per 2 s poll): reconcileThenPoll (poller.go:430) calls x.reconcile(ctx), gets (dels, stores) back, and drops them (only logged at debugLevel>10).
  • Net effect: on a churning host (pod churn, restart loops), netns add/del is completely unobserved. reconcile/start counts runs (14730 over the storm window), but the deltas — the churn itself, the thing an operator needs for AI098's warn-storm investigation — are invisible.

Fix shape: count the pre-poll reconcile's deltas the same way the ticker does (mapReconciler stores/dels, or a separate label so the two paths are distinguishable). The rt-4-6 scenario asserts this gap explicitly and will flip its expectation when fixed.

Related: TODO-SOON AI098 (veth churn warn-storm) — observability for the same mechanism.

Activity

  1. added
    bug
    on Nov 30, 2026
  2. added a commit that references this issue on Nov 30, 2026
  3. randomizedcoder commented on Nov 30, 2026

    @randomizedcoder
    OwnerAuthor

    Correction to the measured evidence in this issue's body (caught in the PR #372 review, re-measured with the fixed harness):

    The quoted "reconcile/start counts runs (14730 over the storm window)" read the wrong series. The harness matched variable="start" alone, which is ambiguous — NINE series carry that label; sorted first is Deserialize/start (the envelope-deserialization counter, ~60/s), which is what the 14730 actually was. A live scrape at the time: Deserialize/start 227550 vs reconcile/start 10828.

    Re-measured with the exact label set (function="reconcile",type="count",variable="start"): +130 over the storm window ≈ 1/poll (baseline read at 26 right after deploy), which is the correct magnitude for a counter that fires once per 2 s poll — and independently confirms the issue's core claim, unchanged:

    • mapReconciler stores/dels stayed 0 through the whole churn storm (live-scrape confirmed; the 6 h ticker never ticked in the window)
    • the per-poll reconcile's add/del deltas remain dropped (reconcileThenPoll logs at debug>10 and discards them)

    So the finding stands exactly as filed: netns add/del is invisible in metrics on a churning host. Only the 14730 figure was misattributed. (The same review found a second harness bug that had made netns_dropped{add_rate} reads always return 0 in the rt-11-8 scenario — also fixed; its zeros re-measured as real values.)

    Fixes land with the churn suite in PR #372.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions