Community discussions

MUM Europe 2020
 
upower3
Member
Member
Topic Author
Posts: 388
Joined: Thu May 07, 2015 11:46 am

RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 4:31 pm

I can see this line in 6.42rc12:
*) routerboard - added RouterBOOT "auto-upgrade" after RouterOS upgrade (extra reboot required) (CLI only);
Looks like miracle happened!

Any docs on this?
 
User avatar
strods
MikroTik Support
MikroTik Support
Posts: 1409
Joined: Wed Jul 16, 2014 7:22 am
Location: Riga, Latvia

Re: RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 5:15 pm

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.
 
User avatar
Cha0s
Forum Veteran
Forum Veteran
Posts: 913
Joined: Tue Oct 11, 2005 4:53 pm

Re: RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 8:19 pm

Why not make it actually useful so that it will upgrade the firmware along with ROS at the same time with one reboot instead of two?

Having an option like this and still require to have to do another reboot is pretty much useless IMHO.
 
upower3
Member
Member
Topic Author
Posts: 388
Joined: Thu May 07, 2015 11:46 am

Re: RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 8:36 pm

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?
 
User avatar
Cha0s
Forum Veteran
Forum Veteran
Posts: 913
Joined: Tue Oct 11, 2005 4:53 pm

Re: RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 8:46 pm

I don't mind to wait for 2 reboot instead of one, if it'll go automatically.
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.
 
upower3
Member
Member
Topic Author
Posts: 388
Joined: Thu May 07, 2015 11:46 am

Re: RouterBOOT "auto-upgrade"!

Tue Jan 23, 2018 8:56 pm

Looks like you're right. Hope MT engineers will care for that idea as well. :)

But they introduce many new features (CLI only mostly), good to know that!
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: RouterBOOT "auto-upgrade"!

Wed Jan 24, 2018 1:33 am

This is nothing new. Someone reinvented the wheel again. We had it in the past and it was not only a good thing. None remembers it yet?
 
User avatar
macsrwe
Long time Member
Long time Member
Posts: 655
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: RouterBOOT "auto-upgrade"!

Fri Jan 26, 2018 9:52 pm

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?
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."
     }
 
Grickos
newbie
Posts: 32
Joined: Thu Aug 06, 2015 2:57 am

Re: RouterBOOT "auto-upgrade"!

Sun Jan 28, 2018 12:38 am

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?
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;
     #  Automatic restart
     :delay 2s
     /system reboot
     } else={
     :log info "No update."
     }
The same script, just set to restart automatically, so I do not have to click manually.
 
User avatar
macsrwe
Long time Member
Long time Member
Posts: 655
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: RouterBOOT "auto-upgrade"!

Sun Jan 28, 2018 12:45 am

The same script, just set to restart automatically, so I do not have to click manually.
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.
 
Grickos
newbie
Posts: 32
Joined: Thu Aug 06, 2015 2:57 am

Re: RouterBOOT "auto-upgrade"!

Sun Jan 28, 2018 1:17 am

The same script, just set to restart automatically, so I do not have to click manually.
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
 
raffav
Member Candidate
Member Candidate
Posts: 291
Joined: Wed Oct 24, 2012 4:40 am

Re: RouterBOOT "auto-upgrade"!

Sat Feb 17, 2018 12:17 am

Sorry for the dump question, but where i find this command, on terminal ?
i cant find it
thanks
 
User avatar
macsrwe
Long time Member
Long time Member
Posts: 655
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: RouterBOOT "auto-upgrade"!

Sat Feb 17, 2018 12:49 am

Sorry for the dump question, but where i find this command, on terminal ?
i cant find it
thanks
The command to update firmware is /system routerboard upgrade

If you are asking about some other command, please be more specific what command you are asking about.
 
raffav
Member Candidate
Member Candidate
Posts: 291
Joined: Wed Oct 24, 2012 4:40 am

Re: RouterBOOT "auto-upgrade"!

Sat Feb 17, 2018 4:24 am

Sorry for the dump question, but where i find this command, on terminal ?
i cant find it
thanks
The command to update firmware is /system routerboard upgrade

If you are asking about some other command, please be more specific what command you are asking about.
Sorry, for bad explanation, but how to use the new feature to auto upgrade the firmware
 
raffav
Member Candidate
Member Candidate
Posts: 291
Joined: Wed Oct 24, 2012 4:40 am

Re: RouterBOOT "auto-upgrade"!

Mon Mar 12, 2018 8:06 pm

So any help?
How to set up this auto firmware update?

Sent from my XT1580 using Tapatalk

 
upower3
Member
Member
Topic Author
Posts: 388
Joined: Thu May 07, 2015 11:46 am

Re: RouterBOOT "auto-upgrade"!

Tue Mar 13, 2018 9:01 am

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?
 
User avatar
Deantwo
Member
Member
Posts: 309
Joined: Tue Sep 30, 2014 4:07 pm

Re: RouterBOOT "auto-upgrade"!

Tue Mar 13, 2018 11:48 am

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.
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 don't mind to wait for 2 reboot instead of one, if it'll go automatically.
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).
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.
I wish my FTP was FTL.
 
easycoms
just joined
Posts: 4
Joined: Mon Nov 12, 2018 4:38 pm

Re: RouterBOOT "auto-upgrade"!

Wed Dec 26, 2018 7:04 am

Would this be run from Dude ?
 
User avatar
pbriesch
just joined
Posts: 1
Joined: Tue May 28, 2019 10:37 pm

Re: RouterBOOT "auto-upgrade"!

Tue May 28, 2019 10:43 pm

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.
@Deantwo
Would you like to share your script with us?

Who is online

Users browsing this forum: No registered users and 105 guests