Repository navigation
Conversation
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)
Member
Author
|
#2468 is needed to make the CI happy/happier |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.