openwisp / openwisp-firmware-upgrader

Firmware upgrade solution for OpenWRT with possibility to add support for other embedded OSes. Provides features like automatic retry for network failures, mass upgrades, REST API and more.
https://openwisp.io/docs/dev/firmware-upgrader/
Other
53 stars 60 forks source link

[bug] Sysupgrade returning non zero exit code some times but upgrade is performed anyway #246

Closed nemesifier closed 1 year ago

nemesifier commented 1 year ago

In some cases, for some unknown reason, the sysupgrade command returns a non zero exit code and the upgrade is flagged as failed, but it is carried out anyway, I believe we need to add a workaround in openwisp to recognize this false positive and ignore it.

Sample output:

Command failed: ubus call system sysupgrade { "prefix": "\/tmp\/root", "path": "\/tmp\/<file-name-here>", "backup": "\/tmp\/sysupgrade.tgz", "command": "\/lib\/upgrade\/do_stage2", "options": { "save_partitions": 1 } } (Connection failed)