Skip to content

Add resilient external attrsvc lifecycle - #441

Merged
namitdhameja merged 2 commits into
mainfrom
fix/attrsvc-slurm-supervisor
Oct 10, 2026
Merged

namitdhameja merged 2 commits into
mainfrom
fix/attrsvc-slurm-supervisor

Conversation

@namitdhameja

@namitdhameja namitdhameja commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Stable external endpoint: A new Slurm supervisor daemon keeps attrsvc on the same allocated CPU node and restarts it after process crashes, allowing NVRx to continue using the same endpoint.
  • Recover from lost requests during GET: For example, attrsvc accepts cycle 2, then restarts and loses its in-memory state. NVRx's subsequent GET receives 404, abandons that cycle, and frees the request slot so a later cycle can still be analyzed.
  • Bound GET outages: After three consecutive failed GET attempts, NVRx abandons that cycle instead of polling indefinitely and blocking later attribution requests.
  • Avoid a second FT-path delay: When a terminal POST is not accepted, NVRx skips the immediately following optional progressive POST. This can save up to two seconds; terminal POSTs are never skipped.

Testing

  • PYTHONPATH=src .../.venv/bin/python -m pytest tests/shared_utils/test_health_check.py tests/attribution/unit/test_attrsvc_restart_agent_http.py services/tests/test_attrsvc_slurm_supervisor.py -q
    • 107 passed, 5 existing warnings, 9 subtests passed
  • PYTHONPATH=src .../.venv/bin/python -m pytest tests/attribution/unit/test_client_response.py tests/shared_utils/test_health_check.py -q
    • 115 passed, 4 existing warnings, 13 subtests passed
  • Black, isort, Ruff, git diff --check, and shell syntax checks

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge; no actionable issues remain in the reviewed changes.

Summary

Adds bounded recovery for an external attrsvc and keeps its Slurm allocation alive across process crashes.

  • Slurm keeps attrsvc on its allocated node through brief crashes.
  • A rejected terminal POST skips the next optional progressive POST.
  • NVRx releases lost requests and bounds failed GET polling.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Failed workload cycle] --> B[Terminal POST]
  B --> C{Accepted?}
  C -->|No| D[Leave slot free and skip one progressive POST]
  C -->|Yes| E[Poll GET]
  E --> F{Response}
  F -->|Pending or in flight| G[Reset failure count]
  G --> E
  F -->|Availability failure| H{Three consecutive failures?}
  H -->|No| E
  H -->|Yes| I[Release slot]
  F -->|Lost or rejected request| I
  F -->|Completed| J{STOP?}
  J -->|Yes| K[Latch STOP]
  J -->|No| I
Loading

Reviews (13) · Last reviewed commit: "Merge branch 'main' into fix/attrsvc-slu..." · Reviewed by Greptile

Comment thread src/nvidia_resiliency_ext/shared_utils/health_check.py Outdated
Comment thread services/attrsvc/deploy/supervise_attrsvc.sh
Comment thread services/attrsvc/deploy/supervise_attrsvc.sh
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch from d891cb9 to 026431d Compare October 9, 2026 18:39
@namitdhameja namitdhameja self-assigned this Oct 9, 2026
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch from 026431d to 1ce2dc5 Compare October 9, 2026 18:55
Comment thread services/attrsvc/deploy/supervise_attrsvc.sh
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch 5 times, most recently from 2a52e88 to dd6e5a7 Compare October 9, 2026 20:31
Comment thread src/nvidia_resiliency_ext/attribution/orchestration/client_response.py Outdated
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch 2 times, most recently from 442ab1c to 5dc6d16 Compare October 9, 2026 20:54
Comment thread services/attrsvc/deploy/supervise_attrsvc.sh Outdated
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch 2 times, most recently from e33fe40 to 164d7cb Compare October 9, 2026 21:05
@namitdhameja
namitdhameja force-pushed the fix/attrsvc-slurm-supervisor branch from 164d7cb to e7a7b68 Compare October 9, 2026 22:30
@namitdhameja namitdhameja added the ci-approved Approved to run CI label Oct 9, 2026
@namitdhameja
namitdhameja merged commit 734acce into main Oct 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved Approved to run CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants