osbuild / osbuild

Build-Pipelines for Operating System Artifacts
https://www.osbuild.org
Apache License 2.0
212 stars 113 forks source link

RHEL 8.2: image build test failure #354

Closed major closed 4 years ago

major commented 4 years ago

While working on osbuild/osbuild-composer#535, I ran into an error on RHEL 8.2 with image tests.

When the tests try to run on RHEL 8.2, the following shows up in stderr:

Machine and scope registration turned off, --slice= and --property= settings will have no effect.
Machine and scope registration turned off, --slice= and --property= settings will have no effect.
execv(/run/osbuild/lib/runners/org.osbuild.fedora31) failed: No such file or directory
dvdhrm commented 4 years ago

You only see this on RHEL8.2 but not on any other machine?

ondrejbudai commented 4 years ago

This is really weird, I tried to build an rpm from the current master and run the manifest[1] from fedora_31-x86_64-ext4_filesystem-boot test case. It builds the build pipeline and then it fails with the execv error, see the log[2]. Then, I tried to build the samples/base.json and it worked.

I tried to substitute the runner for ls to see what's inside that container and I got:

Directory /run/osbuild/osbuild-buildroot-mna97kdu doesn't look like it has an OS tree. Refusing.

The /run/osbuild/osbuild-buildroot didn't contain anything apart from /var. I investigated why the buildroot failed to mount /var and I found that the reader is just an empty directory.

So far I have tried only rhel8.2.

[1]: manifest [2]: log

ondrejbudai commented 4 years ago

I've just reproduce it with samples/base-qcow2.json.

ondrejbudai commented 4 years ago

We have the cause! When osbuild rpm is built on rhel, it does this thing:

mangling shebang in /usr/lib/osbuild/runners/org.osbuild.fedora30 from /usr/bin/python3 to #!/usr/libexec/platform-python

It's fine in the build pipeline because we use rhel buildroot for it and that has /usr/libexec/platform-python. However, in the second pipeline, it isn't fine because fedora doesn't have the platform-python binary.

larskarlitski commented 4 years ago

We have the cause!

Thanks! That made it much easier for me to find :) PR is attached.