-
Notifications
You must be signed in to change notification settings - Fork 24
talm upgrade extracts image from node body, not values.yaml #176
Copy link
Copy link
Open
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)area/upgradeIssues or PRs related to talm upgrade flow (image extraction, post-upgrade verification)Issues or PRs related to talm upgrade flow (image extraction, post-upgrade verification)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/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)area/upgradeIssues or PRs related to talm upgrade flow (image extraction, post-upgrade verification)Issues or PRs related to talm upgrade flow (image extraction, post-upgrade verification)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Problem
talm upgradeextracts the target installer image from the node-body patch (nodes/<name>.yaml'smachine.install.image), not fromvalues.yaml's top-levelimage:key. Operators who changevalues.yaml: image: ...expecting the upgrade to use that image observe upgrade run against a different image, with no warning.This diverges from
talm apply/talm template, which do honorvalues.yamloverlays.Reproduction
dev17 OCI cluster, running
cozystack/talos:v1.12.6:values.yaml:image: "ghcr.io/siderolabs/installer:v1.13.0"(operator's intent: upgrade to 1.13).nodes/node0.yamlstill carries the historicalmachine.install.image: ghcr.io/cozystack/cozystack/talos:v1.12.6.talm upgrade -f nodes/node0.yaml.Wrapper code at
pkg/commands/upgrade_handler.go:104-119:engine.FullConfigProcess(eopts, patches)callsInitializeConfigBundle(default Talos config generation via machinery'sgenerate.NewInput— NOT chart render) thenApplyPatches(loadedPatches=[nodeFile]). The chart'svalues.yamlis never read. SoInstall().Image()reflects whatevermachine.install.imagethe node body declares, falling back to the machinery default.applyandtemplateuseengine.Render()against the chart, which DOES readvalues.yaml. Two code paths, two different sources of truth for the same value.Expected
Either:
talm upgradeuses the same render path asapply/template, picking upvalues.yaml.imageand only falling back to node-bodymachine.install.imagewhen the chart didn't render one.talm upgradedocuments the divergence loudly and emits awarning:line when the node-body image diverges from the chart'svalues.yaml.image.Why this matters
Verified on dev17:
talm upgrade -f nodes/node0.yamlwithvalues.yaml.image: siderolabs/installer:v1.13.0and node-bodycozystack/talos:v1.12.6ran against cozystack:v1.12.6 — a no-op same-version upgrade. The operator'svalues.yamlchange had zero effect. Operator footgun severity: HIGH on fleets wherevalues.yamlis the single source of truth.Surfaced during Phase 2C real-Talos validation (see #175 / PR #173 context).