Context
PR #119 moved template rendering in talm apply from offline to online mode (rendering inside the Talos client callback so lookup() resolves real discovery data). This fixes the reported Talos v1.12 validation error, but introduces a behavioral change for multi-node modelines.
Problem
engine.Render calls helpers.FailIfMultiNodes (pkg/engine/engine.go:210) whenever Offline=false. Previously, talm apply rendered offline, so this check never fired, and the subsequent ApplyConfiguration gRPC call handled multi-node fan-out at the wire level.
After #119, users who:
- put multiple IPs in a single modeline
nodes=[ip1, ip2], or
- pass
--nodes ip1,ip2 on the command line
will hit FailIfMultiNodes before any rendering happens, in non-insecure mode.
Unaffected paths
- The documented single-node-per-file flow (
-f node1.yaml -f node2.yaml) still works because each file modeline sets exactly one node.
- Maintenance mode (
-i) still works because WithClientMaintenance does not inject nodes metadata into the gRPC context.
Proposed fix
Decide intent and apply one of:
- Document the single-node-per-file convention explicitly in README.
- Render once per node in the client callback when multiple nodes are present.
- Reject multi-node modelines up front with a clearer error message explaining the constraint.
References
Context
PR #119 moved template rendering in
talm applyfrom offline to online mode (rendering inside the Talos client callback solookup()resolves real discovery data). This fixes the reported Talos v1.12 validation error, but introduces a behavioral change for multi-node modelines.Problem
engine.Rendercallshelpers.FailIfMultiNodes(pkg/engine/engine.go:210) wheneverOffline=false. Previously,talm applyrendered offline, so this check never fired, and the subsequentApplyConfigurationgRPC call handled multi-node fan-out at the wire level.After #119, users who:
nodes=[ip1, ip2], or--nodes ip1,ip2on the command linewill hit
FailIfMultiNodesbefore any rendering happens, in non-insecure mode.Unaffected paths
-f node1.yaml -f node2.yaml) still works because each file modeline sets exactly one node.-i) still works becauseWithClientMaintenancedoes not injectnodesmetadata into the gRPC context.Proposed fix
Decide intent and apply one of:
References
pkg/engine/engine.go:209-213pkg/commands/apply.go:120(withApplyClient callback)