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
[GuidedProposal] Support for more Agama-based scenarios #1372
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the first step to reorganize a bit the GuidedProposal algorithm to fix some issues and to allow new use cases. So far it only breaks DevicesPlanner into two classes.
ancorgs
force-pushed
the
agama_fix_combinations
branch
from
February 26, 2024 13:46
033e7fe
to
fc08e29
Compare
This is the second step to reorganize a bit the GuidedProposal algorithm to fix some issues and to allow new use cases. It divides the calculation of planned devices in two phases, one before cleaning the devicegraph (mandatory actions) and a second phase afterwards (to mark reusable swaps and to calculate boot-related planned partitions).
ancorgs
force-pushed
the
agama_fix_combinations
branch
from
February 26, 2024 14:15
fc08e29
to
cff463b
Compare
This is the third step in the reorganization of the GuidedProposal algorithm. It should fix all the detected issues. It also opens the door to future use-cases like making it possible for the user to specify that a given volume should re-use an existing partition, RAID or logical volume.
ancorgs
force-pushed
the
agama_fix_combinations
branch
5 times, most recently
from
March 3, 2024 19:13
f5cf4d0
to
73a3189
Compare
ancorgs
force-pushed
the
agama_fix_combinations
branch
from
March 3, 2024 19:22
73a3189
to
14e3007
Compare
joseivanlopez
approved these changes
Mar 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot for splitting it in separate meaningful commits. It makes the review much easier!
joseivanlopez
approved these changes
Mar 4, 2024
✔️ Internal Jenkins job #1147 successfully finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
At #1335, we introduced changes to make it possible to force the location of certain volumes, even when the
allocate_volume_mode
was set toauto
.But there was still one combination that didn't work. When LVM was used to group the system volumes it was not possible to allocate one of the volumes in a separate partition without creating a dedicated volume group for it.
On the other hand, on recent tests we found mandatory actions to make space were not being properly executed in all cases. Mandatory actions were only applied to the disks listed at
candidate_devices
, but that was not enough after the changes introduced in the mentioned pull request #1335.Last but not least, we wanted to make it possible for Agama to specify that a given volume should reuse an existing block device instead of creating a new partition and/or logical volume, similar to what the AutoYaST profile can do.
Solution
The
GuidedProposal
algorithm is modified to pre-calculate an initial list of planned devices before executing the mandatory space-making actions. Thus, additional disks are not longer overlooked.That change is performed as several steps in separate commits for easier review.
Additionally, this pull request introduces new fields
reuse_name
andreformat
for the volumes, making it possible to reuse existing block devices or even file-systems. That depends on the previous changes in the algorithm already mentioned.Testing
Added new unit tests for all the Agama combinations and adapted existing ones.
To be done
The behavior about what to keep / delete while making space is a bit surprising in some scenarios. That's not a consequence of the changes introduced in this pull request but on how the
:bigger_resize
strategy of the SpaceMaker is defined.We need to reconsider those cases and decide how do we want SpaceMaker to act. On the bright side, now we have many test cases marked with FIXME and pointing to a Trello card that will be soon handled by the YaST Team.