Repository navigation
Description
This took awhile to track down. I'm going to continue investigating but I wanted to document what I've found so far.
The failure happens when attempting a bootc install to-disk using an image built from a base image with at least one extra layer, e.g.
FROM quay.io/centos-bootc/centos-bootc-dev:stream9
RUN dnf install -y tmux
If the image is built locally bootc install to-disk works correctly. The failure happens when pushing the image to a repo (only tested with quay.io), clearing out the image from local storage via podman system prune --all, then running bootc install to-disk. Here's example output of the failure:
[test@fedora-39 ~]$ sudo podman run --pid=host --network=host --privileged --security-opt label=type:unconfined_t -v /var/lib/containers:/var/lib/containers -v .:/output -v /dev:/dev -e RUST_LOG=debug quay.io/ckyrouac/bootc-lldb bootc install to-disk --via-loopback --generic-image --skip-fetch-check /output/test.raw
Trying to pull quay.io/ckyrouac/bootc-lldb:latest...
Getting image source signatures
...
ERROR Installing to disk: Creating ostree deployment: Performing deployment: Importing: Parsing layer blob sha256:5d35bfe747b2c76a01310e69a14daa90baf352a11f990f73d4ce3e1917668719: Failed to invoke skopeo proxy method FinishPipe: remote error: corrupted blob, expecting sha256:dede69b8181937a545b87707fbe4ace2ee9936459ffd43b7ba957324861992a0
So, the OpenImage call to the skopeo proxy is failing.
The latest version of containers-common found in Fedora39/40 repos sets pull_options.enable_partial_images=true in /usr/share/containers/storage.conf. This is the change that started causing this error. Toggling enable_partial_images to false resolves the error. I'm not familiar enough with this stack to know the root cause of this yet. I'll continue digging but I'm sure someone else would be able to track this down a lot quicker if you think it's urgent.
Activity
cgwalters commentedon May 3, 2024
Ugh. Fun...thanks for finding and debugging this.
cgwalters commentedon May 3, 2024
It's actually really embarrassing that this wasn't caught by our CI, needs fixing
cgwalters commentedon May 3, 2024
Actually wait this is the
-devimage which is intentionally tracking git main, I don't think this has hit f40 or stream9 proper yet. I see a lot of activity in https://src.fedoraproject.org/rpms/containers-common/commits/rawhide and what I bet is happening here is those spec files are being pulled into the copr.cc @rhatdan @lsm5
cgwalters commentedon May 3, 2024
And yes, we need to add bootc test gating to containers-common and skopeo pretty soon.
ckyrouac commentedon May 3, 2024
hmm interesting, earlier in the week this was happening regardless of which base image I used. Just went to verify that and now this bug only happens with the
-devbase image.lsm5 commentedon May 3, 2024
The last build of containers-common on the podman-next copr was an automatic rebuild of the rawhide sources from sometime back. I disabled this automatic rebuild after we got rawhide to a sane-enough state.
Let me know if you need an update to the fedora or copr rpm. I can do a one-off build.
We're currently working on a packit workflow from upstream c/common to downstream containers-common rpm, like we have for podman and the rest, with automatic builds going to podman-next right after every upstream commit to main. I'm hoping that change will land early next week.
ckyrouac commentedon May 6, 2024
so this works now using any base image. I'm not sure what changed. I guess something in the base images or in quay.io?
cgwalters commentedon May 15, 2024
@vrothberg
henrywang commentedon Jun 9, 2024
Hi @cgwalters. We encountered this issue in QE CI environment many times in two days.
All
bootc install to-existing-roottests failed due to this error. https://artifacts.osci.redhat.com/testing-farm/10a21cd4-b029-48fa-9c23-9848288a7065/This issue can be found in
fedora-bootc:40image testing. But can't be found in CS9 and RHEL 9.4/9.5 bootc image testing.cgwalters commentedon Jun 9, 2024
Ugh man, I think this is fallout from https://bodhi.fedoraproject.org/updates/FEDORA-2024-ab42dd0ffb which rolls in containers/storage@23ff5f8 which somehow breaks things...EDIT: No, I was wrong,
enable_partial_pulls = truealso in containers-common-0.58.0-2.fc40.And yes, the fact that there is no gating CI in any of
That covers the ostree-container path let this all sail right through.
henrywang commentedon Jun 9, 2024
OH!!!. Since yesterday (Saturday), I can't run container inside
quay.io/fedora/fedora:40. And reportsError: configure storage: 'overlay' is not supported over overlayfs, a mount_program is required: backing file system is unsupported for this graph drivererror. I have to usefedora:39image.cgwalters commentedon Jun 9, 2024
Hmm, at this very moment
quay.io/fedora/fedora-bootc:40withversion=40.20240606.0hascontainers-common-0.58.0-2.fc40.noarchwhich predates that change (as the date stamp implies).So...hum, this must somehow relate to the host environment version. Ah yes, if we look at the logs from that test run I can see that inside the fedora cloud AMI we have 'Installed: containers-common-5:0.59.1-1.fc40.noarch'`.
@henrywang can you try patching the tests to do something like this as a sanity test:EDIT: See above, I'm no longer confident the relevant change here was in containers-common.
cgwalters commentedon Jun 9, 2024
I'm trying to reproduce this locally initially by hacking up my podman-machine environment, but no luck yet.
Another thing that actually changed pretty recently too is there's a new podman: https://bodhi.fedoraproject.org/updates/FEDORA-2024-ab42dd0ffb
And we're also now getting that in the host environment. Can you play with downgrading that in the host environment too?
henrywang commentedon Jun 9, 2024
Sure. I'll run that tomorrow.
2 remaining items
hanulec commentedon Jun 14, 2024
i think this is two fold issue -- but the end user impact is only see if you have a btrfs containers-storage. in my testing with a digitalocean f39 system which uses btrfs.
the default image from quay.io/fedora/fedora-bootc:41 doesn't see this problem performing a 'bootc install' (but the base image is missing cloud-init).
a system that is using btrfs appears impacted / not able to bootc install when using personally build bootc images. This issue doesn't occur on a f40/rawhide system using xfs for containers-storage (podman graphDriverName: overlay)
furthermore, the simple act of pulling a personally built bootc images on a f39 (or f40 or rawhide) to a system that uses btrfs as the containers-storage will cause the machine to wedge/freeze up when you have small resources 1c/1g. adding swap to the system prevented the freezing, but didn't produce a more reliable / predictable 'podman pull' behavior. if you run the podman pull in a loop 10 times it keeps on attempting to re-sync data.
making the suggested change to /usr/share/containers/storage.conf of enable_partial_images = "false" allowed for both a predictable 'podman pull' and a bootc install to-existing-root to succeed when graphDriverName: btrfs
once bootc is running the underlying containers-storage reverts to overlay.
cgwalters commentedon Jun 16, 2024
@hanulec Is your input image in
zstd:chunkedformat? Trypodman inspectand look at the layers (you'll seezstdinstead ofgzip).hanulec commentedon Jun 17, 2024
the image i built had the newest items from my containerfile be added in zstd format. i needed to use skopeo inspect to see this. the image was built on a default config from a fresh rawhide image (version: 41.20240530.0)
root@bootc:
/240617-bootc# skopeo inspect docker://quay.io/fedora/fedora-bootc:41 |grep MIMEType|sort |uniq -c/240617-bootc# skopeo inspect docker:///f40jump05:240615-0058 | grep MIMEType|sort |uniq -c65 "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip",
root@bootc:
65 "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip",
4 "MIMEType": "application/vnd.oci.image.layer.v1.tar+zstd",
root@bootc:~/240617-bootc#
hanulec commentedon Jun 17, 2024
and the more i look / re-test -- its the podman push action that is changing the MIMEType from "application/vnd.oci.image.layer.v1.tar" to either "+gzip" or "+zstd"
[-]Install to-disk fails with latest containers-common[/-][+]zstd:chunked issues[/+]shi2wei3 commentedon Sep 10, 2024
@cgwalters centos-bootc c10s
bootc installtest start to failed from the past week, error output is the same like this issue, only derived image is affected, could be related to the host containers-common get updated0.57.3-4.el10 -> 0.60.2-3.el10, containers/common#2048, how could I workaround this issue and is this a bug we need to fix?cgwalters commentedon Sep 12, 2024
I only recently realized on this issue why this may be happening. When I was testing ostreedev/ostree-rs-ext#622 I did it via a registry.
But this bug is about "bootc install" where we're pulling from containers-storage: (unpacked representation) and as part of that we ask it to regenerate a tarball from the unpacked files, and by design today that tarball must be bit-for-bit compatible with the descriptor. It would not surprise me at all if there were corner cases where that breaks today. Inherently this "copy from c/storage" model is going through a different codepath than what is used by podman for skopeo today where it drives the copying.
The whole "synthesize a temporary tarball" is really lame of course, what we want instead is podman-container-tools/container-libs#144
shi2wei3 commentedon Sep 23, 2024
I probably hit podman-container-tools/podman#22813 and I've modified the runtime container.conf as a workaround.
cgwalters commentedon Oct 16, 2024
Based on some recent discussion it sounds like this one should gain some more priority. I think a think we need to do here is add an integration test that covers a zstd:chunked image (and for good measure we should probably also include LBIs built with zstd:chunked).
shi2wei3 commentedon Oct 17, 2024
I'll add LBIs testing with zstd:chunked soon, meanwhile, we need to fix the error described in this issue, because the test will fail when I revert gzip to the default zstd:chunked on c10s https://artifacts.osci.redhat.com/testing-farm/8d024c92-874a-4228-bf35-be69080b6fde/
cgwalters commentedon Oct 17, 2024
Right for
There's a few very recent fixes for zstd:chunked issues in c/storage and c/image, one that I think might be related is containers/storage#2130
rpm/update-config-files: Don't set zstd:chunked default anywhere
cgwalters commentedon Oct 22, 2024
containers/common#2213 will back out the zstd:chunked default for rhel10, and it was just backed out in all fedora versions.
That said, we still want to do background work to test with it, both:
Merge pull request bootc-dev#509 from coreos/dependabot/cargo/serde-1…
cgwalters commentedon Feb 7, 2025
xref also coreos/rpm-ostree#5198