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

Soft-Fail of upgrade process #242

Closed lfdominguez-servinfo closed 7 months ago

lfdominguez-servinfo commented 1 year ago

Hi, I'm trying to upgrade the firmware using this module. The device is upgraded OK, but the upgrade module fail, sems that the connection close and the module can't generate other metadatas, because if I try to upgrade again then dont detect that the image is upgraded already. Maybe is that I'm using the Wireguard VPN module to connect the devices and all the upgrade & ssh process are using the VPN because OpenWISP doesn't have direct connection to my devices.

Connection successful, starting upgrade...
Image checksum file not found, proceeding with the upload of the new image...
Sysupgrade test passed successfully, proceeding with the upgrade operation...
Upgrade operation in progress...
Thu Jun 29 14:44:42 UTC 2023 upgrade: Saving config files...
Thu Jun 29 14:44:44 UTC 2023 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: ubus call system sysupgrade { "prefix": "\/tmp\/root", "path": "\/tmp\/mywrt-22.05-270620230819-r23230-123afce696-ath79-g_EXittkS.bin", "backup": "\/tmp\/sysupgrade.tgz", "command": "\/lib\/upgrade\/do_stage2", "options": { "save_partitions": 1 } } (Connection failed)
nemesifier commented 7 months ago

This issue should have been fixed by https://github.com/openwisp/openwisp-firmware-upgrader/commit/f1b0397944489db857cde986c2933675b3758001.