Skip to content

fix(nvlink): use GPU platform chassis serial when nvlink_info is unset.#3483

Merged
tmcroberts97 merged 2 commits into
NVIDIA:mainfrom
rtamma-nv:fix/nvlink_info
Jul 14, 2026
Merged

fix(nvlink): use GPU platform chassis serial when nvlink_info is unset.#3483
tmcroberts97 merged 2 commits into
NVIDIA:mainfrom
rtamma-nv:fix/nvlink_info

Conversation

@rtamma-nv

Copy link
Copy Markdown
Contributor

This should help with auto population of nvlink_info for managed hosts that are missing that info.

Fall back to the first GPU platform_info chassis_serial from machine
topology when nvlink_info is missing or empty, so MNNVL-capable hosts
can still be grouped and have nvlink_info populated from NMX-C hello.

Related issues

#3481

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • [ X] Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

This should help with auto population of nvlink_info for  managed hosts that are missing that info.

Signed-off-by: Roopesh Tamma <rtamma@nvidia.com>
@rtamma-nv rtamma-nv requested a review from a team as a code owner July 14, 2026 15:03
@rtamma-nv rtamma-nv requested a review from tmcroberts97 July 14, 2026 15:03
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dfb34f5c-aea9-4b0a-bd2b-eb7b4d5e4ac5

📥 Commits

Reviewing files that changed from the base of the PR and between 0e199a7 and d04a0c5.

📒 Files selected for processing (2)
  • crates/api-model/src/hardware_info.rs
  • crates/nvlink-manager/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/api-model/src/hardware_info.rs
  • crates/nvlink-manager/src/lib.rs

Summary by CodeRabbit

  • Bug Fixes
    • Improved chassis identification by deriving a chassis serial from the first GPU’s platform information when the primary chassis serial is missing.
    • More reliably ignores blank/whitespace-only chassis serial values to improve hardware matching.
    • Enhances downstream endpoint resolution and partition monitoring by producing more accurate chassis-based snapshots when chassis data is incomplete.

Walkthrough

Changes

Chassis serial resolution

Layer / File(s) Summary
GPU platform serial accessor
crates/api-model/src/hardware_info.rs
Adds first_gpu_platform_chassis_serial(), updates GPU test helpers, and tests missing, blank, and populated serial handling.
Managed-host chassis grouping
crates/nvlink-manager/src/lib.rs
Prefers a trimmed NMX-C chassis serial and falls back to the first GPU platform serial during managed-host aggregation.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: falling back to GPU platform chassis serial when nvlink_info is unset.
Description check ✅ Passed The description is clearly related to the implemented NVLink fallback behavior and updated tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/api-model/src/hardware_info.rs`:
- Around line 967-977: Convert first_gpu_platform_chassis_serial into a
table-driven test using the established value_scenarios!/scenarios! helpers,
covering no GPUs, a GPU with missing platform_info, blank or whitespace-only
serials, and a valid serial; assert each scenario’s expected Option result and
remove the current imperative setup/assertions.

In `@crates/nvlink-manager/src/lib.rs`:
- Around line 78-93: Normalize the GPU-platform fallback in
managed_host_chassis_serial the same way as the nvlink_info chassis_serial path:
trim the value, discard it if empty, and only then return it as the grouping
key. Preserve the existing NMX-C-first fallback order and use
HardwareInfo::first_gpu_platform_chassis_serial as the fallback source.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b416c2f8-3ae0-4689-ac59-e07b68ab5c73

📥 Commits

Reviewing files that changed from the base of the PR and between f5044bc and 0e199a7.

📒 Files selected for processing (2)
  • crates/api-model/src/hardware_info.rs
  • crates/nvlink-manager/src/lib.rs

Comment thread crates/api-model/src/hardware_info.rs
Comment thread crates/nvlink-manager/src/lib.rs
Signed-off-by: Roopesh Tamma <rtamma@nvidia.com>
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 259 13 30 78 7 131
machine-validation-runner 807 40 234 288 36 209
machine_validation 807 40 234 288 36 209
machine_validation-aarch64 807 40 234 288 36 209
nvmetal-carbide 807 40 234 288 36 209
TOTAL 3493 173 966 1236 151 967

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@tmcroberts97 tmcroberts97 merged commit afd6108 into NVIDIA:main Jul 14, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants