Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noble - do not suggest use-gap scenarios with invalid number of partitions #2045

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Aug 7, 2024

This is backport of #2031

Signed-off-by: Olivier Gayot <[email protected]>
(cherry picked from commit 797f21e)
Signed-off-by: Olivier Gayot <[email protected]>
(cherry picked from commit 068c692)
If a disk has already reached its limit of (primary) partitions,
suggesting a use-gap scenario can only lead to failures. In the same
vein, if a disk only has room for one more partition but we also need to
add an ESP, the scenario would fail to apply too.

We now try to prevent Subiquity from suggesting such, bad, use-gap
scenarios ; by guessing the number of primary partitions needed ; and
comparing it with the limit.

Although it isn't a perfect solution (see below), this change should
hopefully address the most common problems.

What makes it difficult to properly suggest scenarios is that we do not
have all the cards in hand with the current API. For instance, the user
can choose to add a recovery partition, which of course influences the
number of partitions required. Sadly, we don't have a way with the
current API to allow a scenario without recovery partition ; while
rejecting the same scenario with a recovery partition. Capabilities can
also influence the number of required partitions, supposedly.

LP: #2073378

Signed-off-by: Olivier Gayot <[email protected]>
(cherry picked from commit 4f012e0)
@ogayot ogayot merged commit 22cfeb6 into canonical:ubuntu/noble Aug 8, 2024
12 checks passed
@ogayot ogayot deleted the noble-guided-use-gap branch August 8, 2024 16:42
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.

3 participants