You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ec3b5e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(commands): keep meta --insecure reachable on Talos v1.14
Talos v1.14 registers the meta command's --insecure on its local flag set
rather than its persistent one. A local flag on a command that only hosts
subcommands reaches nothing: cobra merges a parent's persistent flags into a
child at parse time but not its local ones, and the parent itself takes no
arguments. Both `meta write --insecure` and `meta --insecure write` stopped
parsing, and with them the only way to write a META key over the maintenance
service, which is what an operator does before a node has a machine config.
Re-publish a wrapped container command's local flags as persistent ones, so
they reach the subcommand that consumes them. The flag object is reused rather
than redeclared, so it still writes to the variable upstream's RunE reads, and
a flag that is already persistent is left alone, which makes this inert once
the fix lands upstream.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
### G1a. `--insecure`does not reach `meta` subcommands on Talos v1.14
1344
+
### G1a. `--insecure`reaches `meta` subcommands
1345
1345
1346
1346
```bash
1347
1347
talm meta write --insecure 0x0a "test-value" --nodes $NODE --endpoints $NODE
1348
+
talm meta write -i 0x0a "test-value" --nodes $NODE --endpoints $NODE
1348
1349
talm meta --insecure write 0x0a "test-value" --nodes $NODE --endpoints $NODE
1349
1350
```
1350
1351
1351
-
Expected on v1.14: both forms fail with `unknown flag: --insecure`. Upstream registers the flag on `metaCmd.Flags()` rather than `PersistentFlags()`, so it reaches neither the subcommand (a local parent flag is not inherited) nor the parent (which takes no args), and `talosctl` behaves the same way. talm mirrors upstream instead of compensating, so META writes against a node in maintenance mode need a Talos-side fix.
1352
+
Expected: all three reach the node over the maintenance service. Run this against a node in maintenance mode, before it has a machine config, which is the case the flag exists for.
1352
1353
1353
-
Tracked upstream as [siderolabs/talos#14346](https://github.com/siderolabs/talos/issues/14346). Re-run this case after every Talos bump: once upstream restores the flag, the first form starts working again and this case flips to pinning that.
1354
+
Talos v1.14 registers the flag on `metaCmd.Flags()` rather than `PersistentFlags()`, where it reaches neither the subcommands nor the parent, so plain `talosctl` rejects all three spellings. talm re-publishes container-command flags as persistent to keep this path working ([siderolabs/talos#14346](https://github.com/siderolabs/talos/issues/14346), fixed by [#14347](https://github.com/siderolabs/talos/pull/14347), merged to `main` and not yet in a v1.14 release). Re-run after every Talos bump: once the fix ships in the release talm tracks, the wrapper step is redundant and should be removed.
Copy file name to clipboardExpand all lines: docs/operations/talosctl-commands.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,6 @@ Talos v1.14 registers `meta`'s `--insecure` on that command's local flag set ins
32
32
That is the only way to write a META key over the maintenance service, which is what you do before a node has a machine config, so talm re-publishes such flags as persistent on its wrapper. `talm meta write --insecure` and the `-i` shorthand keep working, and `--cert-fingerprint` travels with them.
33
33
34
34
Reported upstream as [siderolabs/talos#14346](https://github.com/siderolabs/talos/issues/14346) and fixed by [siderolabs/talos#14347](https://github.com/siderolabs/talos/pull/14347), which is merged to `main` but not backported to the v1.14 branch. Once the fix ships in a Talos release talm depends on, the wrapper step becomes redundant and is dropped.
35
-
36
35
## `talm apply` — `--mode=reboot` is gone on Talos v1.14
37
36
38
37
Upstream stopped registering `reboot` among the values of the apply mode flag in v1.14, so `talm apply --mode=reboot` fails with `invalid argument "reboot" for "-m, --mode" flag`. Use `--mode=auto`, which the node promotes to a reboot when the change requires one. Shell completion reads the accepted values back from the flag, so it no longer suggests `reboot` either.
@@ -44,7 +43,6 @@ Upstream stopped registering `--insecure` on `upgrade` in v1.14 (it had been dep
44
43
## `talm reset` — `--insecure` is gone on Talos v1.14
45
44
46
45
Upstream dropped `--insecure` from `reset` in v1.14, so `talm reset --insecure` fails with `unknown flag: --insecure`. Resetting a node that has no valid configuration is done from the maintenance side instead: boot the node into a maintenance image and apply a fresh config, rather than resetting over an unauthenticated connection.
47
-
48
46
## `talm reset` — META-preserving default
49
47
50
48
`talm reset` diverges from upstream `talosctl reset` on one default. Upstream defaults to `--wipe-mode=all`, which wipes the Talos META partition along with STATE and EPHEMERAL — the node cannot self-recover and comes up in maintenance mode requiring a full re-apply. Talm instead populates `--system-labels-to-wipe=STATE,EPHEMERAL` when neither `--wipe-mode` nor `--system-labels-to-wipe` was passed, which preserves META so the node rejoins the cluster from its META-stored bootstrap config on the next boot.
0 commit comments