|
| 1 | +.. _upgrade_recovery: |
| 2 | + |
| 3 | + |
| 4 | +############################## |
| 5 | +Recovery after Failed Upgrades |
| 6 | +############################## |
| 7 | + |
| 8 | +This section explains **VyOS’s upgrade recovery**, which restores the system to the last working version after a failed upgrade. It covers the following points: |
| 9 | + |
| 10 | +* :ref:`Configuration: <configuration>` How to enable upgrade recovery |
| 11 | +* :ref:`How it Works: <how_it_works>` Overview of the recovery process |
| 12 | +* :ref:`Cancelling Recovery: <cancelling_recovery>` Overview of the recovery process |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +.. _configuration: |
| 17 | + |
| 18 | +************* |
| 19 | +Configuration |
| 20 | +************* |
| 21 | +.. warning:: Upgrade recovery is disabled by default. To use it, **enable it first**. |
| 22 | + |
| 23 | +To enable upgrade recovery, run the following command: |
| 24 | + |
| 25 | +.. cfgcmd:: |
| 26 | + |
| 27 | + set system option reboot-on-upgrade-failure [timeout <min>] |
| 28 | + |
| 29 | +* ``timeout <min>:`` The time in minutes (from 5 to 30) you have to cancel upgrade recovery. See :ref:`Cancelling Recovery <cancelling_recovery>`. |
| 30 | + |
| 31 | +.. _how_it_works: |
| 32 | + |
| 33 | +************ |
| 34 | +How it Works |
| 35 | +************ |
| 36 | +After a VyOS upgrade, the system monitors the boot process. Upon detecting a boot failure, VyOS initiates a revert to the last working version and displays the following warning: |
| 37 | + |
| 38 | +.. code-block:: none |
| 39 | +
|
| 40 | + Booting failed, reverting to previous image |
| 41 | + Automatic reboot in xx minutes |
| 42 | + Use "reboot cancel" to cancel |
| 43 | +
|
| 44 | +If no action is taken, the reboot happens automatically after the configured timeout. Upon successful recovery and reboot, the following message appears: |
| 45 | + |
| 46 | +.. code-block:: none |
| 47 | +
|
| 48 | + WARNING: Image update to "VyOS 1.5.xxxx" failed |
| 49 | + Please check the logs: |
| 50 | + /usr/lib/live/mount/persistence/boot/NAME/rw/var/log |
| 51 | + Message is cleared on next reboot! |
| 52 | + |
| 53 | +.. _cancelling_recovery: |
| 54 | + |
| 55 | +******************* |
| 56 | +Cancelling Recovery |
| 57 | +******************* |
| 58 | +Upon detecting a boot failure, you have the predefined timeout to cancel upgrade recovery. This is useful if you want to troubleshoot the faulty VyOS version on your own. |
| 59 | + |
| 60 | +To cancel upgrade recovery, run the following command: |
| 61 | + |
| 62 | +.. code-block:: none |
| 63 | +
|
| 64 | + reboot cancel |
0 commit comments