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

hack: define proper 'GOARCH' when building ARM64 images #2592

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

synarete
Copy link
Contributor

@synarete synarete commented May 1, 2024

Use local host CPU architecture and pass it as GOARCH to image-build command. Needed when building images on non x86_64 images (e.g., AWS/Graviton ARM64, [RHSTOR-2044]).

Use local host CPU architecture and pass it as GOARCH to image-build
command. Needed when building images on non x86_64 images (e.g.,
AWS/Graviton ARM64, [RHSTOR-2044]).

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Copy link
Contributor

openshift-ci bot commented May 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: synarete
Once this PR has been reviewed and has the lgtm label, please assign nb-ohad for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented May 1, 2024

@synarete: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocs-operator-bundle-e2e-aws ef29443 link true /test ocs-operator-bundle-e2e-aws

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@iamniting iamniting left a comment

Choose a reason for hiding this comment

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

As far as I remember we did this intentionally to build the images for multiple archs from a single place.

@malayparida2000 can correct me if I am wrong here.

@malayparida2000
Copy link
Contributor

Yes, this was done intentionally as ther's no assurity that the target arch is always the host arch. Whatever is the target arch can be defined by setting the GOARCH value accordingly.

@synarete
Copy link
Contributor Author

synarete commented May 2, 2024

As far as I remember we did this intentionally to build the images for multiple archs from a single place.

@malayparida2000 can correct me if I am wrong here.

Assuming I have ARM64 (AWS/Graviton) vm at hand, how should one build the ocs-operator image from source for this host arch ?

@synarete
Copy link
Contributor Author

synarete commented May 2, 2024

Yes, this was done intentionally as ther's no assurity that the target arch is always the host arch. Whatever is the target arch can be defined by setting the GOARCH value accordingly.

@malayparida2000 How should one build ocs-operator image for arm64 from source? That is, what is the proper command line? (I have both arm64 and x86_64 vms).

@malayparida2000
Copy link
Contributor

Yes, this was done intentionally as ther's no assurity that the target arch is always the host arch. Whatever is the target arch can be defined by setting the GOARCH value accordingly.

@malayparida2000 How should one build ocs-operator image for arm64 from source? That is, what is the proper command line? (I have both arm64 and x86_64 vms).

If you want to build for arm64, You can just export GOHOSTOS=arm64 and then call the hackfile/make target

@synarete
Copy link
Contributor Author

synarete commented May 2, 2024

OK, I now get it. in that case, we may ignore this PR (I will convert it to draft).

@synarete synarete marked this pull request as draft May 2, 2024 15:10
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants