CentOS / centos-bootc

Create and maintain base bootable container images from Fedora ELN and CentOS Stream packages
https://centos.github.io/centos-bootc
Other
44 stars 28 forks source link

issue again likely with hardlinks #375

Closed cgwalters closed 6 months ago

cgwalters commented 6 months ago

Deploying quay.io/flightctl/flightctl-agent-centos:bootstrap with bib fails like this:

ostree container image deploy --imgref=ostree-unverified-image:dir:/tmp/tmpl16zdc_g/image --stateroot=default --target-imgref=ostree-unverified-registry:quay.io/flightctl/flightctl-agent-centos:bootstrap --karg=rw --karg=console=tty0 --karg=console=ttyS0 --karg=root=LABEL=root --sysroot=/run/osbuild/tree
error: Performing deployment: Importing: Parsing layer blob sha256:9de5a4ff2cc05f1dc30ea793a9a10bca5935ea3f60965962ac68c5b655a68b32: : Processing tar via ostree: No such file or directory (os error 2)

At first, I thought this was another echo of https://github.com/coreos/rpm-ostree/issues/3827#issuecomment-1307942893 :arrow_right: https://github.com/ostreedev/ostree-rs-ext/pull/400/commits/883a79e4d32b1ca6673a1589a3337ee7ea7663ac

Digging into the relevant layer, it's the one corresponding to this run invocation:

RUN dnf install -y flightctl-agent && \
    systemctl enable flightctl-agent.service

Digging in a bit...the first thing I notice here is that building that with podman here works fine. And yes...it looks like that same issue, because in the remotely built image we have:

hrw-r--r-- 0/0               0 usr/lib/sysimage/rpm-ostree-base-db/rpmdb.sqlite link to sysroot/ostree/repo/objects/cd/3e1735c45d8013153d7808e4efb834b0478016266aaf5f740c1ff0e8262119.file
hrw-r--r-- 0/0               0 usr/lib/sysimage/rpm-ostree-base-db/rpmdb.sqlite-shm link to sysroot/ostree/repo/objects/bf/13d8fe63612425b89f526a906f06359a1a71ac71902caef8a7160558d91187.file

But I thought we'd fixed this one....ah yes, in https://github.com/ostreedev/ostree-rs-ext/commit/43e1648e97ef82f2cb86fd0813a5f338585eea97 and also in https://github.com/ostreedev/ostree-rs-ext/pull/558

cgwalters commented 6 months ago

This is claimed to be a recent regression (rotating tags would help prove/disprove).

cgwalters commented 6 months ago

What's really weird is that so far I can't reproduce this with bootc switch from a running host, or even directly doing an ostree container deploy. It somehow only reproduces in bib so far which is really weird because it should literally be doing the same thing.

oglok commented 6 months ago

I’m struggling to understand something. If I reference by digest a centos bootc image from a week ago, that worked at that time, why shouldn’t it work today? is there something during the build process that gets downloaded on the go and pulling the latest?

Let's say my Containerfile is now:

FROM quay.io/centos-bootc/centos-bootc:stream9-1709003520
ADD etc etc

RUN dnf install -y flightctl-agent && \
    systemctl enable flightctl-agent.service

That digest is from 3 days ago. Podman build works, but BIB disk creation doesn't with the same failure.

cgwalters commented 6 months ago

It's definitely possible that if you're using a new bib image that that is somehow involved in the failure.

Also

stream9-1709003520

Oh wow, I had no idea this existed, it must be something that the tekton release flow is doing automagically? Will comment over in https://github.com/CentOS/centos-bootc/issues/189

oglok commented 6 months ago

BIB latest image is from 7 days ago, and this was working 3 days ago...

cgwalters commented 6 months ago

After a bunch of debugging, https://github.com/ostreedev/ostree-rs-ext/pull/605 pointed out that the problem is that osbuild is not creating a /var/tmp in its bwrap stages.

cgwalters commented 6 months ago

Closing in favor of https://github.com/osbuild/bootc-image-builder/issues/223

cgwalters commented 6 months ago

@oglok for my own sanity...did you end up rebuilding that image with podman? I no longer reproduce the failure.

oglok commented 6 months ago

@oglok for my own sanity...did you end up rebuilding that image with podman? I no longer reproduce the failure.

Yes, it works now @cgwalters Thanks a lot!