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

filesystem: fix crash when editing LVM logical volume #1418

Merged
merged 1 commit into from Sep 20, 2022

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Sep 14, 2022

When editing a LVM logical volume (LV), Subiquity would crash with the following error:

filesystem/gaps.py", line 244, in movable_trailing_partitions_and_gap_size
    pgs = parts_and_gaps(partition.device)
AttributeError: 'LVM_LogicalVolume' object has no attribute 'device'

When we changed the implementation to use movable_trailing_partitions_and_gap_size, we did not pay attention to the LVM use case.

Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, I think the general direction is right. Couple of comments though.

subiquity/common/filesystem/gaps.py Outdated Show resolved Hide resolved
When editing a LVM logical volume (LV), Subiquity would crash with the
following error:

filesystem/gaps.py", line 244, in movable_trailing_partitions_and_gap_size
    pgs = parts_and_gaps(partition.device)
AttributeError: 'LVM_LogicalVolume' object has no attribute 'device'

When we changed the implementation to use
movable_trailing_partitions_and_gap_size, we did not pay attention to
the LVM use case.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates!

Copy link
Collaborator

@dbungert dbungert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ogayot ogayot merged commit 5053186 into canonical:main Sep 20, 2022
@ogayot ogayot deleted the LP#1988407 branch September 20, 2022 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants