Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable multiarch container builds #1471

Closed

Conversation

inknos
Copy link
Contributor

@inknos inknos commented Mar 11, 2024

No description provided.

Copy link
Member

@praiskup praiskup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inknos
Copy link
Contributor Author

inknos commented Mar 11, 2024

@praiskup one thing that I am not sure about is if the tags for containers are the same archs references that fedora uses. like, is it aarch64 or arm64? 🤔

@praiskup
Copy link
Member

Mock uses just podman pull <image_id>, and Podman by default selects the appropriate architecture, if exists in the registry. See this PR for more info. I think we should be fine.

@inknos
Copy link
Contributor Author

inknos commented Mar 11, 2024

Mock uses just podman pull <image_id>, and Podman by default selects the appropriate architecture, if exists in the registry. See this PR for more info. I think we should be fine.

not sure, I'll reopen the PR against an upstream branch to test the action.
I think the arch should actually be selected by buildah-build and I am not sure about the aliases

       --arch="ARCH"

       Set  the  ARCH  of the image to be built, and that of the base image to be pulled, if the build uses one, to the provided value instead of
       using the architecture of the host. (Examples: arm, arm64, 386, amd64, ppc64le, s390x)

@praiskup
Copy link
Member

Yeah, actually, I don't know how the "build time" architecture selection is implemented. I rather meant that we (Mock) - at runtime - can use those images just fine (multiarch metadata/manifests). Hm.

@inknos inknos force-pushed the enable-quay-io-multiarch branch from b46c826 to b99f309 Compare March 11, 2024 17:10
@inknos
Copy link
Contributor Author

inknos commented Mar 11, 2024

now it should be good to go.

I tested it on aarch64 images on quay.io and it works. Some images will fail if the nightlies are not ready but all the fedora-dnf5 images should be fine

- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installation is emulated though, at least it seems (with the emulated runtime for rpm, but also installation scriptlets, etc.). This could make quite some difference compared to the official Fedora images..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, this is how it is documented in the buildah docs, see here and most importantly the multi-platform example

The reasons are that first, I believe github does not offer multi arch hosts (need to verify that).
Secondly, this should emulate the architecture of the host only, then the invoked command should be.

Here, the action was run on the test branch.

From what I see in Build Image:29 the command invoked seems right and it specifies the right platform --platform linux/amd64. I tried on my laptop (it's arm) and works.

What difference should it do if we use emulated runtimes? I am not sure if we have other options in GH.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What difference should it do if we use emulated runtimes?

I don't have anything specific in mind. It's just a bad feeling :-) because it's quite common for Mock builds with forcearch to fail for various reasons.

For example, the entire DNF in the build container is emulated (including RPM) for additional package installation. DNF/RPM interacts with the underlying databases, and these databases are supposed to be utilized by native executors later on.

I don't know; I wouldn't love it if my overexcitement caused issues with our production Copr builders :-) nb, we should have a "natively built" DNF5-based default Fedora 41 image soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know; I wouldn't love it if my overexcitement caused issues with our production Copr builders :-) nb, we should have a "natively built" DNF5-based default Fedora 41 image soon.

Agree, I'll dig some more I guess

@inknos inknos force-pushed the enable-quay-io-multiarch branch from b07d592 to d9017a9 Compare March 12, 2024 15:44
@inknos inknos closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants