update_pending is true after flashing new device with preloaded image

Hello,
Im using jetson Tx2 custom Balena OS.
After download the OS img, im executing balena preload to my release.
When I first using the device, the supervisor return “update_pending” true.
It fixed once im connecting it to the network.

What should be the reason to update_pending is true on first usage?
How can I avoid it assuming the first usage of the device is not involving network connection ?

See screenshot from uart connection:

{“api_port”:48484,“ip_address”:“10.42.0.1”,“os_version”:“balenaOS 2.115.4”,“mac_address”:“XX”,“supervisor_version”:“14.11.1”,“update_pending”:true,“update_failed”:false,"
update_downloaded":false,“status”:“Idle”,“download_progress”:null}

OS version:
2.115.4

Hello, the device supervisor will set update_pending = true while it’s applying the target state reported by the cloud. On start, the supervisor does not know yet if it has to perform any updates so it sets update_pending until it has verified it is at the correct state once you have connected to the network.

Thats a bit problematic for us,
On our flow, when device is update_pending, we block any activity on the device.
So that forces us to connect the device to the network in order to start working. (Mean during manfucturing process)
There is any way to control this behviour ? On preloaded image it shouldn’t happen.
Or maybe Ill change the condition to: pending_update & network connection available

I think your last suggestion is sensible. Even if a device is preloaded, thats not to say that a new update would not be available in balena cloud. Adding the --commit arguement to your preload command -could- change this behaviour but I’m not sure - the best bet imo is what you suggested, making the condition update_pending && !network_connection

1 Like