Skip to content

tmt: Add test switching to a zstd:chunked image - #7

Closed
cgwalters-bot wants to merge 1 commit into
mainfrom
bot/test-zstd-chunked
Closed

cgwalters-bot wants to merge 1 commit into
mainfrom
bot/test-zstd-chunked

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

The composefs backend used to fail to pull zstd:chunked images ("unexpected
EOF reading tar entry", bootc-dev#2408): a zstd:chunked layer is a multi-frame zstd
stream, with skippable frames for the table of contents, and the decoder
stopped after the first frame. composefs-rs fixed that and main already pins
a fixed version, but none of our tests would catch a regression, since they
all pull from containers-storage, which hands out uncompressed layers.

This adds a tmt test (number 50) that builds a derived image, pushes it with
podman push --compression-format zstd:chunked to an OCI directory
(avoiding the need for a registry; composefs-rs reads OCI directories
directly rather than via skopeo, but the layers go through the same
decompressor as a registry pull), and bootc switches to it, then checks
the new data after reboot. Layers already in the repository (all the base
image ones) are skipped on pull, so the single new layer has to be
multi-frame on its own for this to test anything: it gets 64 small random
files, which zstd:chunked compresses into separate frames, plus checksums to
catch silent truncation. The test also asserts that every layer in the
pushed manifest is zstd with the zstd:chunked annotation, so it can't
silently degrade into testing plain zstd or gzip. It runs on both backends,
since it's cheap coverage for ostree too.

Testing, on a 16-core RHEL 10 devspace, rebased on current main (centos-bootc
stream10 base): just test-tmt switch-zstd-chunked passed on the composefs
backend (systemd-boot, BLS, ext4, unsealed) and on ostree, including the
post-reboot checksum and bootc internals fsck checks; cargo xtask update-generated direct --check and just validate pass. In an earlier
run, reverting the composefs-rs fix (zstd multiple_members(true)) made
this test fail with the original "unexpected EOF reading tar entry", so it
does catch the bug.

It also drops the note in experimental-composefs.md saying zstd:chunked
pulls fail, since the composefs-rs bump in 3024fa2 fixed that.

Closes: bootc-dev#2408

Generated-by: https://github.com/cgwalters/#llms


Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lAHOAQ_SPs4Bj2Gizg8P4Kg

To review:

  • Approve to open it upstream, ready for review.
  • Comment /draft, then approve, to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are addressed with fixup commits and a reply here.

The composefs backend used to fail to pull zstd:chunked images,
because a zstd:chunked layer is a multi-frame zstd stream (with
skippable frames for the table of contents) and the decoder stopped
after the first frame. That was fixed in composefs-rs, but nothing
here would have caught it or would catch a regression, since all our
tests pull from containers-storage, which hands out uncompressed
layers.

Push a derived image with `--compression-format zstd:chunked` to an
OCI directory and switch to it, which avoids needing a registry.
composefs-rs reads OCI directories directly rather than via skopeo,
but the layers go through the same decompressor as a registry pull.
Layers already in the repository (i.e. all the base image ones) are
skipped, so the one new layer must itself be multi-frame for this to
test anything; it gets a bunch of small files, which zstd:chunked
compresses into separate frames, and checksums to catch silent
truncation. The test also checks the pushed manifest, so that it
can't silently degrade into testing plain zstd or gzip. It runs for
both backends, since it's cheap coverage for ostree too.

Also drop the known-issue note about zstd:chunked pulls failing from the
composefs docs, since the composefs-rs bump in 3024fa2 fixed that.

Closes: bootc-dev#2408
Generated-by: AI
Signed-off-by: Colin Walters <[email protected]>
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Signed off 1 commit(s) with Signed-off-by: Colin Walters <[email protected]> for bootc-dev/bootc's DCO check, on cgwalters's approval #7 (review) of da0522cc680e. Same trees; the head is now 5dda177e32de.

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Opened upstream as bootc-dev#2503. Closing this review draft.

cgwalters-bot pushed a commit that referenced this pull request Nov 17, 2026
The section added in bootc-dev#2436 says sysext and confext are not supported
and not recommended on bootc hosts. That overstates it: the bootc
project wants to work together with sysext, and whether it works well
today is mostly down to the distribution (its systemd version, SELinux
labeling and the like), not bootc itself. Say that instead, and point
at #7, where a more integrated approach is being discussed.

The transient overlay and OS-specific sections stay, as things to be
aware of. The /etc note now names the real setup-root-conf.toml option
and says when /etc actually leaves room for confext: the old wording
suggested etc = none avoids the limit, but under transient root /etc
is still inside that overlay.

Generated-by: AI
Signed-off-by: Joseph Marrero Corchado <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

composefs backend: zstd:chunked images fail to pull with "unexpected EOF reading tar entry"

2 participants