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

storage: don't suggest use-gap if we can't fit more partitions #2031

Merged
merged 4 commits into from
Jul 23, 2024

Commits on Jul 17, 2024

  1. storage: add TODO to anticipate guided scenarios issues

    Expect for manual partitioning, we should ideally suggest guided
    scenarios only if we are strongly confident that they can be applied.
    
    Currently, we only perform some basic checks before suggesting
    scenarios. Going forward, I think we should be more cautious by trying
    to apply the scenarios in a throwaway filesystem model. If the scenario
    fails to apply, we should not suggest it.
    
    There is a lot of work involved so this is marked as a TODO for now.
    
    Signed-off-by: Olivier Gayot <[email protected]>
    ogayot committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    21c2b76 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. storage: add method to tell how many parts needed for a boot plan

    Signed-off-by: Olivier Gayot <[email protected]>
    ogayot committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    797f21e View commit details
    Browse the repository at this point in the history
  2. storage: move available_use_gap_scenarios to a function

    Signed-off-by: Olivier Gayot <[email protected]>
    ogayot committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    068c692 View commit details
    Browse the repository at this point in the history
  3. storage: don't suggest use-gap if we can't fit more partitions

    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]>
    ogayot committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    4f012e0 View commit details
    Browse the repository at this point in the history