Repository navigation
fix(slurm): complete proxy lifecycle and overload validation - #1104
Conversation
Persist ongoing backend health evidence and fail managed attempts on service loss. Drain logical endpoints before stopping serving steps, and complete routing, timing, eviction, and timeout telemetry. Add health, shutdown, streaming, and real-client overload admission regressions. Live cluster acceptance remains tracked in #1103 and #870. Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
[Medium impact] The PR appears safe to merge; the previous health-failure race is fixed, and no new blocking issues were found. SummaryThis PR completes Slurm health monitoring, shutdown ordering, and proxy telemetry.
|
| if [[ -n ${DD_HEALTH_PID} ]]; then | ||
| dd_stop_steps 1 "${DD_HEALTH_PID}" |
There was a problem hiding this comment.
Health failure still permits success
After the client's last dd_require_running check, the monitor can save FAILED readiness before cleanup stops it. dd_stop_steps ignores its exit status, and the controller then runs succeed. _succeed replaces readiness with STOPPED and publishes the winner without checking the recorded failure. An attempt can therefore succeed despite a recorded loss of required backend health.
After stopping the monitor, check its saved readiness before allowing success.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/data-designer-slurm/src/data_designer/slurm/runtime/cleanup.sh
Line: 49-50
Comment:
**Health failure still permits success**
After the client's last `dd_require_running` check, the monitor can save `FAILED` readiness before cleanup stops it. `dd_stop_steps` ignores its exit status, and the controller then runs `succeed`. `_succeed` replaces readiness with `STOPPED` and publishes the winner without checking the recorded failure. An attempt can therefore succeed despite a recorded loss of required backend health.
After stopping the monitor, check its saved readiness before allowing success.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 033b5ae. After cleanup stops the monitor, _succeed loads its final persisted readiness and rejects winner publication if it contains a health failure, including failure evidence retained in STOPPED readiness. Failure cleanup also preserves terminal readiness so the attempt can be marked failed without an invalid STOPPED → FAILED readiness transition.
Regression tests cover a late health failure with a valid candidate output, retained failure evidence after readiness stops, and failure cleanup after winner publication fails. Validation: full Slurm suite 2,116 passed, 1 skipped; focused proxy/health/admission suite 54 passed.
|
Fern preview: https://nvidia-preview-pr-1104.docs.buildwithfern.com/nemo/datadesigner
|
Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
andreatnvidia
left a comment
There was a problem hiding this comment.
Requesting changes for the shutdown signal handling discussed inline.
| dd_stop_steps 1 "${DD_HEALTH_PID}" | ||
| fi | ||
| # The proxy drains for 10 seconds; allow srun time to forward signals and exit. | ||
| dd_stop_steps 12 "${DD_ENDPOINT_PIDS[@]+"${DD_ENDPOINT_PIDS[@]}"}" |
There was a problem hiding this comment.
It looks like these are the srun launcher PIDs, and Slurm forwards SIGTERM as SIGKILL to their tasks. I think that would kill the proxy before it can drain active responses, even with the longer wait. Could we signal the endpoint task directly and cover that path in the test? The current test sends SIGTERM straight to Python, so it seems to miss this behavior.
There was a problem hiding this comment.
You're right—the launcher PID path bypassed the proxy's drain handler. Fixed in 868268d: each endpoint task records its Slurm job/step identity before executing the proxy, and cleanup validates that identity against the current allocation before sending scancel --signal=TERM to that exact step. Launchers and backends stay alive through the drain window; forced launcher shutdown happens only after the deadline.
The regression test now separates launcher and task processes and models launcher TERM → task KILL forwarding. I also validated the production launch/cleanup helpers with real srun/scancel in a CPU Slurm allocation: active HTTP responses completed during normal completion, failure cleanup, and controller cancellation; all three proxy tasks exited 0. Sanitized live-drain evidence. Full Slurm suite: 2,123 passed, 1 skipped.
Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
📋 Summary
Detect required-backend health loss during generation and persist it in managed readiness, even when serving processes remain alive. Give logical endpoints their drain window before stopping backends, and complete routing, connection, and timeout telemetry.
🔗 Related Issue
Closes #1103, the remaining scope transferred from #966. Live overload acceptance is part of this PR; the broader release matrix remains separately tracked in #870.
🔄 Changes
TERMdirectly to each endpoint task withscancelusing its validated allocation/step identity, and keep launchers and backends alive for the drain window. Force remaining endpoints to stop only after the 12-second allowance, then terminate other steps.🔍 Attention Areas
🧪 Testing
TERM→ taskKILLbehavior, identity validation, and bounded escalation.Retry-After: 3, reduces admission from 8 to 4, and applies cooldown.srun/scancel. All three endpoint tasks exit 0; the allocation completes and releases its steps. Sanitized drain evidence.git diff --check, and changed-file Ruff lint/format checks pass.docs/colab_notebooks/8-generating-word-documents.ipynb.make testacross all packages was not run.f499303a: 32/32 persisted records, 22.325 seconds, 86.003 records/minute; 33 HTTP 200 responses, zero failures/retries/timeouts, 31 reused connections.Retry-After: 3, reduces admission 8 → 4, applies cooldown, then recovers. Proxy peak RSS was 38.34 MiB; measured CPU time and per-case metrics are recorded in the sanitized acceptance evidence.GPU overload acceptance remains tied to
f499303a; proxy, health-monitor, backpressure, and overload-harness source are unchanged. Later attempt-finalization fixes have regression coverage. The updated shell signal path has separate live Slurm validation with a synthetic streaming HTTP backend and recorded source hashes; it does not run the full managedslurm executeflow.✅ Checklist
architecture/.