Repository navigation
docs(operations): pre-pull the new images before an upgrade on Talos - #762
Open
europrinter (yankawai) wants to merge 1 commit into
Open
europrinter (yankawai) wants to merge 1 commit into
europrinter (yankawai) wants to merge 1 commit into
Conversation
On Talos the management etcd and the containerd image store share the EPHEMERAL volume, and the kubelet pulls images in parallel, so the platform rollout makes every node pull and unpack the new images at once. On a three-node cluster going from v1.6.4 to v1.6.5 that stalled etcd fdatasync for up to 5 s and the leader changed four times in five minutes. A second cluster pulled the same images node by node before the upgrade, leader last, and kept its leader through the whole rollout. The new optional step describes that procedure, see cozystack/cozystack#4962. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
europrinter (yankawai)
requested review from
Andrei Kvapil (kvaps),
Timofei Larkin (lllamnyp),
myasnikovdaniil and
Timur Tukaev (tym83)
as code owners
October 21, 2026 01:28
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
adds an optional step to the v1.6 and
nextupgrade guides, right beforehelm upgrade. it pulls the new Cozystack images on the control plane nodes one node at a time, the etcd leader last, and checks etcd between nodes. the two steps after it are renumbered, nothing links to their anchors.why, from cozystack/cozystack#4962. on Talos
/var/lib/etcdand/var/lib/containerdare both directories on theEPHEMERALvolume (system_volumes.go), and Talos setsserializeImagePulls: falsewith nomaxParallelImagePulls(kubelet_spec.go), so the rollout makes every node pull and unpack its new images at once. on a three-node cluster going from v1.6.4 to v1.6.5 the management etcd loggedslow fdatasyncup to 5.0 s and elected a new leader four times in five minutes, starting two minutes afterhelm upgrade. a later pull of one 370 MB image on the leader node gave 5.16 s and one more election, the same pull on a follower gave 1.07 and 1.31 s and no election.on the second cluster we pulled the 25 changed images node by node before the upgrade, leader last, and the leader did not change during the pull or the rollout. the pull on the leader node still made it log 38
failed to send out heartbeat on timeand oneslow fdatasyncof 1.2 s. during the rollout the leader logged none of them, one follower logged nineslow fdatasync. that cluster had two leader changes during its previous upgrade, v1.6.1 to v1.6.4, which ran without a pre-pull. we did not correlate those with pulls.the leader is the member that matters. etcd runs the raft ticks and the WAL save in one loop (raft.go), so a leader stuck in fdatasync stops sending heartbeats and the followers start an election, the case the etcd FAQ puts on disk contention. a stalled follower does not tick either, so it does not campaign. that is why the guide pulls on the leader last and moves the leadership away with
talosctl etcd forfeit-leadershipbefore that pull.options i looked at and left out
maxParallelImagePullsin the Talos machine config spreads the pulls out, but on the first cluster one pull on the leader node was already enough for an election, and the cap slows every pull on the node. it needs its own testing.ETCDvolume removes the shared disk, but Talos accepts it from v1.14 and only when the node is created (v1.14.0 release notes, Dedicated System Volumes). Cozystack v1.6 ships Talos v1.13.6.what i checked
v1.6.40tag, another registry, an older tag) gives the 26 expected refs with macOS, busybox and GNU grep and sed. without the(@|$)anchor or without theinitContainerspart it gives 27 and 25.ghcr.io/cozystack/cozystack/*:v1.6.5tags from our list resolve to the digests pinned in v1.6.5 (sha256 ofskopeo inspect --raw).etcd status,image pull --namespace criandlogs etcdare the talosctl commands we ran on the second cluster, Talos v1.13.6, and they exist in v1.14.4 too.forfeit-leadershipmoves the leadership to another member and does nothing on a follower (etcd.go). we did not run it together with a pull.ghcr.io/gohugoio/hugo:v0.164.0),npm ci,hack/download_openapi.sh, then the production build and the preview build withnext/. both pass with the same warnings asmain, and only the two upgrade pages differ from amainbuild.bash hack/check-i18n.sh checkpasses with 32 keys and 16 translated pages,hack/i18n/test_i18n.pyruns 129 tests OK, this page has no translations.git diff --checkis clean.refs cozystack/cozystack#4962. it does not close the issue, option 2 is still open there.