[Bug 2095159] Re: "Exceeded number of available partitions" leaves remnants of an incomplete partition with no number - making renumbering, reformat and other operations fail
Olivier Gayot
2095159 at bugs.launchpad.net
Mon Jan 27 09:00:51 UTC 2025
** Also affects: subiquity (Ubuntu)
Importance: Undecided
Status: New
** Also affects: subiquity (Ubuntu Noble)
Importance: Undecided
Status: New
** Changed in: subiquity (Ubuntu Noble)
Status: New => In Progress
** Changed in: subiquity (Ubuntu Noble)
Assignee: (unassigned) => Olivier Gayot (ogayot)
--
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/2095159
Title:
"Exceeded number of available partitions" leaves remnants of an
incomplete partition with no number - making renumbering, reformat and
other operations fail
Status in subiquity:
Fix Committed
Status in subiquity package in Ubuntu:
New
Status in subiquity source package in Noble:
In Progress
Bug description:
When removing a logical partition (for example as part of a disk
reformat), we attempt to renumber other logical partitions. I saw in
multiple private bug reports this operation failing because one of the
partition has no number associated to it.
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 701, in guided
gap = self.start_guided(choice.target, disk)
File "/snap/ubuntu-desktop-installer/1269/usr/lib/python3.10/functools.py", line 926, in _method
return method.__get__(obj, cls)(*args, **kwargs)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/server/controllers/filesystem.py", line 620, in start_guided_reformat
self.reformat(disk, wipe="superblock-recursive")
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/common/filesystem/manipulator.py", line 230, in reformat
self.delete_partition(p, True)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/common/filesystem/manipulator.py", line 117, in delete_partition
self.model.remove_partition(part)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 2041, in remove_partition
part.device.renumber_logical_partitions(part)
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 688, in renumber_logical_partitions
for p in self.partitions_by_number()
File "/snap/ubuntu-desktop-installer/1269/bin/subiquity/subiquity/models/filesystem.py", line 638, in partitions_by_number
return sorted(self._partitions, key=lambda p: p.number)
TypeError: '<' not supported between instances of 'NoneType' and 'int'
We first need to understand in what conditions a partition would have
no number.
During a full disk reformat, we should be able to disable partition
renumbering ; since we end up with no partition at all.
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2095159/+subscriptions
More information about the foundations-bugs
mailing list