balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
971 stars 116 forks source link

hostapp-update fails due to state partition being full #1657

Open imrehg opened 5 years ago

imrehg commented 5 years ago

hostapp-update writes to the state partition, and if that's full, the update breaks. Should know why the state partition was full, but also maybe there should be better error message / some way to avoid this dependency if at all possible.

https://github.com/balena-os/meta-balena/blob/350e17ed76bd6aba481d7b454a408ba67f0911ce/meta-balena-common/recipes-containers/hostapp-update/files/hostapp-update#L32-L36

might be resulting in

/usr/bin/hostapp-update: line 33: echo: write error: No space left on device
ZubairLK commented 5 years ago

I think there should be a systemd service/cron job that checks the state partition and if <1mb is left, delete the largest file. or any files > 1mb or something like the kernel OOM killer. Maybe have a whitelist of files we know should exist.

We really should keep the device in a functioning state.

This should be coupled with some diagnostics so that we don't miss bugs..

Probably product/arch call-able..