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

Partition mode #189

Merged
merged 3 commits into from
Oct 12, 2023
Merged

Partition mode #189

merged 3 commits into from
Oct 12, 2023

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Oct 5, 2023

This is basically a port of osbuild/osbuild-composer#3222 to images. I think this is complete, but I need to clean up the osbuild-composer part first so marking this as a draft for now.

@achilleas-k achilleas-k self-requested a review October 5, 2023 11:16
@bcl bcl force-pushed the main-partition-mode branch 2 times, most recently from 9a973fb to b568847 Compare October 6, 2023 18:20
@bcl bcl marked this pull request as ready for review October 6, 2023 23:17
@bcl bcl requested a review from ondrejbudai October 6, 2023 23:18
@bcl
Copy link
Contributor Author

bcl commented Oct 6, 2023

This is ready to review. It is currently vendored into osbuild/osbuild-composer#3723 to see if the full suite of tests will pass with it.

It's slightly different from the original PR, I decided to make an empty/missing PartitioningMode use DefaultPartitioningMode so that the string conversions are nicer to read. The fact that Default results in AutoLVM is enforced in this code and nowhere else. eg. If the osbuild-composer code gets an empty entry it calls this code with DefaultPartitioningMode instead of AutoLVM so that we have a single place deciding what the default actually is.

@ondrejbudai
Copy link
Member

Awesome, @bcl! I will wait for Achilleas to return, I don't feel comfortable giving this an approval, considering that I wrote most of these changes. :)

pt.features() now returns a struct with flags set for
each feature used in the members of the partition table.

Also adds a test for the new function.

Based on PR #3222
This adds support for AutoLVM mode which uses LVM when there are 1 or
more extra mountpoints, LVM mode which always uses LVM, and Raw mode
which always uses raw partitions.

This also removes a panic from ensureLVM, returning an error instead.
There are cases where the mode can conflict with the selected partition
table.

Also includes a new test for always using LVM.
And use it in the distro's getPartitionTable.

TODO Logic about that combination of things is or is not supported needs
a more central location than embedded in the functions.
@achilleas-k achilleas-k added this pull request to the merge queue Oct 12, 2023
@achilleas-k
Copy link
Member

THANKS! <3

Merged via the queue into osbuild:main with commit 2d71faa Oct 12, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants