-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add qemu emulated arm64 node image build #8806
Conversation
Qemu emulated arm64 node image build was remove in [1] in favor of the native builds. However, our release process isn't update to date with native runners. This changeset adds qemu back to arm64 node image build and updates qemu static binary copy and clean up for ppc64le and s390x. [1] https://github.com/projectcalico/calico/pull/8558/files#diff-c6e82bd404a904c10b9a0756d78d913a8a5e2ff833fefd384c80af1d7c93c3bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hjiawei you need to add the follwoing
if [[ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]]; then \
sed -i "s/runit-init/\/tmp\/admin\/runit-2.1.2\/compile\/runit-init/" src/runit-init.dist && \
sed -i "s/runsv/\/tmp\/admin\/runit-2.1.2\/compile\/runsv/" src/runsv.dist && \
sed -i "s/runsvchdir/\/tmp\/admin\/runit-2.1.2\/compile\/runsvchdir/" src/runsvchdir.dist && \
sed -i "s/runsvdir/\/tmp\/admin\/runit-2.1.2\/compile\/runsvdir/" src/runsvdir.dist && \
sed -i "s/svlogd/\/tmp\/admin\/runit-2.1.2\/compile\/svlogd/" src/svlogd.dist && \
sed -i "s/utmpset/\/tmp\/admin\/runit-2.1.2\/compile\/utmpset/" src/utmpset.dist && \
fi && \
package/install
to https://github.com/projectcalico/calico/blob/8dec244a9ddfa91944cface00f01a45ea8f09beb/node/Dockerfile.arm64#L87C1-L87C43
This change prevents the run-it check from failing which happens since binfmt absolute path differs from a native build.
BUILDPLATFORM + TARGETPLATFORM -> https://docs.docker.com/build/building/multi-platform/#cross-compilation
`package/check` (part of `package/install`) fails on qemu emulated arm64 build without the hacks we made in [1]. However, this hack will break native arm64 build [2]. This change workaround this issue by calling `pacpackage/compile` as the runit binaries are important to us and copied in the next stage. [1] https://github.com/projectcalico/node/pull/1044/files#diff-02ae637382f3cca949bd439c8b796acdb08abfbbe4b712eafae1bb80dd08f866R99 [2] #8285
@frozenprocess Thanks for pointing that out and I also noticed this when retesting the emulated arm64 build. I have made and alternative change in 407509a. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hjiawei thanks for the quick change! it should fix the runit problem in a clean way.
Description
Qemu emulated arm64 node image build was remove in [1] in favor of the native builds. However, our release process isn't update to date with native runners. This changeset adds qemu back to arm64 node image build and updates qemu static binary copy and clean up for ppc64le and s390x.
[1] https://github.com/projectcalico/calico/pull/8558/files#diff-c6e82bd404a904c10b9a0756d78d913a8a5e2ff833fefd384c80af1d7c93c3bb
Related issues/PRs
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.