feat(librms)!: use descriptors for node identity - #3812
Conversation
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
WalkthroughThe PR upgrades librms to v0.10.0 and replaces fixed RMS node-type resolution with descriptor-based identities. Rack profiles support arbitrary product families, while RMS requests retain optional legacy mappings and omit insecure certificate-acceptance fields. ChangesRMS descriptor migration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant RackProfile
participant ComponentManager
participant RmsNodeIdentity
participant NodeInfoBuilder
participant RMS
RackProfile->>ComponentManager: provide role, vendor, product_family
ComponentManager->>RmsNodeIdentity: resolve descriptor identity
RmsNodeIdentity->>NodeInfoBuilder: apply descriptor and optional legacy type
NodeInfoBuilder->>RMS: send descriptor-based request and filters
RMS-->>NodeInfoBuilder: return operation response
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3812.docs.buildwithfern.com/infra-controller |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
crates/site-explorer/tests/integration/machine_creator.rs (1)
245-267: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover descriptor fallback for arbitrary product families.
This test only exercises
Gb200, which also has a legacyNodeTypemapping. Add a table-driven case forRackProductFamily::Other(...)that verifies the customproduct_familyis sent, whilenode.r#typeremainsNone; this directly protects the PR’s descriptor-migration objective.As per coding guidelines, input variants should be grouped using table-driven tests. Based on the PR objective, arbitrary product-family strings must be supported without closed
NodeTypemappings.🤖 Prompt for 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. In `@crates/site-explorer/tests/integration/machine_creator.rs` around lines 245 - 267, Add a table-driven integration-test case alongside the existing descriptor assertions for RackProductFamily::Other with an arbitrary product-family string. Verify the custom product_family attribute is preserved and node.r#type is None, while retaining the existing Gb200 coverage and assertions.Source: Coding guidelines
🤖 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 `@docs/manuals/rack_level_admin.md`:
- Around line 41-46: Update the Dependencies section in rack_level_admin.md to
remove the unconditional NICo Flow, NSM, and PSM prerequisite. State that
NSM/PSM are required only when using those backends, and document RMS as the
alternative backend for deployments covering compute, switch, and power-shelf
roles.
---
Nitpick comments:
In `@crates/site-explorer/tests/integration/machine_creator.rs`:
- Around line 245-267: Add a table-driven integration-test case alongside the
existing descriptor assertions for RackProductFamily::Other with an arbitrary
product-family string. Verify the custom product_family attribute is preserved
and node.r#type is None, while retaining the existing Gb200 coverage and
assertions.
🪄 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: c644acc4-dae7-4225-9eca-44429d08a150
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (23)
Cargo.tomlbook/src/configuration/configurability.mdcrates/api-core/src/cfg/README.mdcrates/api-core/src/setup.rscrates/api-core/src/tests/rack_state_controller/handler.rscrates/api-db/src/machine.rscrates/api-db/src/power_shelf.rscrates/api-db/src/switch.rscrates/api-model/src/rack_type.rscrates/api-test-helper/src/mock_rms.rscrates/component-manager/src/component_manager.rscrates/component-manager/src/rms.rscrates/rack-controller/src/fabric_manager.rscrates/rack-controller/src/maintenance.rscrates/rack/src/firmware_update.rscrates/rack/src/rms_client.rscrates/rack/src/rms_node_type.rscrates/rpc/src/model/rack_type.rscrates/site-explorer/src/machine_creator.rscrates/site-explorer/tests/integration/machine_creator.rsdev/mac-local-dev/README.mddocs/configuration/component-manager-rms.mddocs/manuals/rack_level_admin.md
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
polarweasel
left a comment
There was a problem hiding this comment.
Check the one comment, but should be good to go
This is a follow-up doc fix for #3812 ## Related issues Supports #3593 ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [x] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [ ] **This PR contains breaking changes** ## Testing - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [x] No testing required (docs, internal refactor, etc.) Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
NICo currently converts rack-profile vendor and product-family strings into a closed RMS
NodeTypeenum before making RMS requests. That requires NICo code changes for each new hardware family and can reject unknown rack profiles during startup.This change migrates NICo's RMS requests to
NodeDescriptor. NICo now sends the existing rack-profile role, vendor, and product family directly to RMS and lets RMS resolve them for dispatch. Rack product families are represented as arbitrary strings, so adding a hardware family no longer requires a NICo release solely to extend an enum mapping.For now,
NodeTypeandNodeDescriptorcoexist andNodeDescriptorserves in the fallback path.NodeTypewill be deprecated in the future in favor ofNodeDescriptor.Related issues
Closes #3593
Type of Change
Breaking Changes
This PR doesn't contain breaking API or config surface changes, but it involves a security cleanup -- removal of hardcoded
dangerously_accept_invalid_certs: truein NICo code. This change was introduced betweenlibrms-v0.9.0-mts4andlibrms-v0.10.0, which can cause breakage when a newer NICo version (after this PR) calls an older version of RMS usinglibrmsbefore NVIDIA/nv-rms-client@cb1a677, as early versions of RMS relied on caller specifieddangerously_accept_invalid_certsfor BMC and switch host HTTP (BMC uses HTTPs without server cert validation).Testing
Test Logs
RPC Coverage
RMS methods that call a NodeDescriptor normalization path were exercised:
BatchUpdateFirmware,ApplyStoredFirmwareObject, andApplyFirmwareObjecteach resolve both node and descriptor-keyed selector map entries. Total: 20 RPC methods and 23 successful resolutions.NICo
RMS