Skip to content

fix(nmxc-browser): resolve NMX-C endpoint by rack ID as well. - #4652

Merged
rtamma-nv merged 2 commits into
NVIDIA:mainfrom
rtamma-nv:fix/nmx_c_browser
Aug 6, 2026
Merged

fix(nmxc-browser): resolve NMX-C endpoint by rack ID as well.#4652
rtamma-nv merged 2 commits into
NVIDIA:mainfrom
rtamma-nv:fix/nmx_c_browser

Conversation

@rtamma-nv

Copy link
Copy Markdown
Contributor

Currently, NMX-C browser expects chassis_serial->nmx_c_endpoint mapping to be available in nvlink_nmx_c_endpoint table. In sites where there are ingested racks, nmx_c_endpoint table is not required to be populated.
Add rack_id as an alternative to chassis_serial in NmxcBrowseRequest. When rack_id is provided the endpoint is resolved from the rack's ready control-plane switch NVOS IP via resolve_nmx_c_endpoint_url, removing the requirement for a nvlink_nmxc_endpoints row.

Related issues

#4474

Type of Change

  • [X ] 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
  • [ X] Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

Add rack_id as an alternative to chassis_serial in NmxcBrowseRequest.
When rack_id is provided the endpoint is resolved from the rack's ready
control-plane switch NVOS IP via resolve_nmx_c_endpoint_url.

Signed-off-by: Roopesh Tamma <rtamma@nvidia.com>
Signed-off-by: Roopesh Tamma <rtamma@nvidia.com>
@rtamma-nv
rtamma-nv requested a review from a team as a code owner August 6, 2026 05:52
@coderabbitai

coderabbitai Bot commented Aug 6, 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: 6b79e622-fd38-4166-9adf-bab0e470c506

📥 Commits

Reviewing files that changed from the base of the PR and between 4f0e11f and 56c125e.

⛔ Files ignored due to path filters (1)
  • rest-api/proto/core/gen/v1/nico_nico.pb.go is excluded by !**/*.pb.go, !**/gen/**, !rest-api/**/*.pb.go
📒 Files selected for processing (8)
  • crates/admin-cli/src/browse/nmxc/args.rs
  • crates/admin-cli/src/browse/nmxc/cmd.rs
  • crates/admin-cli/src/machine/nvlink_info/cmd.rs
  • crates/api-core/src/handlers/nmxc_browse.rs
  • crates/api-web/src/nmxc_browser.rs
  • crates/api-web/templates/nmxc_browser.html
  • crates/rpc/proto/forge.proto
  • rest-api/proto/core/src/v1/nico_nico.proto

Summary by CodeRabbit

  • New Features
    • NMX-C browsing now supports selecting an endpoint by either chassis serial or rack ID.
    • Added rack-based GPU listing support in the CLI and web interface.
    • Endpoint selectors are validated to require exactly one identifier.
  • Bug Fixes
    • Improved validation and error reporting for missing, conflicting, invalid, or unavailable endpoint identifiers.
    • Enhanced rack-based endpoint resolution using the rack’s ready control-plane switch.

Walkthrough

NMX-C browsing now accepts either a chassis serial or rack ID. CLI and web requests validate the selectors, RPC contracts carry the rack ID, and the core handler resolves rack endpoints through the ready control-plane switch.

Changes

NMX-C rack endpoint selection

Layer / File(s) Summary
Request selector contracts
crates/rpc/proto/forge.proto, rest-api/proto/core/src/v1/nico_nico.proto, crates/admin-cli/src/browse/nmxc/*, crates/admin-cli/src/machine/nvlink_info/cmd.rs
NmxcBrowseRequest and the CLI support mutually exclusive chassis serial and rack ID selectors. NVLink information requests explicitly leave rack_id unset.
Web endpoint selection
crates/api-web/src/nmxc_browser.rs, crates/api-web/templates/nmxc_browser.html
The web form selects a chassis serial or rack ID. Validation rejects missing or simultaneous selectors, validates rack IDs, sends the parsed rack ID, and tracks query execution state.
Core endpoint resolution
crates/api-core/src/handlers/nmxc_browse.rs
The handler resolves endpoints by chassis serial or rack ID, reports selector-specific not-found errors, and tests selector validation and trimming behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser as NMX-C browser
  participant ApiWeb as api-web
  participant Request as NmxcBrowseRequest
  participant ApiCore as api-core
  participant Database
  Browser->>ApiWeb: Submit chassis serial or rack ID
  ApiWeb->>Request: Build validated browse request
  Request->>ApiCore: Send endpoint selector
  ApiCore->>Database: Resolve NMX-C endpoint
  Database-->>ApiCore: Return endpoint URL
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: resolving the NMX-C endpoint by rack ID.
Description check ✅ Passed The description directly explains rack-ID endpoint resolution, its purpose, testing, and related issue.
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.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-08-06 05:55:51 UTC | Commit: 56c125e

@rtamma-nv
rtamma-nv merged commit b5eadb0 into NVIDIA:main Aug 6, 2026
127 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