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

Balena Preload Image not available #2290

Closed
HenrikWittemeier opened this issue Jul 6, 2021 · 9 comments · Fixed by #2303
Closed

Balena Preload Image not available #2290

HenrikWittemeier opened this issue Jul 6, 2021 · 9 comments · Fixed by #2303

Comments

@HenrikWittemeier
Copy link

Expected Behavior

Balena Preload should pull the docker Image for the Preloading Container.

Actual Behavior

Fails with following output:

Building Docker preloader image. [===                     ] 12%
Building Docker preloader image. [========================] 100%
| Checking that the image is a writable file
| Finding a free tcp port and getting balena settings
| Checking if the image is an edison zip archive
| Creating preloader container
| Cleaning up temporary files
(HTTP code 404) no such container - No such image: balena/balena-preload:latest 

Error: (HTTP code 404) no such container - No such image: balena/balena-preload:latest 
    at /home/pi/balena-cli/node_modules/docker-modem/lib/modem.js:315:17
    at getCause (/home/pi/balena-cli/node_modules/docker-modem/lib/modem.js:345:7)
    at Modem.buildPayload (/home/pi/balena-cli/node_modules/docker-modem/lib/modem.js:314:5)
    at IncomingMessage.<anonymous> (/home/pi/balena-cli/node_modules/docker-modem/lib/modem.js:286:14)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting
  • balena CLI version:12.44.23
  • **Cloud backend: openBalena
  • **Operating system version: Raspbian GNU/Linux 10 (buster)
  • **32 bit OS and processor: (Raspberry Pi 4 4GB) armv7l
  • **Install method: npm
  • **If npm install, Node.js and npm version: Node v10.24.0 and npm v5.8.0
@klutchell
Copy link
Contributor

Hey there, the balena-preload image is actually built locally before creating the container, so nothing is pulled.

Can you run the command again with the --debug flag?

@HenrikWittemeier
Copy link
Author

Oh okey, had it running with --debug flag.

@klutchell
Copy link
Contributor

Could you also provide the output of docker version on your host system?

@HenrikWittemeier
Copy link
Author

docker version
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:57:27 2021
 OS/Arch:           linux/arm
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:55:25 2021
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@klutchell
Copy link
Contributor

I reproduced this issue today on an RPi4 running Raspberry Pi OS.

Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
pi@raspberrypi:~ $ node -v
v12.22.3
pi@raspberrypi:~ $ npm -v
6.14.13
pi@raspberrypi:~ $ balena version
12.44.23
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:57:27 2021
 OS/Arch:           linux/arm
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:55:25 2021
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
Building Docker preloader image. [===                     ] 12%
Building Docker preloader image. [========================] 100%
| Checking that the image is a writable file
| Finding a free tcp port and getting balena settings
| Checking if the image is an edison zip archive
| Creating preloader container
| Cleaning up temporary files
(HTTP code 404) no such container - No such image: balena/balena-preload:latest 

Error: (HTTP code 404) no such container - No such image: balena/balena-preload:latest 
    at /home/pi/.nvm/versions/node/v12.22.3/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:315:17
    at getCause (/home/pi/.nvm/versions/node/v12.22.3/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:345:7)
    at Modem.buildPayload (/home/pi/.nvm/versions/node/v12.22.3/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:314:5)
    at IncomingMessage.<anonymous> (/home/pi/.nvm/versions/node/v12.22.3/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:286:14)
    at IncomingMessage.emit (events.js:326:22)
    at IncomingMessage.EventEmitter.emit (domain.js:483:12)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

Now that I can reproduce it I will continue to investigate. I suspect it's related to running on armv7 but that's just a guess at this point.

@klutchell
Copy link
Contributor

klutchell commented Jul 7, 2021

It appears that the official docker-in-docker images for arm32v7 have not been updated to 20.10 (and they probably never will be).

So the problem is twofold:

  1. When we moved to dind 20.10 to support cgroups v2, we broke support for running preload on arm32 platforms
  2. The error wasn't caught during the Building Docker preloader image step

See #2258 and balena-io-modules/balena-preload#237

@pdcastro
Copy link
Contributor

pdcastro commented Jul 7, 2021

The error wasn't caught during the Building Docker preloader image step

We should definitely catch and report errors reasonably clearly, so that much is something we should fix in my opinion. If it was the case, perhaps the CLI could print a message along the lines of:

Error: balena preload cannot be executed on 32-bit ARM machines (including
32-bit operating systems running on 64-bit CPUs). Please run the CLI on a 64-bit
ARM or Intel machine and OS. Note that the image being preloaded can be of
any architecture supported by balena, including 32-bit ARM (v6, v7), even if the CLI
is executed on a machine of a different architecture.

When we moved to dind 20.10 to support cgroups v2, we broke support for running preload on arm32 platforms

Whether we need to fix this (support running balena preload on ARM 32), it is less clear. What is the use case? @HenrikWittemeier, were you aware that balena preload can be executed on your desktop / laptop computer, rather than a device like the Raspberry Pi? It would run faster too. :-) If you were trying to get around an issue like the lack of AUFS support with recent versions of Docker Desktop for Windows or macOS, there are alternative solutions like running Linux (e.g. Ubuntu 20.04) on a virtual machine (e.g. VirtualBox). Also, I understand that balena is close to publishing balenaOS images where AUFS is replaced with overlay2, which would once again allow the Raspberry Pi 3 to be preloaded with Docker Desktop on Windows or macOS. And now I see that you mentioned that the device is a Raspberry Pi 4 -- note also that balenaOS images for the Raspberry Pi 4 are already overlay2 images that can be preloaded with Docker Desktop for Windows or macOS.

And thank you @HenrikWittemeier and @klutchell for reporting and investigating this issue! 👍 🙏 💯

@HenrikWittemeier
Copy link
Author

HenrikWittemeier commented Jul 8, 2021

@pdcastro My use case is, that i have a gitlab CI Runner on a Raspberry pi that builds an pushes my applications because i had issues with building with Quemu. Since that worked really good i tried to use the Raspberry Pi to automatically preload images.
Its good to know, where that issue comes from, so i can try to preload it somewhere else. Preloading on my Desktop works fine;).

@pdcastro
Copy link
Contributor

I understand this issue is resolved in CLI v12.46.1 - great work @klutchell 💯 and thanks @HenrikWittemeier for reporting it! 👍

This issue was closed.
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

Successfully merging a pull request may close this issue.

3 participants