[Bug 2083322] Re: Partial reformat partially works
Olivier Gayot
2083322 at bugs.launchpad.net
Mon Jan 27 09:02:47 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)
** Changed in: subiquity (Ubuntu)
Status: New => Fix Released
--
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/2083322
Title:
Partial reformat partially works
Status in subiquity:
Fix Released
Status in subiquity package in Ubuntu:
Fix Released
Status in subiquity source package in Noble:
In Progress
Bug description:
I was investigating a bug report involving a guided reformat in a disk
that had a partition "in-use" (i.e., mounted). In such a scenario, the
installer tries to delete the partitions that are *not* in-use.
Unfortunately, this does not work as it should. We iterate over the
partitions and remove them at the same time. This is basic iterator
invalidation.
In the example below (I added extra debugging information), the disk
has 4 partitions and partition number 2 appears in-use. We should get
partition number 1, 3 and 4 removed.
DEBUG disk.partitions() = [
Partition(device=disk-sda, ..., number=1, ...),
Partition(device=disk-sda, ..., number=2, ...),
Partition(device=disk-sda, ..., number=3, ...),
Partition(device=disk-sda, ..., number=4, ...)
]
DEBUG in_use_parts = [
Partition(device=disk-sda, ..., number=2, ...)
]
DEBUG iterating over disk.partitions()
DEBUG current element: Partition(device=disk-sda, ..., number=1, ...)
DEBUG partition is not in use, calling delete_partition(Partition(device=disk-sda, ..., number=1, ...))
DEBUG current element: Partition(device=disk-sda, ..., number=3, ...)
DEBUG partition is not in use, calling delete_partition(Partition(device=disk-sda, ..., number=3, ...))
^ We didn't iterate over either sda2 or sda4.
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2083322/+subscriptions
More information about the foundations-bugs
mailing list