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

Failed to build on Pi Zero W #30

Open
trilbytim opened this issue May 6, 2020 · 13 comments
Open

Failed to build on Pi Zero W #30

trilbytim opened this issue May 6, 2020 · 13 comments
Assignees

Comments

@trilbytim
Copy link

I attempted to load this onto a Raspberry Pi Zero W. It seemed to get almost all the way through, but in the end failed to build Mosquitto, Influx DB, Node Rod or Grafana. Only Jupyter-lab was successfully built. I've attached the terminal output below.

MING stack install.txt

@ajlennon
Copy link
Member

ajlennon commented May 6, 2020

Very interesting - it looks like something may have gone missing upstream. I'll take a look!

@ajlennon ajlennon self-assigned this May 6, 2020
@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented May 6, 2020

Not all of the images that we're using support Armv6, but it should work for some of the containers, just not Grafana last I checked. The real cause of the issue I think is this commit DynamicDevices/ming@3ee6b7c

My repo usesFROM --platform=linux/arm due to the Balena cloud builder being unable to automatically discover the arch for the device, or at least I was. Remember, this doesn't work when you use %%BALENA_ARCH%% as already explained in #24

This repo does not work at all at the moment for any device other than X86 because of that commit, so try mine, or rollback from that commit.

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented May 6, 2020

Okay, that's even more hilarious. Seems Balena have started to call the %%BALENA_ARCH%% for the Pi 1 simply pi

From the log file provided:
Error: no matching manifest for linux/rpi in the manifest list entries

Can we please correct 3ee6b7c and get back to hardcoding this? There is no alternative, other than using BalenaOS docker base images, which is the reason the Jupyterlab container still built, something I created since there was no upstream image to choose from. Which defeats the whole purpose of using Docker and using things maintained by others, meaning we would have to maintain the entirety of Grafana and its installation method, dependencies, etc, rather than just its configuration with other software. Which I don't think we're getting paid enough for :)

@MatthewCroughan
Copy link
Contributor

https://www.balena.io/docs/learn/develop/dockerfile/ How and why!

Device Name BALENA_MACHINE_NAME BALENA_ARCH
Raspberry Pi (1, Zero, Zero W) raspberry-pi rpi

@ajlennon
Copy link
Member

ajlennon commented May 6, 2020

They broke stuff by renaming things? Can they unbreak it then?

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented May 6, 2020

@ajlennon No, it never worked in the first place. They have just made it more silly. Or maybe it was always this way, and we just never bothered to look at how silly it got. The only thing that matches up is X86.

armv7hf does not exist according to dockerhub, only armv7
amd64 does exist according to the dockerhub, and this is what it is called in %%BALENA_ARCH%%

It has only ever worked for x86 images, as I've already discussed in #24

@MatthewCroughan
Copy link
Contributor

Reliance on %%BALENA_ARCH%% just hopes that they call it the same thing as the Docker Hub, which they don't, except in the case of amd64, so it's pointless. No doubt all of their CI relies on this, so we can't ask them to change it.

@ajlennon
Copy link
Member

ajlennon commented May 6, 2020

I'm pretty sure when I created the Dockerfiles this worked on arm?

@MatthewCroughan
Copy link
Contributor

No they did not. It failed live during my talk, if you remember?

@MatthewCroughan
Copy link
Contributor

The reason it failed during my talk on Balena at DoES is because the manifest armv7hf doesn't exist, because Balena call armv7 armv7hf. Which isn't what official Docker uses to describe their multi-arch image manifests.

@ajlennon
Copy link
Member

ajlennon commented May 6, 2020

Yeah but when I created the Dockerfiles it did work as I recall, which was a while before your talk?

@MatthewCroughan
Copy link
Contributor

Yes, but we've changed through many PRs since then, I wrote at length about why here. #8

This doesn't change the problem introduced by relying on %%BALENA_ARCH%%, we need to hardcode the platform, unless we base ourselves on Balena OS platform dependant images.

If we do, not only does that mean we can't support both Docker and Balena independantly, but it also means that we have a crap ton more work to do, maintaining our own non standard, non supported, non official images, which I've already written about in #8

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented May 6, 2020

I've asked a lot of people in the Docker Freenode IRC whether it's possible to change the FROM directive based on ENV or ARG and it seems that is not possible at all. There is no way to make our own list of %%BALENA_ARCH%% style variables, I mean.

Because Balena itself is an outdated version of Moby, the Docker Container framework, it does not support image manifests, again as I have already cross-referenced in the few issues that are in this repository countless times and is mentioned also in #8 extensively.

Here's more references for good measure.
https://forums.balena.io/t/balena-cloud-cli-builder-is-still-not-able-to-interpret-image-manifests/43203
moby/moby#36552
https://github.com/DynamicDevices/ming/issues/6

They have since privatised the repo responsible for the first comment in this issue.
balena-io/balena-cli#1508

As a result, you have to hardcode the platform argument, there is no alternative until they support mult-arch image manifests. Which has been an outstanding issue since 2018

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

3 participants