-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add RPi1/RPi0 workaround #4530
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 RPi1/RPi0 workaround #4530
Conversation
On the very popular Raspberry Pi 1 and Zero devices, the CPU is actually ARMv6, but the chip happens to support the feature bit the kernel uses to differentiate v6/v7, so it gets reported as "CPU architecture: 7" and thus fails to run many of the images that get pulled. To account for this very popular edge case, this also checks "model name" which on these chips will begin with "ARMv6-compatible" -- we could also check uname, but getCPUInfo is already handy, low overhead, and mirrors the code before this. Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Build succeeded.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for this, we couldn't use faasd on RPi 1 +0 due to containerd not passing a build. I'll be taking a look at this, or pointing the openfaas community at it. |
See containerd/containerd#4530 and `git log ad25c1a9c34361e4071f508b9a91946b05fce165^..2055e12953bb538228d8d9fe627fa545d7cf82be ./platforms/` in the containerd repo Change-type: patch Signed-off-by: Robert Günzler <robertg@balena.io>
On the very popular Raspberry Pi 1 and Zero devices, the CPU is actually ARMv6, but the chip happens to support the feature bit the kernel uses to differentiate v6/v7, so it gets reported as "CPU architecture: 7" and thus fails to run many of the images that get pulled.
To account for this very popular edge case, this also checks "model name" which on these chips will begin with "ARMv6-compatible" -- we could also check uname, but getCPUInfo is already handy, low overhead, and mirrors the code before this.
To give a small taste of how common this issue is and why (in my opinion) it warrants a special case:
(I proposed this over in moby/moby#41017 (comment), which prompted the following query:)
I'm not aware of any that report
model name
to beARMv6-compatible
like these RPi devices do (and my Google search for"model name : armv6-compatible"
comes up with tons of hits for RPi-related discussion, usually around this very kernel quirk, but not much else I can see), so I think the regression potential here is really low.I personally tested on a Raspberry Pi 1 (ARMv6) and a NanoPi NEO (ARMv7), and
ctr i pull docker.io/library/alpine:3.12
does the right thing in both instances (on the RPi1, I getunpacking linux/arm/v6 sha256:...
and on the NanoPi, I getunpacking linux/arm/v7 sha256:...
, whereas before this change the RPi1 would choose thelinux/arm/v7
image which then fails to run).