Repository navigation
docs(proxy): counters transfer as deltas across hot restart, not absolutes (#708) - #711
Merged
Merged
Conversation
…lutes (#708) `aether_requests_total` restarting near zero on every proxy roll is not a bug. `HotRestartingParent::exportStatsToChild` sends `counter.latch()` — the increment pending since the parent's last stats flush — and `StatMerger::mergeCounters` `.add()`s it, so gauges transfer absolute but counters transfer as DELTAS. The parent has been latching that pending increment away every `stats_flush_interval` (5s default; the chart sets none) for its whole life, so the child inherits only the last <=5s of traffic, and the OTLP sink then exports `counter.value()` as CUMULATIVE from this process's start — an honest new series per Envoy generation. Measured on talos-main 2026-09-05: every first post-restart sample was < 1 minute of that node's traffic, and plain `envoy_cluster_upstream_cx_total` resets in the same buckets. - charts/aether: a "counter values are per-generation" note beside the tag-propagation note inside the rendered envoy.yaml, with the consumer rule (never read a raw counter; rate()/increase() only) and why making the values continuous was rejected. Chart 0.92.3 -> 0.92.4. - docs/proposals/001: correct "stats carried over" / "counters carry over" / the "stat continuity" exit criterion — listen FDs and gauges carry over, counters as deltas only; cite the 2026-09-05 measurement. - docs/proposals/012, 013: make the per-generation caveat explicit where `aether_requests_total` is described. - docs/runbook.md: the #638 mismatch counter query -> increase() over a window. - proxy tag_extraction_test: mergeIntoChild now ships `counter.latch()` (what the parent actually sends) and a new CountersTransferAsDeltasNotAbsoluteValues case latches the parent, merges, and asserts the child holds only the post-latch residual — pinning delta transfer as an intentional invariant. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 5, 2026
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 5, 2026
…d tag (#692) (#713) * fix(ci): serialise publishes and give the aether chart a commit-pinned tag (#692) Two `publish` runs for consecutive merges to `main` raced on the same chart version tag and the older build won: 0.92.1 was pushed by the newer commit (95b158e) at 13:15:59Z and overwritten by the older one (77a7d45) four seconds later, so the 13:16:27Z deploy silently shipped without #689. Two independent causes, both fixed: * `publish.yaml` had no `concurrency` group, so runs for `main` overlapped. Added `group: publish-main, cancel-in-progress: false` — a publish is not a redundant check to supersede; cancelling one mid-push would leave images pushed and the chart not. `proxy-release.yml` gets the same treatment for the same class of bug: its `bump-chart` job rewrites `charts/aether/values.yaml` on top of whatever `main` is at checkout and force-pushes the single rolling `chore/proxy-image-bump` branch, so overlapping runs drop one run's image pin. `main.yaml` (main-post-merge) deliberately gets none, and now says so: it writes no shared state, and serialising it would delay — or, via queued-run eviction, skip — the detection it exists to provide. * The `aether` chart was published only under its bare `Chart.yaml` version, a tag that does not change per commit. It is now also published as `charts/aether:<X.Y.Z>-<full git sha>`, the scheme crds/prober/udsecho already use, via a second packaging of the same chart whose `Chart.yaml` is *derived* from the first (a genrule appends `-{GIT_COMMIT}`), so the two tags can never disagree about X.Y.Z. Only the chart is pushed for the commit tag — the images went up by digest with the bare push. The bare tag stays, for Flux and the documented deploy procedure, and is now safe because of the serialisation. The documented deploy procedure (docs/runbook.md, docs/getting-started.md) now pins the commit tag and, after `helm upgrade`, asserts that `helm get metadata -n aether-system aether -o json | jq -r .appVersion` contains the intended commit, failing otherwise — the only check that catches a chart tag serving a different build than the one asked for. Substring, not equality: appVersion is `git describe --tags --always --long --dirty --abbrev=40`, so the sha can carry a `v1.2.3-N-g` prefix or a `-dirty` suffix. Validated: `bazel build --stamp //charts/aether:aether //charts/aether:aether_commit` produces `version: 0.92.4` and `version: 0.92.4-<40-char sha>` with the same appVersion; `bazel test //charts/...` (9/9, including the new `aether_commit_lint_test`) and `--config=lint //charts/...` pass; `scripts/check-chart-version-bump.sh` passes on the 0.92.3 -> 0.92.4 bump; all three edited workflows parse as YAML (actionlint not installed locally). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chore(chart): bump aether chart to 0.92.5 after #711 took 0.92.4 (#692) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
This was referenced Sep 5, 2026
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.
Closes #708 — not a bug.
HotRestartingParent::exportStatsToChildsendscounter.latch()(the increment pending since the parent's last stats flush) andStatMerger::mergeCounters.add()s it: gauges transfer absolute, counters transfer as deltas.The parent has been latching that pending increment away every
stats_flush_interval(5s default;charts/aethersets none) for its whole life, so the child inherits only the last ≤5s of the parent's traffic.The OTLP sink then exports
counter.value()as CUMULATIVE withstart_time_unix_nano= this process's start — an honest new cumulative series per Envoy generation, which is whysum(aether_requests_total)looks like it resets. Measured on talos-main 2026-09-05: every first post-restart sample was < 1 minute of that node's traffic, and plainenvoy_cluster_upstream_cx_totalresets in exactly the same buckets.Changes
charts/aether/templates/agent-proxy-configmap.yaml— a "counter values are per-generation" note beside the existing tag-propagation note (it lives inside the renderedenvoy.yaml), stating the mechanism, the consumer rule (never read a raw counter;rate()/increase()only) and why making the values continuous was rejected (report_counters_as_deltasis sink-wide, and the collector runs 2 replicas behind one Service). Chart0.92.3→0.92.4.docs/proposals/001_proxy-hot-restart.md— corrects the three over-stated claims ("stats carried over", "counters carry over", the "stat continuity" exit criterion): listen FDs and gauges carry over, counters as deltas only; the exit criterion becomes dip-free rate continuity. Cites the 2026-09-05 measurement.docs/proposals/012_aether_stats_cpp_extension.md,013_mesh-availability-prober.md— the per-generation caveat made explicit whereaether_requests_totalis described (013 also notes the prober's own counter has no such discontinuity, reinforcing why it is the SLI).docs/runbook.md— the Transient cross-service mTLS identity mis-binding during concurrent proxy-restart + service roll (failed closed) #638 mismatch-counter query converted toincrease(...[1h]).proxy/.../aether_stats/tag_extraction_test.cc—mergeIntoChildnow shipscounter.latch()(what the parent actually sends), and a newCountersTransferAsDeltasNotAbsoluteValuescase latches the parent counter (simulating the periodic flush), merges, and asserts the child holds only the post-latch residual — pinning delta transfer as an intentional invariant rather than a defect someone "fixes" later.Query sites audited: the only raw-counter reads in scope were
docs/runbook.md:344and the validation snippet in013. Repo has no Grafana dashboard JSON — the panels live in the GitOps repo (bpalermo/k8s-talos-main), out of scope here;docs/proposals/013references the "Mesh Availability (synthetic)" row and the "Mesh Request Success Rate" panel, which are the ones to convert there.e2e/soak/README.mdande2e/pressure/run.shalready userate()/increase()or before/after baselines on non-hot-restarting processes and were left alone.helm lint charts/aetherpasses andhelm template charts/aetherstill renders a parseableenvoy.yaml;make format-checkclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr