Skip to content

Improve Spectrum-X CIDRPool allocation errors - #147

Merged
almaslennikov merged 1 commit into
mainfrom
fix/spectrumx-cidrpool-diagnostics
Jul 31, 2026
Merged

Improve Spectrum-X CIDRPool allocation errors#147
almaslennikov merged 1 commit into
mainfrom
fix/spectrumx-cidrpool-diagnostics

Conversation

@almaslennikov

Copy link
Copy Markdown
Collaborator

Summary

  • report selected workers, normalized topology host names, exact matches, missing workers, and topology-only hosts when CIDRPool allocation finds no overlap
  • identify likely wrong-topology, case-only, and short-name/FQDN mismatches while preserving strict node-name matching
  • report each missing worker's available rail/plane coverage for partial pools and point to the relevant topology attributes
  • replace blank per-group template context with a group identifier or a sorted, bounded worker list
  • document the Spectrum-X CIDRPool matching and troubleshooting contract

Allocation semantics are unchanged: l8k still requires exact, case-sensitive node-name matches and does not auto-match similar names.

Testing

  • go test ./...
  • go build ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.0 run ./...
  • mkdocs build --strict

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

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

Improves Spectrum-X CIDRPool and template-rendering error diagnostics without changing allocation semantics.

  • Reports bounded, sorted worker and topology host summaries when no exact node-name matches exist.
  • Identifies likely case-only and short-name/FQDN mismatches while retaining strict matching.
  • Reports available rail and plane coverage when workers are missing from individual pools.
  • Adds clearer group context to template execution errors.
  • Documents the matching and troubleshooting contract and adds focused tests.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The new logic is confined to bounded diagnostic formatting and a shared pool-key helper, while exact node filtering, pool construction, and template rendering behavior remain intact.

Important Files Changed

Filename Overview
pkg/networkoperatorplugin/spectrumx/addressing.go Adds bounded topology-match and per-pool coverage diagnostics while preserving exact node matching and allocation behavior.
pkg/networkoperatorplugin/spectrumx/addressing_test.go Covers wrong-topology, case/FQDN mismatch, partial rail-plane coverage, AIR host-name reporting, and list truncation.
pkg/networkoperatorplugin/templates.go Replaces blank per-group template error context with an identifier or bounded sorted worker list.
pkg/networkoperatorplugin/templates_test.go Verifies descriptive labels for unnamed groups and bounded worker-list formatting.
docs/user/spectrum-x.md Documents strict node-name matching and actionable CIDRPool troubleshooting guidance.
README.md Adds a concise reference to the Spectrum-X CIDRPool matching and troubleshooting contract.
skills/k8s-launch-kit-generate/SKILL.md Updates generation guidance to describe the improved CIDRPool allocation diagnostics.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Load Spectrum-X topology] --> B[Build normalized host links]
    B --> C[Filter links by exact worker-node names]
    C --> D{Any matching pool keys?}
    D -- No --> E[Report selected workers, topology hosts, missing workers, and mismatch hint]
    D -- Yes --> F{Every selected worker present in each pool?}
    F -- No --> G[Report missing workers and available rail or plane coverage]
    F -- Yes --> H[Render CIDRPools with unchanged allocation semantics]
Loading

Reviews (1): Last reviewed commit: "Improve Spectrum-X CIDRPool diagnostics" | Re-trigger Greptile

@almaslennikov
almaslennikov merged commit f02485b into main Jul 31, 2026
12 checks passed
@almaslennikov
almaslennikov deleted the fix/spectrumx-cidrpool-diagnostics branch August 5, 2026 08:26
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