[Bug 2081724] Re: A "target-resize" scenario is suggested but the disk does not have room for more primary partitions
Olivier Gayot
2081724 at bugs.launchpad.net
Wed Sep 25 15:18:22 UTC 2024
** Changed in: subiquity
Status: In Progress => Fix Committed
** Tags removed: foundations-todo
** No longer affects: subiquity (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2081724
Title:
A "target-resize" scenario is suggested but the disk does not have
room for more primary partitions
Status in subiquity:
Fix Committed
Bug description:
In private bug reports, we noticed that Subiquity sometimes fails to
apply a target-resize scenario because the disk does not have enough
room for more partitions. This is more common with DOS partitions
tables since we can only have 4 primary partitions.
Ideally, we should only make Subiquity suggest scenarios that we are
confident can be applied. One way to ensure they can be applied would
be to apply them in a throwaway filesystem model ; but this requires a
lot of work.
To limit the number of "bad" target-resize scenarios suggested, we
could check the number of available partitions and compare it with the
number of partitions that we /think/ we would require to add. This
wouldn't be a perfect solution but should limit the number of possible
errors.
Here's the stack trace of an occurrence of the issue.
2023-12-07 05:26:50,235 DEBUG root:30 start: subiquity/Filesystem/v2_guided_POST:
2023-12-07 05:26:50,237 DEBUG subiquity.server.controllers.filesystem:1152 GuidedChoiceV2(target=GuidedStorageTargetResize(disk_id='disk-nvme0n1', partition_number=2, new_size=895145788059, minimum=675641556992, recommended=1006511325184, maximum=1012127498240, allowed=[<GuidedCapability.DIRECT: 2>, <GuidedCapability.LVM: 3>, <GuidedCapability.LVM_LUKS: 4>, <GuidedCapability.ZFS: 5>], disallowed=[]), capability=<GuidedCapability.DIRECT: 2>, recovery_key=None, sizing_policy=<SizingPolicy.ALL: 2>, reset_partition=False)
2023-12-07 05:26:50,239 DEBUG subiquity.models.filesystem:2105 adding fat32 to Partition(device=disk-nvme0n1, size=1127219200, wipe='superblock', flag='boot', number=4, grub_device=True, offset=895199739904, id='partition-0')
2023-12-07 05:26:50,243 DEBUG root:30 finish: subiquity/Filesystem/v2_guided_POST: SUCCESS: 500 Traceback (most recent call last):
File "/snap/ubuntu-desktop-installer/126...
2023-12-07 05:26:50,243 DEBUG subiquity.server.server:448 request to /storage/v2/guided crashed
Traceback (most recent call last):
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/common/api/server.py", line 164, in handler
result = await implementation(**args)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/server/controllers/filesystem.py", line 1154, in v2_guided_POST
await self.guided(data)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/server/controllers/filesystem.py", line 735, in guided
self.guided_direct(gap)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/server/controllers/filesystem.py", line 511, in guided_direct
self.create_partition(device=gap.device, gap=gap, spec=spec)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/common/filesystem/manipulator.py", line 103, in create_partition
part = self.model.add_partition(
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 2010, in add_partition
p = Partition(
File "<attrs generated init subiquity.models.filesystem.Partition>", line 24, in __init__
self.__attrs_post_init__()
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 210, in _do_post_inits
fn(obj)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 854, in __post_init__
raise Exception("Exceeded number of available partitions")
Exception: Exceeded number of available partitions
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2081724/+subscriptions
More information about the foundations-bugs
mailing list