Surface MPS control-daemon impairment reason as StatusReason - #5125
Merged
harishxr merged 1 commit intoSep 4, 2026
Merged
Conversation
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck-statusreason
branch
5 times, most recently
from
September 4, 2026 00:43
b927b5f to
3ca9b93
Compare
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck-statusreason
branch
from
September 4, 2026 02:12
3ca9b93 to
accb279
Compare
harishxr
force-pushed
the
harishxr/mps-ec2-daemon-healthcheck-statusreason
branch
from
September 4, 2026 02:40
accb279 to
9271b15
Compare
harishxr
marked this pull request as ready for review
September 4, 2026 02:58
prateekchaudhry
approved these changes
Sep 4, 2026
amogh09
reviewed
Sep 4, 2026
amogh09
approved these changes
Sep 4, 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
Surface a human-readable reason alongside the instance health status. On
IMPAIRED, the MPS control-daemon health check now reports why e.g. "probe timed out, daemon wedged" or "probe failed, cannot find MPS control daemon process", which reachesDescribeContainerInstances and the "ECS Container Instance Health Change" EventBridge event as statusReason. Follow up to #5124, which reported status only.The plumbing is generic and any doctor health check that returns a non-empty reason gets it forwarded to the wire. Only the MPS check populates one in this change.
Implementation details
The doctor Healthcheck interface gains a
GetStatusReason()accessor andSetHealthcheckStatusnow takes the reason alongside the status so the two are always set together. The shared status tracker stores and returns the reason under its existing lock, so every check that embeds the tracker picks up both new methods for free.On the publish side, the TCS client forwards a non-empty reason to
InstanceStatus.StatusReasonand leaves the pointer nil when there is none, so omitempty drops it and the backend sees null rather than an empty string.Only the MPS control-daemon check populates a reason today: on IMPAIRED it reports the probe error (daemon wedged / probe timed out / control binary missing), bounded to MHS's 1024-character limit on a rune boundary, and clears it on any healthy tick. Every other check stays status-only, so their behavior is unchanged; the plumbing is generic, so a future check can surface a reason by simply returning one.
Testing
New tests cover the changes: yes
Agent built from this branch:
systemctl stop nvidia-mps.service: after the 3-strike threshold (~70s), ACCELERATED_COMPUTE = IMPAIRED with statusReason = "mps control daemon probe failed (exit 1, output "Cannot find MPS control daemon process"): exit status 1". systemctl start → back to OK, statusReason cleared.Description for the changelog
Enhancement - Surface MPS control-daemon impairment reason as StatusReason
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.