As many other features, also this one is only in rc state and is still work on progress. At the moment it only executes “/system routerboad upgrade” feature after RouterOS upgrade if “auto-upgrade=yes”. After reboot latest firmware is applied.
I don’t mind to wait for 2 reboot instead of one, if it’ll go automatically. Really, it’ll save me another login and issuinfg the same command and then run another reboot.
BTW, will PoE port(s) firmware be upgraded as well?
If the second reboot happens automatically before any network connectivity is up, then I don’t mind that either. ROS boots rather fast (compared to the likes of Cisco for example).
But making the whole network come down and then up and then down and then up again is not the best approach to this.
Surely for single router networks this might not be an issue. But when routers are part of a larger BGP (or other dynamic routing protocol) network, those ups and downs can cause ripple effects on the whole network.
Maybe I’m reading like a lawyer, but I don’t see anywhere that says the second reboot will happen automatically. “After reboot the latest firmware is applied” doesn’t actually say the new feature actually issues the reboot. I just see a commitment that the upgrade will be scheduled if there is an upgrade outstanding, meaning somebody still has to intervene to reboot the router to apply it. I’ve had that functionality for years – an eight-line script, triggered every startup by /system schedule:
:log info "Checking firmware...";
/system routerboard
:if ([get current-firmware] != [get upgrade-firmware]) do={
:log info "Updating firmware";
upgrade;
} else={
:log info "No update."
}
Yeah, I’m extremely wary of automatically scheduling anything that may result in a boot loop that I can’t interrupt.
For example, just this week or so a change in 6.41 renumbered firmware to match the RouterOS release number. Except on older devices the upgrade firmware field showed up blank! This script would have looped forever, because the current firmware would never have matched the (“blank”) upgrade firmware.
This is an eventuality that RouterOS would have to address if this procedure were ever made automatic without requiring a script. It would require some sort of stateful execution cross-reboot.
That is true, I agree. It may cause a boot loop.
You can add a command in the script that controls the firmware ver. is not empty.
But in the future, there may be another new problem that may arise.
The better solution is to have the function built into ROS. We do not need to run scripts for that. And it’s safer
By the way, for ROS itself I can split disk into 2 partitions and keep different ROS versions on both (who uses that in the wild? nice feature!), but what’s about autoupgrade - will there be any rollback?
The way my “bootloader install” script works is by only having it be run by a scheduler set to startup, but the scheduler is only ever enabled right after the “update RouterOS” script is run, then the scheduler disable itself before attempting reboot.
That way there is never any repeating check that can result in a reboot loop. Only after the “update RouterOS” script has confirmed that there is a new version being deployed will it ever attempt a reboot.
Only issue I have had with this was if a router was failing the RouterOS upgrade somehow, attempting to install the same RouterOS upgrade every time the “update RouterOS” script is run. But the “update RouterOS” is only run at midnight, and it sends an e-mail to the office, so it will never interrupt work hours and if I get the same e-mail about an upgrade being attempted multiple days in a row I go to investigate.
I would love this. For RouterOS to automatically reboot and install a new bootloader when detected. Especially if it can do so without starting any network connectivity.
I would get to lower the amount of scripts and schedulers used solely for upgrading RouterOS to one script and one scheduler.