Skip to content

[resolute] backport accepted errors - #2467

Draft
ogayot wants to merge 4 commits into
canonical:ubuntu/resolutefrom
ogayot:resolute-accepted-errors
Draft

ogayot wants to merge 4 commits into
canonical:ubuntu/resolutefrom
ogayot:resolute-accepted-errors

Conversation

@ogayot

@ogayot ogayot commented Oct 12, 2026

Copy link
Copy Markdown
Member

No description provided.

Previously, the code for performing a fix action was only used by the request
handler for /v2/storage/core_boot_fix_encryption_support.

We now want to give autoinstall the ability to execute some fix actions as
well.

LP: #2165917

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit 630e536)
A limitation of TPM/FDE unattended installations was the inability for the user
to "interact" with pre-install check errors. Such errors block the installation
even in scenarios where a trivial Action.PROCEED would normally fix the
situation. Notably, this is an issue in VMs because the pre-install check
returns a "running-in-vm" error. Therefore, we were unable to run automated
TPM/FDE installations on VMs.

This patch brings the ability to automatically execute an Action.PROCEED for
selective error kinds.

To do this, we introduce an 'accepted-errors' autoinstall directive (available
for the hybrid layout with encryption). The directive can be used to enumerate
the different error kinds that should automatically be addressed with an
Action.PROCEED, should snapd offer it as a solution.

One can specify 'accepted-errors' as a list of error kinds, or as a single
error kind.

The following configuration allows to perform a TPM/FDE unattended installation
on a VM:

storage:
  layout:
    name: hybrid
    encryption: yes
    accepted-errors: [running-in-vm]
    ## If only one is specified, no need for a list
    ## So the following is equivalent.
    # accepted-errors: running-in-vm

LP: #2165917

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit c2d9eff)
When running a TPM/FDE automated install in a VM, with `accepted-errors` set to
`running-in-vm`, we run into the following error:

  File "subiquity/server/controllers/storage.py", line 2247, in ensure_core_boot_autoinstall_capability_compatible
    await self.execute_fix_action(action_proceed)
  TypeError: StorageController.execute_fix_action() missing 1 required positional argument: 'system_label'

While we could pass system_label=None, it seems more accurate to extract the
system label from the variation that produced the original error.

LP: #2170594

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit e428394)
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit 126eaed)
@ogayot

ogayot commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

#2468 is needed to make the CI happy/happier

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant