-
Notifications
You must be signed in to change notification settings - Fork 24
Wrapper --nodes guard fires on commands with their own node-selection (crashdump, rotate-ca) #180
Copy link
Copy link
Closed
Labels
area/commandsIssues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)Issues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Metadata
Metadata
Assignees
Labels
area/commandsIssues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)Issues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
talm crashdumprequires--nodeseven though the underlying talosctl crashdump uses--control-plane-nodes/--worker-nodes/--init-nodefor node selection. Operators following the help text get an opaque error.Reproduction
Output:
The talm root layer guards on
len(GlobalArgs.Nodes) < 1(atpkg/commands/root.go:262), but crashdump's native API doesn't consume that field — it accepts--control-plane-nodes/--worker-nodes/--init-nodelists separately. The guard fires before the command's own node-selection logic runs.Workaround
Pass a redundant
--nodes:Works, but talm's required flag is meaningless for this command (the actual node selection comes from the
--control-plane-nodeslist).Note
Talos itself has deprecated
crashdump:So this may not be worth fixing at the crashdump level — but the same guard applies to any talosctl command whose node-selection model diverges from
--nodes(rotate-ca uses--control-plane-nodes, conformance is similar). Worth carving an exception list in the wrapper:pkg/commands/talosctl_wrapper.gocould maintaincommandsWithoutNodesRequirement = ["crashdump", "rotate-ca", "support", ...]and skip the guard for them, deferring to the command's native selection.Expected
Either:
--nodesguard for commands using alternative node-selection flags.crashdumpin talm to follow upstream (usesupportinstead) and document the others.Surfaced during the dev17 read-only sweep.