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

Arm Support #260

Open
MarkSpencerTan opened this issue Jan 10, 2023 · 15 comments
Open

Arm Support #260

MarkSpencerTan opened this issue Jan 10, 2023 · 15 comments

Comments

@MarkSpencerTan
Copy link

Hello, is OVS-CNI usable for arm nodes? I noticed that it was crosscompiled to work for the arm environment, however, I'm getting an issue where the OVS CNI pods are crashing randomly only for my arm nodes.

The only error that's visible on the pod is as follows:

ovs-cni-marker qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Is there a way to get more verbose logging options to determine where it had a segfault?

Thanks so much!

@phoracek
Copy link
Member

Hello, could you try removing or overriding the GOARCH variable here https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/cmd/Dockerfile#L12, and then compiling? Perhaps that may help.

Is it crashing immediately on start or only after a while?

If I remember correctly, you should be able to change the log level in the manifest: https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/manifests/ovs-cni.yml.in#L63

@courtland
Copy link
Contributor

I ran into this as well. Changing GOARCH to arm64 in either the Makefile or cmd/Dockerfile, depending upon the build method, does indeed work. The resulting plugin operates correctly under arm64.

Is there any interest in releasing official arm64 binaries?

@courtland
Copy link
Contributor

I opened PR #266 to at least make the plumbing for building arm64 easier. For now I am able to use this for my needs, but it would be nice to have this extended to release official binaries for both architectures.

@courtland
Copy link
Contributor

#266 was merged, which at least makes it possible to build for arm64. Perhaps there is interest in releasing multiple official binaries?

@phoracek
Copy link
Member

I would not be against it. Currently I just manually tag, call make to build the binaries on my laptop and upload them. If you would provide make commands for cross compilation (or better a GitHub Action doing it for every posted tag), I would be happy to merge and maintain that.

@cyclinder
Copy link

Can we release arm64 assets in https://github.com/k8snetworkplumbingwg/ovs-cni/releases?

@cyclinder
Copy link

root@cyclinder3:~/cyclinder/ovs-cni# make GOARCH=arm64 build
/root/cyclinder/ovs-cni/build/_output/bin//go//bin//go fmt ./pkg/... ./cmd/...
/root/cyclinder/ovs-cni/build/_output/bin//go//bin//go vet ./pkg/... ./cmd/...
cd cmd/marker && /root/cyclinder/ovs-cni/build/_output/bin//go//bin//go fmt && /root/cyclinder/ovs-cni/build/_output/bin//go//bin//go vet && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on /root/cyclinder/ovs-cni/build/_output/bin//go//bin//go build -tags no_openssl -mod vendor

It seems GOARCH=arm64 doesn't works...

@ykulazhenkov
Copy link
Contributor

full ARM support was added in #307

multiarch image (amd64/arm64/ppc64le) is available in Github package registry https://github.com/k8snetworkplumbingwg/ovs-cni/pkgs/container/ovs-cni-plugin

@kfox1111
Copy link

kfox1111 commented Nov 23, 2024

Something is wrong. I pulled the image to an rpi, and its showing as:

# file ovs 
ovs: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=oNYYpA_PXVOUIymuqdXj/tvkfxnphLQ8hc88kh6Lg/v8an6yT6kQUzM_MPeT68/9D_V569EcTByq9tMT-zs, with debug_info, not stripped
# ./ovs 
-bash: ./ovs: cannot execute binary file: Exec format error

@ykulazhenkov
Copy link
Contributor

I tested the latest images and can confirm the issue.

v0.34.0 is ok


$ docker create --platform linux/arm64 ghcr.io/k8snetworkplumbingwg/ovs-cni-plugin:v0.34.0
$ docker cp 6c4eee5c8bf1a29759fe1c8dac91a18b5e27296bda1be06aafa6fdc8077e0277:/ovs .
$ file ovs
ovs: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=yfbLA94ZBe1nbqt2uMmY/sKcGXweTpDNeOSWpDxo7/jGoMNfKR8CBK4BlqozjH/3B1SVQ6mkxulXU8G-23W, with debug_info, not stripped

but v0.34.1 is not

$ docker create --platform linux/arm64 ghcr.io/k8snetworkplumbingwg/ovs-cni-plugin:v0.34.1
$ docker cp 6823821fc26a859a04f0abe8678f2695a347ecb013061c3b9f3d7bd03b362766:/ovs .
$ file ovs
ovs: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=N7R0T7dqpFKJdIs-1QlG/MX4aFH7E9rq88KEqo0I2/cJWMDP32MkuiMagGoA5o/Sm9w_e_OQwOiXbwx8NRI, with debug_info, not stripped

I think this PR #319 broke the multiarch build.

@oshoval Can you check?

@ykulazhenkov
Copy link
Contributor

@kfox1111, thanks for the report! As a short term workaround I propose to use v0.34.0 if it fits your needs

@oshoval
Copy link
Member

oshoval commented Nov 24, 2024

Hi, we didn't officially supported yet multi arch as far as i can tell (i do understand it is a regression)
atm i need to finish first other things, and then will be able to come back to it

cc @ashokpariya0
maybe it is part of your plan please ?

@oshoval
Copy link
Member

oshoval commented Nov 24, 2024

cc @zhlhahaha
maybe interesting for you
thanks

@ykulazhenkov
Copy link
Contributor

I opened PR to fix the multiarch build #336

@ashokpariya0
Copy link
Contributor

Hi, we didn't officially supported yet multi arch as far as i can tell (i do understand it is a regression) atm i need to finish first other things, and then will be able to come back to it

cc @ashokpariya0 maybe it is part of your plan please ?

Yes

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

No branches or pull requests

8 participants