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

Sebastian Moeller moeller0 at gmx.de
Sun Jan 13 07:16:03 EST 2019


Mmmh, I have a hunch a recent observation of mine might be related (unfortunately I have no log data):

Within a set of recent master builds, sysupgrade from a system running for a few days resulted in the expected behavior in that sysupgrade disconnected the current ssh connection and the LED pattern on the router looked as if the device was updating itself but after the automatic reboot the router came back up still with the previous firmware. Redoing the sussupgrade on that just booted system so far always worked as expected. I think I only started to see this with builds from end of last year on. So far I brushed this off as signs that my trusty old wndr3700v2 might be reaching the end of its life, but with this report I am not so sure and will try to log things better the next time this happens.


> On Jan 13, 2019, at 11:08, Reiner Karlsberg <karlsberg at softart-ge.com> wrote:
> 
> 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


_______________________________________________
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