Repository navigation
Surface NVML error when MIG device placement cannot be determined - #1899
Merged
Merged
Conversation
tariq1890
reviewed
Jul 9, 2026
tariq1890
reviewed
Jul 9, 2026
Contributor
|
Thank you for your contribution @saiyam1814! Please rebase this branch and take a look at the review comments |
When DeviceGetHandleByUUID fails for a MIG device, checkHealth falls back to parsing the legacy MIG UUID format (MIG-GPU-<uuid>/<gi>/<ci>). Modern drivers assign opaque MIG UUIDs (MIG-<uuid>) that carry no placement information, so the fallback is guaranteed to fail for them and the resulting 'unable to parse UUID as MIG device' error masks the actual NVML failure (e.g. ERROR_NO_PERMISSION), making health-check failures hard to diagnose from the logs. Propagate the NVML return code alongside the parse failure so the log shows the real reason the device was marked unhealthy. Adds unit tests for parseMigDeviceUUID and getMigDeviceParts. The same fix was merged in Project-HAMi (which adapts this code) as Project-HAMi/HAMi#1999, where the masked error made Project-HAMi/HAMi#1950 undiagnosable. Signed-off-by: Saiyam Pathak <saiyam911@gmail.com>
saiyam1814
force-pushed
the
fix/mig-uuid-error-propagation
branch
from
July 10, 2026 08:37
5ff6d44 to
54aaf5b
Compare
Contributor
Author
Thank you for the response, done! |
Contributor
|
/ok to test 54aaf5b |
tariq1890
approved these changes
Jul 10, 2026
1 task
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.
What this PR does
When the health check cannot resolve a MIG device's placement, the NVML error from
DeviceGetHandleByUUIDis silently discarded andgetMigDevicePartsfalls back to parsing the legacy MIG UUID format (MIG-GPU-<parent-uuid>/<gi>/<ci>). Modern drivers assign opaque MIG UUIDs (MIG-<uuid>) that carry no placement information, so for those the fallback is guaranteed to fail — and the only error ever logged is the misleadingunable to parse UUID as MIG device, masking the actual NVML failure (e.g.ERROR_NO_PERMISSION,ERROR_NOT_FOUND).This PR:
failed to get MIG device handle for MIG-30d00c09-...: ERROR_NO_PERMISSION; unable to parse UUID as MIG device.parseMigDeviceUUIDandgetMigDeviceParts(previously uncovered), using minimal embeddednvml.Interface/nvml.Devicetest doubles (the go-nvmlmockpackage is not in the vendor tree, so no vendor changes are needed).No behavior change for devices whose placement resolves successfully or whose legacy UUID parses; only the error message for the already-failing path improves.
Motivation
Project-HAMi adapts this resource-manager code, and the masked error made a real-world report (all MIG devices on H200 NVL marked unhealthy, Project-HAMi/HAMi#1950) impossible to diagnose from device-plugin logs. The identical fix was reviewed and merged there as Project-HAMi/HAMi#1999. Upstreaming it so both codebases stay aligned and other users of this plugin get diagnosable health-check failures.