Skip to content

fix(clustertool): warn about schematic mismatches before apply - #604

Merged
Boemeltrein merged 2 commits into
mainfrom
fix/warn-installed-schematic
Oct 24, 2026
Merged

Boemeltrein merged 2 commits into
mainfrom
fix/warn-installed-schematic

Conversation

@Boemeltrein

@Boemeltrein Boemeltrein commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Description

Reported feedback

clustertool talos apply assumes that unattended installation will install the configured Talos image. However, nodes booted from raw disk/VM images or reset to maintenance may already have Talos installed.

In that case, unattended installation is skipped. Applying configuration does not replace the existing Talos version, kernel arguments or system extensions, or reinstall Talos onto the configured target disk. This also affects installations accidentally running from a USB drive.

Solution

Add a check before applying configuration to maintenance nodes:

  • Use the META volume's ready status to identify an existing Talos installation.
  • Read SystemDisk to display the detected installation disk.
  • Display the currently detected schematic ID and the desired ID from each node's generated configuration.
  • Warn for every existing installation, including matching schematic IDs, because the configured target disk may still be ignored.
  • Report inconclusive inspection results as unknown and require confirmation.
  • Inspect all relevant nodes before presenting one confirmation question, defaulting to no.
  • Include guidance to verify the node and disk and consult talosctl wipe disk --help before removing an existing installation.

The check covers normal apply, initial bootstrap and resumed bootstrap. Fresh ISO boots with META reported as missing proceed without this warning.

⚙️ Type of change

  • 🆕 New feature (e.g., bootstrap, cluster config, or automation)
  • 🐛 Bugfix (e.g., node setup, config generation)
  • 🔃 Chart Updates/Changes included with clustertool
  • 🔃 Refactor (internal changes, no functional impact)
  • ⚠️ Breaking change (changes Talos cluster behavior)

🧪 How Has This Been Tested?

  • Run clustertool commands locally
  • Verified cluster bootstrap on Talos nodes
  • Checked generated configs are valid
  • Validated cluster state after changes

Automated tests pass: go test ./pkg/gencmd ./cmd.

Tests cover fresh ISO nodes, running nodes, matching and differing schematics, failed or incomplete inspection, and inspecting all nodes before one confirmation.

Manual validation of the final revision:

  • Reset two installed control-plane nodes to maintenance mode.
  • Confirmed /dev/sda and both schematic IDs were displayed correctly for each node.
  • Confirmed warnings appeared for both a matching and a differing schematic.
  • Answered n and confirmed the command stopped before applying configuration.
  • Started fresh VMs with empty disks from ISO and confirmed no existing-installation warning appeared.

A two-control-plane bootstrap, Ready status and final schematic IDs were verified during earlier testing of this PR. Those completion checks have not yet been repeated for the final revision.

📃 Notes:

The detected schematic describes the currently booted image. SystemDisk identifies the discovered installation disk; it does not prove the current boot source.

The check performs read-only inspection. Wiping remains a manual operation, and disks in use may require a different reset/wipe procedure.

✔️ Checklist:

  • ⚖️ Followed project style and contribution guidelines
  • 👀 Self-reviewed my changes
  • 🧪 Documented testing steps
  • 🏷️ PR title follows convention:
    • feat(clustertool):
    • fix(clustertool):
    • chore(clustertool):

@Boemeltrein Boemeltrein mentioned this pull request Oct 24, 2026
@trueforge-bot

trueforge-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

🚀 HelmRelease CI Report

Overall Status

Stage Result
🔍 Detect HelmReleases success
🧪 Helm Tests skipped

🧪 HelmReleases Tested


⏭️ HelmReleases Skipped


Result

ℹ️ No HelmReleases required testing

@Boemeltrein
Boemeltrein marked this pull request as ready for review October 24, 2026 19:04
@Boemeltrein
Boemeltrein merged commit 410a759 into main Oct 24, 2026
10 checks passed
@Boemeltrein
Boemeltrein deleted the fix/warn-installed-schematic branch October 24, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant