[OpenWrt-Devel] Notes on (dangerous ?) sysupgrade

Reiner Karlsberg karlsberg at softart-ge.com
Sun Jan 13 05:08:42 EST 2019


I am an unhappy user of sysupgrade for remote installed devices.
(Besides these ones:  https://forum.openwrt.org/t/sysupgrade-return-code-in-18-06-vs-17-01/22316/9)

After having several unpleasant encounters using sysupgrade, I had a quick glance at the code, after more or less 
successfully implementing workarounds for incomplete sysupgrades, resulting in inconsistent systems.
My questions are:
- Is it safe, simply to kill running processes during sysupgrade ? As there might be services, restarted automatically 
(by procd ?).
-  What about a killed process, simply taking some time to shut down ? (example: squid closing lot of open files on 
block-device; having internal shutdown timer 30s by default)
- What about open swap file on block-device ?
- What about mounted block-device for mass storage ?
- What about (slow) wwan connection, managed by pppd. When killed by sysupgrade, will netifd restart pppd ?

As a workaround, before calling sysupgrade I
- explicitly use /etc/init.d/most_services stop
- explicitly kill squid and wait for termination
- explicitly disable swap
- explicitly dismount mounted block-device
- ifdown wwan

Before I had several cases, that
sysupgrade -n -v -f /tmp/newfiles.tar.gz /tmp/new_fw.bin
updated all files from /tmp/newfiles.tar.gz, but did not do the flash of new_fw.bin
Resulting in inconsistent system.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list