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

add multiarch support for kubevirt tasks #698

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

Conversation

Basavaraju-G
Copy link

@Basavaraju-G Basavaraju-G commented Mar 19, 2025

What this PR does / why we need it:
As of now Tekton kubevirt tasks supported only on x86/amd64. so this PR will add support for s390x, arm64 cpu platforms.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot requested a review from 0xFelix March 19, 2025 08:40
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ksimon1 for approval. For more information see the 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

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Mar 19, 2025
@kubevirt-bot kubevirt-bot requested a review from lyarwood March 19, 2025 08:40
@kubevirt-bot kubevirt-bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Mar 19, 2025
@openshift-ci openshift-ci bot requested a review from ksimon1 March 19, 2025 08:40
Copy link

openshift-ci bot commented Mar 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Basavaraju-G
Once this PR has been reviewed and has the lgtm label, please assign ksimon1 for approval. For more information see the 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

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 19, 2025
Copy link

openshift-ci bot commented Mar 19, 2025

Hi @Basavaraju-G. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 19, 2025
@Basavaraju-G
Copy link
Author

Hi @ksimon1 would you please review this PR?

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

Your commit looks to be mangled (author, message). Can you please correct that?

@@ -7,7 +7,7 @@ metadata:
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "KubeVirt disk virt customize"
tekton.dev/platforms: "linux/amd64"
tekton.dev/platforms: "linux/amd64,linux/arm64"
Copy link
Member

Choose a reason for hiding this comment

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

We need quay.io/kubevirt/libguestfs-tools for s390x to add it here, correct?

Copy link
Author

@Basavaraju-G Basavaraju-G Mar 19, 2025

Choose a reason for hiding this comment

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

Hi @0xFelix currently we dont have s390x image of quay.io/kubevirt/libguestfs-tools , and we are working on it to have s390x multiarch image. once the "quay.io/kubevirt/libguestfs-tools" have multi arch s390x image, i will add it in separate PR. is this okay?

Copy link
Member

Choose a reason for hiding this comment

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

Sure!

@@ -12,11 +12,19 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
source "${SCRIPT_DIR}/release-var.sh"
source "${SCRIPT_DIR}/common.sh"

# add qemu-user-static
sudo podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes
Copy link
Member

Choose a reason for hiding this comment

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

What does that do? Also, we should try to not use images on Docker hub.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @0xFelix Here we are trying to use qemu-user-emulation to build multiarch images on x86 native platform. i was taken this from here https://github.com/kubevirt/kubevirt/blob/add278ad94ca13c112b8da83f41160f7371501b5/hack/builder/build.sh#L19 to cross building on x86 platform.

Copy link
Member

Choose a reason for hiding this comment

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

Is the qemu-user-static image available on quay?

Copy link
Member

Choose a reason for hiding this comment

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

I don't see where this is registered as a runner for foreign binaries though? Does it happen in the container? Also, why not make it conditional like in the file you've linked?

Copy link
Author

Choose a reason for hiding this comment

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

Is the qemu-user-static image available on quay?

No its not there in quay.

Copy link
Author

Choose a reason for hiding this comment

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

I don't see where this is registered as a runner for foreign binaries though? Does it happen in the container? Also, why not make it conditional like in the file you've linked?

No, it wont happen in container. sure i will make a check before running it.

Copy link
Author

Choose a reason for hiding this comment

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

I don't see where this is registered as a runner for foreign binaries though? Does it happen in the container? Also, why not make it conditional like in the file you've linked?

Hi @0xFelix added condition to install if not enabled.

@Basavaraju-G
Copy link
Author

Your commit looks to be mangled (author, message). Can you please correct that?

fixed

@ksimon1
Copy link
Member

ksimon1 commented Mar 20, 2025

@Basavaraju-G are you planning to add test runners for e2e tests on s390x?

@Basavaraju-G
Copy link
Author

Basavaraju-G commented Mar 20, 2025

@Basavaraju-G are you planning to add test runners for e2e tests on s390x?

@ksimon1 yes we have it in planning. we have some kubevirt projects in https://prow.ci.kubevirt.io/ are running s390x e2e jobs in here https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/logs/publish-kubevirtci-s390x/1902662300989394944.

@ksimon1
Copy link
Member

ksimon1 commented Mar 21, 2025

@Basavaraju-G I tried to trigger it locally and it is failing on:

[linux/s390x] [2/2] STEP 3/10: RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all
container exited on segmentation fault
Error: 2 errors occurred:
	* [linux/arm64]: building at STEP "RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all": while running runtime: exit status 1
	* [linux/s390x]: building at STEP "RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all": while running runtime: exit status 1

@Basavaraju-G
Copy link
Author

Basavaraju-G commented Mar 24, 2025

@Basavaraju-G I tried to trigger it locally and it is failing on:

[linux/s390x] [2/2] STEP 3/10: RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all
container exited on segmentation fault
Error: 2 errors occurred:
	* [linux/arm64]: building at STEP "RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all": while running runtime: exit status 1
	* [linux/s390x]: building at STEP "RUN dnf install -y xorriso openssh-clients nbdkit nbdkit-curl-plugin qemu-img && dnf clean all": while running runtime: exit status 1

HI @ksimon1 may i know what version of podman your using it? and may i know which OS are you building on it(RHEL/Ubuntu)? i was able to build with github actions job. build log here https://github.com/Basavaraju-G/kubevirt-tekton-tasks/actions/runs/13896150271/job/38877127084.
Screenshot 2025-03-24 at 8 33 46 AM

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

To me it looks okay from what I can tell

/ok-to-test

@@ -7,7 +7,7 @@ metadata:
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "KubeVirt disk virt customize"
tekton.dev/platforms: "linux/amd64"
tekton.dev/platforms: "linux/amd64,linux/arm64"
Copy link
Member

Choose a reason for hiding this comment

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

Sure!

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 25, 2025
@Basavaraju-G
Copy link
Author

/retest

@@ -7,7 +7,7 @@ metadata:
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "KubeVirt cleanup VM"
tekton.dev/platforms: "linux/amd64"
tekton.dev/platforms: "linux/amd64,linux/s390x,linux/arm64"
Copy link
Member

Choose a reason for hiding this comment

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

these changes has to go to manifests in templates folder and then run make generate-yaml-tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants