Skip to content

fix(health): backport #8294 to release/1.1.0 — sglang decode canary instance_id-not-found - #8816

Merged
pvijayakrish merged 1 commit into
release/1.1.0from
neelays/dyn-2913-dynamorelease110-pd-sglang-decode-worker-canary-generate
Apr 30, 2026
Merged

fix(health): backport #8294 to release/1.1.0 — sglang decode canary instance_id-not-found#8816
pvijayakrish merged 1 commit into
release/1.1.0from
neelays/dyn-2913-dynamorelease110-pd-sglang-decode-worker-canary-generate

Conversation

@nnshah1

@nnshah1 nnshah1 commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Backport #8294 to release/1.1.0 — fix sglang decode worker canary instance_id not found

Cherry-picks upstream commit c2ec33597f (PR #8294, fix(health): use local endpoint registry for canary health checks, merged 2026-04-17) onto release/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 /health returns 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.rs with a direct in-process lookup in DistributedRuntime::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 EndpointConfigBuilder in component/endpoint.rs. It referenced SystemHealth::health_check_enabled(), which doesn't exist on release/1.1.0. The guard is informational only — Python serve_endpoint calls register_local_engine unconditionally 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.rs guard hunk dropped. health_check.rs matches upstream byte-for-byte.

Diff

lib/runtime/src/health_check.rs only — 1 file, +21 / −111.

Verification

  • cargo check -p dynamo-runtime --locked
  • cargo clippy -p dynamo-runtime --locked --no-deps -- -D warnings
  • cargo fmt --check
  • Local sglang PD disagg sanity check (Qwen/Qwen3-0.6B, 1×A6000) confirms post-fix decode /health returns 200 with generate: 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 on release/1.1.0 (Instance struct missing device_type initializers in test code, unrelated to this fix). Verified by checking out origin/release/1.1.0 HEAD without the cherry-pick — same compile errors.

Risk

Low. register_local_engine was already merged onto release/1.1.0 and is invoked unconditionally from the Python serve_endpoint binding, 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.

)

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>
@nnshah1
nnshah1 requested a review from a team April 28, 2026 19:52
@github-actions github-actions Bot added the fix label Apr 28, 2026
@pvijayakrish
pvijayakrish merged commit 6b327cf into release/1.1.0 Apr 30, 2026
166 of 188 checks passed
@pvijayakrish
pvijayakrish deleted the neelays/dyn-2913-dynamorelease110-pd-sglang-decode-worker-canary-generate branch April 30, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants