What did you do?
Installed aarch64 release of operator-sdk, created a skeleton ansible operator, and ran operator-sdk build to generate an image.
What did you expect to see?
The image should run.
What did you see instead? Under which circumstances?
exec format error
Environment
v0.18.1
Additional context
It looks like the quay.io/operator-framework/ansible-operator:v0.18.1 base image for ARM64 doesn't have a working tini binary. The file at /tini just contains the text Not found. When I try to run the base image directly on my Raspberry Pi 4 under Ubuntu 20.04, I get exec format error. If I override the entrypoint to run /usr/local/bin/entrypoint directly, it actually runs.
It looks like an additional mapping is needed here:
The arch command returns aarch64 on ARM64, but the tini arch name is arm64.
As a test, I added the following to the generated build/Dockerfile for my test operator, and the resulting image worked.
USER root
RUN TINIARCH=$(case $(arch) in x86_64) echo -n amd64 ;; ppc64le) echo -n ppc64el ;; aarch64) echo -n arm64 ;; *) echo -n $(arch) ;; esac) \
&& curl -L -o /tini https://github.com/krallin/tini/releases/latest/download/tini-$TINIARCH \
&& chmod +x /tini
USER ansible-operator
/kind bug
/lifecycle active
I created PR #3234 to address this
Woohoo, this would be awesome, as with Pi OS 64-bit beta (or Ubuntu 64-bit for ARM, or other ARM64 distros) I can start running my operators on my ARM clusters :)
I've verified that this is fixed in v0.18.2
Most helpful comment
Woohoo, this would be awesome, as with Pi OS 64-bit beta (or Ubuntu 64-bit for ARM, or other ARM64 distros) I can start running my operators on my ARM clusters :)