Skip to content

No way to switch slots when update state is error in controller GUI #317

@yfyf

Description

@yfyf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions