Skip to content

fix: scope Spectrum-X NIC config to east-west devices - #168

Merged
almaslennikov merged 3 commits into
mainfrom
fix/nic-template-ew-selector
Aug 11, 2026
Merged

fix: scope Spectrum-X NIC config to east-west devices#168
almaslennikov merged 3 commits into
mainfrom
fix/nic-template-ew-selector

Conversation

@almaslennikov

@almaslennikov almaslennikov commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • render Spectrum-X NicConfigurationTemplate resources per source hardware group
  • add the source group east-west PCI addresses to spec.nicSelector alongside the derived NIC type
  • keep north-south PCI addresses out of the selector even when DPU and SuperNIC device IDs are identical
  • keep source-based template identities stable across full and strict-subset renders
  • apply the behavior consistently to RA2.1, RA2.2, and RA2.3 and update the user/agent documentation

Why

NIC Configuration Operator evaluates nicType and pciAddresses together, but the existing Launch Kit templates emitted only nicType. A BlueField-3 DPU and BlueField-3 SuperNIC can both report a2dc, so the type-only selector can match and propagate the east-west Spectrum-X configuration to a north-south device on the same selected node.

Per-source PCI selectors avoid a merged cross-product between machine layouts and make the selected device set exactly the east-west inventory discovered for that source group. Source-based names remain stable when switching between full generation and --groups; older merged type-only templates are surfaced by deploy preflight and can be safely removed with --overwrite-existing.

Validation

  • make build
  • make test
  • targeted same-device-ID regression across RA2.1, RA2.2, and RA2.3
  • full-to-subset template identity regression
  • mkdocs build --strict --clean
  • binary smoke renders:
    • RA2.1 none
    • RA2.2 none, swplb, and hwplb
    • RA2.3 none
    • existing same-layout, mixed-layout, and heterogeneous grouping fixtures

make lint could not run locally because golangci-lint is not installed; the GitHub Actions lint job is green.

Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR narrows Spectrum-X NIC configuration to each source hardware group’s east-west PCI inventory and keeps retained template identities stable across full and subset renders.

  • Renders one NicConfigurationTemplate per source group.
  • Combines NIC type and east-west PCI addresses to exclude same-device-ID north-south DPUs.
  • Documents legacy-template cleanup and updates tests and agent-facing references.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
pkg/networkoperatorplugin/scopes.go Moves NicConfigurationTemplate to per-source rendering, preserving source-based identity independently of full or subset mode.
pkg/networkoperatorplugin/templates.go Adds normalized, deduplicated east-west PCI-address derivation with explicit validation for missing inventory.
pkg/networkoperatorplugin/grouping_test.go Updates grouping expectations and verifies retained template filenames remain stable across full and strict-subset renders.
pkg/networkoperatorplugin/nic_configuration_template_test.go Covers PCI normalization and confirms all Spectrum-X variants exclude same-device-ID north-south devices.
profiles/spectrum-x/30-nicconfigurationtemplate.yaml Adds PCI addresses to the RA2.3 NIC selector so matching uses the east-west type/address intersection.
profiles/spectrum-x-ra2.1/30-nicconfigurationtemplate.yaml Applies the narrowed NIC selector consistently to RA2.1.
profiles/spectrum-x-ra2.2/30-nicconfigurationtemplate.yaml Applies the narrowed NIC selector consistently to RA2.2.
docs/user/spectrum-x.md Documents per-source selectors, stable subset-render identities, and cleanup of obsolete merged templates during upgrades.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Source hardware group] --> B[Filter east-west PFs]
  B --> C[Derive NIC type]
  B --> D[Normalize PCI addresses]
  C --> E[Per-source NicConfigurationTemplate]
  D --> E
  E --> F[Match type and PCI intersection]
  F --> G[Configure east-west NICs only]
Loading

Reviews (2): Last reviewed commit: "fix: keep NIC template names stable acro..." | Re-trigger Greptile

Comment thread pkg/networkoperatorplugin/render_plan.go Outdated
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
@almaslennikov
almaslennikov merged commit f728504 into main Aug 11, 2026
13 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.

1 participant