Repository navigation
fix(al2023): prevent truncated /etc/eks/pause.tar in AMIs - #2858
Conversation
| ################################ | ||
|
|
||
| # prevent truncated archive of /etc/eks/pause.tar | ||
| PAUSE_ARCHIVE=/etc/eks/pause.tar |
There was a problem hiding this comment.
We'd have to port this over to AL2027 provisioners as well. It uses the same flow for pause image.
Nit: I don't really think we need the last check (% 512). The way I understand it, tar always writes in chunks of 512 bytes. So a cut between entries would also be a multiple of 512?
There was a problem hiding this comment.
Thanks for the reminder. Ported to AL2027 in 599cce0.
On % 512, a cut between entries is multiples of 512 but the tar data isn't written in 512-byte chunks (during test, I saw race truncations at 318,108 and 324,056 bytes). tar tf catches cuts inside an entry like those, but not a cut part-way through the trailing end marker: that passes tar tf but fails ctr images import. I only reproduced that last case with synthetic cuts.
|
/ci |
v20261023 is still a GitHub prerelease, and the node-image release gates skip prereleases. v20261019 (2026-10-21) is the newest full release: it prevents a truncated /etc/eks/pause.tar (awslabs/amazon-eks-ami#2858) on the same kernels as v20261012. The node-pools goldens follow on the alias line only.
* fix: cut the 2.2.1-rc.22 stack with engine v1.22.74, culvert v2.1.28 and dfe-hyperdx v0.3.17 dfe-stack cut clones rc.21 and moves current to rc.22. dfe-engine v1.22.74 rebuilds on the python:3.14-slim 35caba8 and uv d8e7328 base image digests (#985). culvert v2.1.28 moves to watchtower v1.23.2 (#103). dfe-hyperdx v0.3.17 moves to Node.js v24.22.1 (#173) and still carries upstream HyperDX 2.41.0. The cut also records dfe-docker at 86963503, its main. Every image and thin chart is digest-pinned, amd64 and arm64. * fix: pin rc.22's dfe-ui v1.7.33 and clear the held Renovate rows dfe-ui v1.7.33 rebuilds on the node base image digest 43b9ba1 (#606). The Redpanda operator moves to 26.2.5, built on Go 1.26.10 for the eMudhra CA rejection and defaulting to broker v26.2.6, the one DFE runs. Its NodePool image change does not reach DFE, whose Redpanda CR renders no NodePool. The Karpenter AL2023 alias moves to v20261023, which adds CAs to the AL2023 blocklist, with the node-pools goldens following. The forgejo setup Job's curl 8.23.0 moves to its 2026-10-20 re-push digest, and the aws and aws-state locks move to hashicorp/aws 6.70.0 and redpanda-data/redpanda 2.6.0 within their existing constraints. * fix: match the engine contract fixture to the v1.22.74 chart The published 1.22.74 chart's contract names the python:3.14-slim 35caba8 base image. * fix: hold rc.22's Karpenter AL2023 alias at v20261019 v20261023 is still a GitHub prerelease, and the node-image release gates skip prereleases. v20261019 (2026-10-21) is the newest full release: it prevents a truncated /etc/eks/pause.tar (awslabs/amazon-eks-ami#2858) on the same kernels as v20261012. The node-pools goldens follow on the alias line only.
Issue #, if available: Fixes #2855
Description of changes:
Root Cause:
cache-pause-containerexports the pause image withctr image export, which by default goes through containerd's Transfer API. In containerd 2.x the client writes the streamed archive from a goroutine thatTransfer()does not wait for (ImageExportStream.MarshalAnyincore/transfer/archive/exporter.go), soctrcan exit 0 before the file is fully written. This is what produced the truncated/etc/eks/pause.tarin nvidiav20261003: the file in that AMI is byte-for-byte the first 323,584 bytes of a healthy archive.This PR (AL2023):
ctr image export --local, which builds the archive in-process and returns only after the last write.validate.shthat fails the build if/etc/eks/pause.taris missing, unreadable, missing its last entry (oci-layout), or not a whole number of 512-byte blocks (for truncation inside end marker).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done
tar tfcheck)--local0/5,000. Output is byte-identical to the current archivevalidate.shcheck against truncatedpause.tar(every 512-byte boundary and every byte of the last 4 KiB) and real race truncations, all truncated archives that break the import are blocked by the check; all healthy archives pass the check.validate.shreported the archive valid; import/etc/eks/pause.tarsucceeds during bootSee this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.