Add ACCELERATED_COMPUTE health check for the MPS control daemon - #5124
Merged
Merged
Conversation
amogh09
reviewed
Sep 3, 2026
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck
branch
from
September 3, 2026 16:57
d993f51 to
099681c
Compare
amogh09
reviewed
Sep 3, 2026
amogh09
reviewed
Sep 3, 2026
amogh09
reviewed
Sep 3, 2026
| assert.Equal(t, 2, hc.consecutiveFailures) | ||
| } | ||
|
|
||
| func TestMpsThirdConsecutiveFailureImpaired(t *testing.T) { |
Contributor
There was a problem hiding this comment.
Opportunity to use table driven tests?
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck
branch
from
September 3, 2026 20:55
099681c to
fe5d32c
Compare
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck
branch
from
September 3, 2026 22:36
fe5d32c to
4708d48
Compare
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck
branch
from
September 3, 2026 22:45
4708d48 to
bbbb455
Compare
amogh09
approved these changes
Sep 3, 2026
prateekchaudhry
approved these changes
Sep 3, 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.
Summary
Add an
ACCELERATED_COMPUTEdoctor health check that reports the instanceIMPAIREDwhen the NVIDIA MPS control daemon is persistently unavailable. Today the per-task MPS health gate refuses individual MPS tasks when the daemon is down, but nothing tells the control plane the instance itself is unhealthy, so it keeps routing MPS tasks to a box that rejects them one by one. This check surfaces a persistently broken daemon as an instance-level health signal on DescribeContainerInstances and the "ECS Container Instance Health Change" EventBridge event.Implementation details
agent/doctor/mps_daemon_healthcheck.go- the health check. Runs the MPS control-daemon probe once per doctor tick and carries its own consecutive-failure counter: it reportsIMPAIREDonly after 3 consecutive failures and resets on a single success, so a brief RestartSec=1 systemd bounce does not flap.GetHealthcheckType()returnsACCELERATED_COMPUTE. Reuses the existing MPS probe (pipe-directory pre-check + one ProbeControlDaemon, 3s timeout); a nonzero exit or a timeout (wedged daemon) both count as a failure.agent/app/agent_mps_healthcheck_unix.go- registers the check on MPS-capable instances via the sharedgpu.ShouldAdvertiseMpsCapabilitypredicate.agent/app/agent_mps_healthcheck_unsupported.go- no-op so non-Linux builds are unaffected.agent/app/agent.go- wiring innewDoctorWithHealthchecks.agent/app/agent_capability_unix.go- extractedmpsCapabilityInputs()so thegpu-sharing-mpscapability and the health check decide from the same host facts (single source of truth). No behavior change to the capability.Testing
New tests cover the changes: yes
Live E2E on a EC2 GPU instance:
systemctl stop nvidia-mps.service: failures 1 and 2 stay Ok, failure 3 → IMPAIRED, after restart → OK.Fault → IMPAIRED was ~75s (3 failures at the ~25s heartbeat tick); recovery is immediate on the first successful probe.
Description for the changelog
Enhancement - Add ACCELERATED_COMPUTE health check for the MPS control daemon
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions? No
Does this PR include the addition of new environment variables in the README? No
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.