Occasionally, if a native ARM server is unavailable due to load or maintenance, an x86 builder is used with QEMU emulation and this can result in a slower build. (We have a pool of native ARM servers that normally meet the demand for them.)
If you suspect that the native ARM servers are getting in the way rather than speeding up your builds, you can force a QEMU emulated build on x86 servers with the commands:
git push balena master:balena-emulated
balena push ... --emulated
balena build ... --emulated
balena deploy ... --emulated
Prefixing balena commands with DEBUG=1 adds debugging messages to the output logs: DEBUG=1 balena push ...
[Info] Starting build for tlprototyping, user danilo_aghemo
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1109673/devices
[Info] Building on arm01
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[Info] Still working..
Is it safe (for you) to just CTRL-C, so that maybe next time I will end up on a different system?
Yes it will interrupt the build and it is safe, but we currently have a known issue that we’re working on (and it’s not trivial unfortunately) where the first commit after an interrupted build could fail. If that happens, don’t worry and just push the commit again because it shouldn’t be stored on our side
@wwalker, @daghemo, I wanted to also share an alternative to the ARM cloud builders or to emulators, which is to build on a local ARM device like a Raspberry Pi 3B (running a recent version of balenaOS). Enable local mode on the device, then run the commands below on a terminal on your laptop/desktop, replacing ‘192.168.2.3’ with your local device’s IP address:
# build the docker image on the device at the given IP address
balena build -a my_app -h 192.168.2.3 -p 2375 .
# copy the docker image from the device to the laptop/desktop
ssh root@192.168.2.3 -p 22222 balena-engine save my_image | docker load
# upload the image to the balena cloud for deployment to devices
balena deploy my_app my_image
The ssh command line above copies the image to the laptop’s / deskotp’s local docker daemon, which therefore must be installed and running. The images can be listed with the docker ps command. The counterpart command to copy an image in the opposite direction (from the laptop/desktop to a balena device) is:
docker save my_image | ssh root@192.168.2.3 -p 22222 balena-engine load
@pdcastro, I’m going to try the suggested setup in the next few days.
Maybe arm01 is still having some problems:
[main] E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 93.93.128.230 80]
[main] E: Failed to fetch http://archive.raspbian.org/raspbian/dists/stretch/contrib/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Some index files failed to download. They have been ignored, or old ones used instead.
@daghemo, we haven’t been able to reproduce the No space left on device errors, so I think it was a temporary issue. I have updated one of my posts above to list git and balena commands to force an emulated cloud build on x86 servers instead of using the native ARM servers, if you find that they are getting in the way rather than speeding up the build:
@pdcastro, our applications have also been getting the No space left on device errors on arm01 today, 4 hours or so after your reply
Thanks those commands though, I’m running a balena-emulated branch build now. We were previously using the balena-nocache remote branch but things seem to be building OK so far.
Hi
I can confirm that at the moment we aren’t having any issues on our builders (https://status.balena.io/)
Are you still facing issues? Do you have complete logs of when you were trying to deploy?