Currently we only allow switching slots when there is no Update error:
|
let suggested_action_of_state (update : Update.state) (rauc : rauc_state) |
|
booted_slot = |
|
let target_slot = other_slot booted_slot in |
|
match (update.system_status, rauc) with |
|
| RebootRequired, _ -> |
|
Some (Definition.description reboot_call) |
|
| OutOfDateVersionSelected, Status _ -> |
|
Some (Definition.description (switch_to_newer_system_call target_slot)) |
|
| ReinstallRequired, _ -> |
|
Some (Definition.description (reinstall_call target_slot)) |
|
| UpToDate, Status _ -> |
|
Option.bind update.version_info (fun { booted; inactive; _ } -> |
|
if booted <> inactive then |
|
Some |
|
(Definition.description (switch_to_older_system_call target_slot)) |
|
else None |
|
) |
|
| _ -> |
|
None |
However, a regression in the updated system might cause the update errors. To then switch back to the old system, the user is forced to use GRUB.
We should re-consider this restriction and allow switching at least when UpdateError is ErrorDownloading or ErrorGettingVersionInfo.
Currently we only allow switching slots when there is no Update error:
playos/controller/server/view/status_page.ml
Lines 105 to 123 in dc4a4c9
However, a regression in the updated system might cause the update errors. To then switch back to the old system, the user is forced to use GRUB.
We should re-consider this restriction and allow switching at least when
UpdateErrorisErrorDownloadingorErrorGettingVersionInfo.