feat(upgrade): pre-upgrade guard against downgrades

オープン
#219 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go, kubernetes

調査の方向性

Read the talm upgrade path and its post-upgrade verification code to find the upgrade RPC call and the COSI version reader; the issue does not name file paths or tests. Trace how the target image tag and --insecure are handled, then check existing CLI flag and error conventions. Done means older major.minor targets are blocked with a useful hint unless explicitly overridden, while insecure mode skips the guard.

索引モデルが issue の本文から書いたものです。

説明

area/commands area/upgrade kind/feature

Problem

talm upgrade fires the upgrade RPC without comparing the running Talos version against the target parsed from the image tag. If values.yaml::image is older than what the node runs (stale preset default, mistaken edit), talm silently initiates a downgrade. Talos does not support downgrades across minor versions; the result ranges from an A/B rollback to a broken node. The post-upgrade verify only compares running vs target after the fact — a "successful" downgrade passes it (running == target at major.minor), and the write-back then pins the node file to the older image.

Concrete shape of the trap: a project initialized with an old preset has image: ...talos:v1.10.5 in values.yaml, nodes run v1.12.6, and talm upgrade -f nodes/node1.yaml resolves v1.10.5 and would downgrade without any warning.

Proposal

Before invoking the upgrade RPC, read the running version (same COSI reader as the post-upgrade verify) and compare major.minor against the target tag. If the target is older than the running version, block with a hint-bearing error; allow override with an explicit flag (e.g. --allow-downgrade). Skip the guard on --insecure (no authenticated COSI path), mirroring the post-upgrade verify predicate.

Related: #213 (version-skew gates).

主要言語
Go
スター
493
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cozystack/talm のほかの issue

cozystack/talm の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。