k8snetworkplumbingwg / ovs-cni

Open vSwitch CNI plugin
Apache License 2.0
222 stars 71 forks source link

Arm Support #260

Open MarkSpencerTan opened 1 year ago

MarkSpencerTan commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

phoracek commented 1 year ago

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 commented 1 year ago

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

cyclinder commented 1 year ago
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 commented 5 months ago

full ARM support was added in https://github.com/k8snetworkplumbingwg/ovs-cni/pull/307

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