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 multi-arch builds again #546

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

StopMotionCuber
Copy link
Contributor

This is the same as for #367 and should fix #366. For some reason that commit got reverted and I'm not sure why.

closes pulp#366

As pulp#367 got reverted, I wanted to submit this again in order to get multi-arch builds to work
@stale
Copy link

stale bot commented Oct 13, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Oct 13, 2023
@StopMotionCuber
Copy link
Contributor Author

bump

@stale
Copy link

stale bot commented Oct 13, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label Oct 13, 2023
@mdellweg
Copy link
Member

#369 (comment)

it is breaking pulp-operator ci is the only reason I can find, but it's a serious one. Can someone verify if it still holds true?

Copy link

stale bot commented Nov 16, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Nov 16, 2023
@StopMotionCuber
Copy link
Contributor Author

Bumping this again, would still like to see mult-arch builds working on here.
It's frustrating to not see any activity here, especially with arm64 gaining more and more mainstream attention and the whole software stack being capable of execution with arm64

Copy link

stale bot commented Nov 17, 2023

This pull request is no longer marked for closure.

@stale stale bot removed the stale label Nov 17, 2023
@mikedep333
Copy link
Member

@StopMotionCuber Sorry for the delay. I was out the month of September and this fell through the cracks.

Merging now!

@mikedep333 mikedep333 merged commit 79234b0 into pulp:latest Nov 17, 2023
5 checks passed
@himdel
Copy link

himdel commented Nov 20, 2023

Building oci-env fails after this change... (on amd64)

Status: Downloaded newer image for ghcr.io/pulp/pulp-ci-centos:latest
 ---> 9fdc7e498755
Step 3/15 : ENV S6_KEEP_ENV=1
 ---> [Warning] The requested image's platform (linux/ppc64le) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in 100673aa7dcd
Removing intermediate container 100673aa7dcd
 ---> 77987c9ffd49
Step 4/15 : ENV XDG_CONFIG_HOME=/opt/settings
 ---> [Warning] The requested image's platform (linux/ppc64le) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in 7c8caa12cf3a
Removing intermediate container 7c8caa12cf3a
 ---> d822d82947b5
Step 5/15 : COPY dev_requirements.txt /dev_requirements.txt
 ---> 6559fa3e398a
Step 6/15 : COPY switch_python /usr/bin/switch_python
 ---> f0558bbd1071
Step 7/15 : ARG PYTHON_VERSION=3.8
 ---> [Warning] The requested image's platform (linux/ppc64le) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in 0b193a720720
Removing intermediate container 0b193a720720
 ---> 3d49444ee46a
Step 8/15 : RUN switch_python "$PYTHON_VERSION"
 ---> [Warning] The requested image's platform (linux/ppc64le) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in 8e9ae5f2f9c8
exec /bin/sh: exec format error
The command '/bin/sh -c switch_python "$PYTHON_VERSION"' returned a non-zero code: 1
ERROR: Service '_base' failed to build : Build failed
TIME 0:47.71

(also, https://github.com/ansible/ansible-hub-ui/actions/runs/6924023217/job/18832694190?pr=4531#step:9:223)

(This looks quite close to the errors seen in pulp/oci_env#124, referencing #369 ... might be why this was previously reverted? Should we do so again?)

@StopMotionCuber
Copy link
Contributor Author

I'd favor not directly closing it, but rather solving the root cause of that issue

@StopMotionCuber
Copy link
Contributor Author

I'm currently emulating the building steps manually on my workstation (takes quite a while with qemu and the way this repo is setup). I guess something goes wrong with pushing the containers.

@himdel
Copy link

himdel commented Nov 20, 2023

I was looking for some sort of override that would be forcing oci-env to build a non-default arch, but I think what's happening is, the multi-archness of the image is infectious and causes any images built from it to also try building for all the archs, as opposed to just the current one.

After pruning everything, setting export DOCKER_DEFAULT_PLATFORM=linux/amd64, the build doesn't fail.
(I have yet to find a workaround that doesn't require users to know their platform, and not sure how that interacts with docker machine on macosx yet.)

@StopMotionCuber
Copy link
Contributor Author

@himdel I'm not completely sure about your investigation.

What I've discovered so far was that no multi-arch manifest is pushed to the registry and I'm not sure which architecture is pushed to the registry or whether that is random (which might lead to some weird effects). Unfortunately with podman the multi-arch build is harder than what is there with docker buildx.

Anyway, a followup is ready in #562, which does the manifest stuff properly

decko added a commit to decko/pulp-oci-images that referenced this pull request Nov 22, 2023
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.

Build multiplatform images
4 participants