fix(health): backport #8294 to release/1.1.0 — sglang decode canary instance_id-not-found - #8816
Merged
pvijayakrish merged 1 commit intoApr 30, 2026
Conversation
) Backport of #8294 from main onto release/1.1.0. Adaptation: dropped the fail-fast guard added to EndpointConfigBuilder that referenced SystemHealth::health_check_enabled(); that accessor doesn't exist on release/1.1.0 and the guard is informational only. Python serve_endpoint always calls register_local_engine (lib.rs:882), so the precondition the guard was checking is satisfied unconditionally. Original message: Replace canary's PushRouter+etcd-discovery path with a direct lookup in the in-process local_endpoint_registry. Avoids a discovery race where wait_for_instances returns on a sibling instance (e.g. prefill in disagg), leaving the worker's own instance_id not yet visible in instance_ids_avail() when router.direct() fires. Fixes DYN-2913 (sglang decode worker canary fails with "instance_id not found for endpoint <ns>/backend/generate"). Original-commit: c2ec335 Original-author: Thomas Montfort <61255722+tmonty12@users.noreply.github.com> Co-Authored-By: Thomas Montfort <tmontfort@nvidia.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
pvijayakrish
deleted the
neelays/dyn-2913-dynamorelease110-pd-sglang-decode-worker-canary-generate
branch
April 30, 2026 00:17
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.
Backport #8294 to release/1.1.0 — fix sglang decode worker canary
instance_id not foundCherry-picks upstream commit
c2ec33597f(PR #8294,fix(health): use local endpoint registry for canary health checks, merged 2026-04-17) ontorelease/1.1.0.Fixes DYN-2913 (Urgent, SLA breach 2026-04-29) — sglang PD decode worker canary fails with
instance_id not found for endpoint <ns>/backend/generate, decode/healthreturns 503, liveness probe restarts the pod.See #8294 for the full upstream rationale and design discussion. The change replaces the canary's etcd-discovery path in
health_check.rswith a direct in-process lookup inDistributedRuntime::local_endpoint_registry()— no etcd, no NATS, no watch propagation, so the discovery race is structurally eliminated.Backport adaptation
Dropped the fail-fast guard upstream added to
EndpointConfigBuilderincomponent/endpoint.rs. It referencedSystemHealth::health_check_enabled(), which doesn't exist onrelease/1.1.0. The guard is informational only — Pythonserve_endpointcallsregister_local_engineunconditionally for every endpoint (lib/bindings/python/rust/lib.rs:882), so the precondition the guard checks is satisfied without it.Net diff vs. upstream cherry-pick: just the
endpoint.rsguard hunk dropped.health_check.rsmatches upstream byte-for-byte.Diff
lib/runtime/src/health_check.rsonly — 1 file, +21 / −111.Verification
cargo check -p dynamo-runtime --locked✅cargo clippy -p dynamo-runtime --locked --no-deps -- -D warnings✅cargo fmt --check✅/healthreturns 200 withgenerate: ready. The K8s repro from DYN-2913 is the authoritative bug evidence; the discovery race doesn't surface on a single host.cargo test --features integration health_check::has pre-existing breakage onrelease/1.1.0(Instance struct missingdevice_typeinitializers in test code, unrelated to this fix). Verified by checking outorigin/release/1.1.0HEAD without the cherry-pick — same compile errors.Risk
Low.
register_local_enginewas already merged ontorelease/1.1.0and is invoked unconditionally from the Pythonserve_endpointbinding, so the new code path is reachable for every existing caller. The change is a substitution at one call site within the canary loop; no API surface or behavior shifts for non-canary code.