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

[GuidedProposal] Support for more Agama-based scenarios #1372

Merged
merged 12 commits into from Mar 4, 2024

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Feb 26, 2024

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 to auto.

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 and reformat 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.

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.
@coveralls
Copy link

coveralls commented Feb 26, 2024

Coverage Status

coverage: 97.81% (+0.01%) from 97.798%
when pulling f9b70df on ancorgs:agama_fix_combinations
into 7157f8f on yast:master.

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 and others added 3 commits February 27, 2024 20:37
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 ancorgs force-pushed the agama_fix_combinations branch 5 times, most recently from f5cf4d0 to 73a3189 Compare March 3, 2024 19:13
@ancorgs ancorgs marked this pull request as ready for review March 4, 2024 10:47
Copy link
Contributor

@joseivanlopez joseivanlopez left a 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!

@ancorgs ancorgs merged commit 5707135 into yast:master Mar 4, 2024
7 checks passed
@yast-bot
Copy link

yast-bot commented Mar 4, 2024

✔️ Internal Jenkins job #1147 successfully finished
✔️ Created OBS submit request #1154849

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.

None yet

4 participants