Repository navigation
feat(vcctl): inspect HyperNode trees and member resources - #6173
kevin-wangzefeng wants to merge 1 commit into
Conversation
Resolve the actual forest with the scheduler parser and show Kubernetes Node leaves, readiness, cordon state, and deduplicated resource totals. Keep extended-resource Allocatable/Capacity separate from advertised node-local DRA inventory, with explicit diagnostics and read-only API access. Implements the CLI inspection work item; public topology helper extraction remains separate. Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified in the read-only implementation, and focused tests cover its principal behavior and failure paths.
No open issues 🎉
What changed in this PR
Adds the read-only vcctl hypernode tree command to inspect HyperNode topology using the scheduler’s existing parser, without changing scheduling behavior.
Changes:
- Displays deterministic trees with Node readiness, cordon state, and deduplicated extended-resource totals.
- Includes optional DRA advertised-device counts, with explicit topology, inventory, and API error handling.
- Adds command integration, focused tests, and documentation covering permissions and limitations.
| File | Description |
|---|---|
pkg/cli/hypernode/tree.go |
Resolves, validates, aggregates, and renders HyperNode trees. |
pkg/cli/hypernode/tree_test.go |
Tests topology resolution, resource totals, rendering, and validation. |
pkg/cli/hypernode/options.go |
Loads configuration and reads cluster resources. |
pkg/cli/hypernode/options_test.go |
Tests API reads, DRA inventory, cancellation, and errors. |
pkg/cli/hypernode/dra.go |
Validates DRA pools and counts distinct advertised devices. |
docs/user-guide/how_to_use_network_topology_aware_scheduling.md |
Documents usage, output semantics, permissions, and limitations. |
cmd/cli/vcctl.go |
Registers the HyperNode command. |
cmd/cli/hypernode.go |
Defines the tree subcommand and its flags. |
cmd/cli/hypernode_test.go |
Tests argument validation and DRA opt-out behavior. |
Review effort: Balanced
|
please fix the CI |
What type of PR is this?
Feature.
What this PR does / why we need it:
Add a read-only
vcctl hypernode treecommand to inspect the actual HyperNode topology without manually following references and resolving selectors.The command:
DRA inventory is enabled by default and initially supports node-local ResourceSlices using
spec.nodeName.--dra=falseskips ResourceSlice reads.The command does not query Pods or ResourceClaims, estimate free devices, modify cluster resources, or change scheduling behavior. Tests and user documentation are included.
Which issue(s) this PR fixes:
None.
Special notes for your reviewer:
This PR implements client-side CLI inspection only. Public topology helper extraction, the HyperNodeTopology API/controller, and scheduler adoption are separate work. It does not depend on merging the proposal PR.
The displayed topology is reconstructed from API reads, not retrieved from scheduler memory. HyperNode, Node, and ResourceSlice reads are not an atomic cross-resource snapshot.
AI assistance: Kevin led the feature design and key decisions. Copilot implemented and tested the command under Kevin's guidance. Code has been reviewed by Kevin.
Validation:
go test -count=1 -race ./cmd/cli ./pkg/cli/hypernode ./pkg/scheduler/api ./pkg/util/hypernode— passed.make vcctl— passed.Does this PR introduce a user-facing change?