kvaps / kube-linstor

Containerized LINSTOR SDS for Kubernetes, ready for production use.
Apache License 2.0
130 stars 25 forks source link

Arm64 support? #44

Closed michelcve closed 3 years ago

michelcve commented 3 years ago

Is this supposed to work on arm64 as well? I'm trying to install on a few Pi 4 8GB's with Fedora Core OS and k8s 1.21.

linstor       linstor-db-stolon-create-cluster-x7n5m       0/1     CrashLoopBack             Off   3          2m54s
linstor       linstor-db-stolon-keeper-0                   0/1     Pending                         0          2m54s
linstor       linstor-db-stolon-proxy-7496f59b69-kjm4d     0/1     CrashLoopBack             Off   3          2m54s
linstor       linstor-db-stolon-proxy-7496f59b69-nm2x5     0/1     CrashLoopBack             Off   3          2m53s
linstor       linstor-db-stolon-proxy-7496f59b69-nrvlt     0/1     CrashLoopBack             Off   4          2m54s
linstor       linstor-db-stolon-sentinel-c8875bb99-9wgpw   0/1     CrashLoopBack             Off   3          2m54s
linstor       linstor-db-stolon-sentinel-c8875bb99-shdcr   0/1     Error                           4          2m54s
linstor       linstor-db-stolon-sentinel-c8875bb99-vbbpg   0/1     Error                           4          2m54s
kvaps commented 3 years ago

Never tried that :)

You have to compile Dockerfiles for arm64 architecture, but I'm not sure if all the build deps for for linstor-controller and linstor-satellite will be available on arm64

michelcve commented 3 years ago

Hmm, tried the linstor-controller, but it indeed fails

> Task :server:generateProto FAILED
make[2]: Entering directory '/linstor-server/server/proto'
/linstor-server/tools/protoc-3.12.0/bin/protoc -I=. --java_out=../generated-src MsgHeader.proto
make[2]: Leaving directory '/linstor-server/server/proto'
/linstor-server/tools/protoc-3.12.0/bin/protoc: 1: /linstor-server/tools/protoc-3.12.0/bin/protoc: Syntax error: "(" unexpected
make[2]: *** [Makefile:19: ../generated-src/com/linbit/./MsgHeaderOuterClass.java] Error 2

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:generateProto'.
> Process 'command 'make'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
1 actionable task: 1 executed
make[1]: *** [Makefile:100: gen-java] Error 1
make[1]: Leaving directory '/linstor-server'
make: *** [Makefile:76: debrelease] Error 2
The command '/bin/sh -c make debrelease  && rm -rf /root/.gradle/caches/  && mv linstor-server-${VERSION}.tar.gz /linstor-server_${VERSION}.orig.tar.gz  && tar -C / -xvf /linstor-server_${VERSION}.orig.tar.gz' returned a non-zero code: 2
kvaps commented 3 years ago

Interesting, I think you can create an issue on upstream project and ask if the LINSTOR and DRBD stack are tested on arm64 arcitecture

michelcve commented 3 years ago

Already did https://github.com/kvaps/kube-linstor/issues/44

Although on their private customer only repo they claim to have ARM64 builds according to this tweet https://twitter.com/linbit/status/1258728911464214533

michelcve commented 3 years ago

Okay, I've looked into it a bit, and the problem comes from the build.gradle being hardcoded to download and use an x86_64 binary of protoc.

A dirty fix for this would be adding the following to dockerfiles/linstor-controller/Dockerfile (after the git checkout, and just before the RUN make debrelease)

RUN sed -i 's/x86_64/aarch_64/' build.gradle
RUN git stage build.gradle
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"
RUN git commit -m "fix for aarch64"

This gets me past the previous error. Unfortunaty I ran out of disk space, so I couldn't complete the entire build, but it was almost complete (so I this this should fix it for arm, although dirty) :-)

B.t.w.: The git commit is required, or gradle will complain.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue is being automatically closed due to inactivity.