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

Adaptations needed for a richer DBus interface #1310

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Oct 18, 2022

Problem

To implement the storage management we envision for the D-Installer we need the ability to run the GuidedProposal with a couple of customizations:

  • Trying only once with one of the target sizes (we don't want the double attempt with desired and min in D-Installer because it can be confusing).
  • Having the possibility to force the min and max sizes of all volumes, disabling the mechanisms that adjust them (like the modifier related to activating snapshots)

Solution

Implemented a new subclass MinGuidedProposal that tries only once using the min_size as starting point and ignoring the desired_size. Surely inheritance is not the nicest mechanism but it works perfectly here and is the mechanism that was chosen to customize the GuidedProposal (eg. InitialGuidedProposal).

Added two new flags to VolumeSpecification to ignore the automatic size adjustments.

Added the possibility to store a failed proposal in the StorageManager. That makes no sense in the context of YaST but is used in D-Installer (since the proposal is the only mechanism there to produce an staging devicegraph).

Testing

Added unit tests for the new functionality

@ancorgs ancorgs changed the title WIP: adaptations needed for a richer DBus interface Adaptations needed for a richer DBus interface Oct 20, 2022
@coveralls
Copy link

coveralls commented Oct 21, 2022

Coverage Status

Coverage increased (+0.002%) to 97.809% when pulling eed719e on ancorgs:dbus_volumes into ae78d39 on yast:master.

@ancorgs ancorgs force-pushed the dbus_volumes branch 2 times, most recently from fb07320 to bccce3e Compare October 21, 2022 10:44
@ancorgs ancorgs marked this pull request as ready for review October 21, 2022 11:13
This has no impact on YaST because YaST would never store a failed proposal at
StorageManager. So far, checks like StorageManager.instance.proposal.nil? are
only performed in YaST-specific clients and dialogs, so this doesn't have
any unexpected effect in Y2Storage as a library either.
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

@ancorgs ancorgs merged commit 3d1cadd into yast:master Nov 10, 2022
@yast-bot
Copy link

✔️ Public Jenkins job #446 successfully finished
✔️ Created OBS submit request #1035071

@yast-bot
Copy link

✔️ Internal Jenkins job #1132 successfully finished
✔️ Created IBS submit request #284313

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.

4 participants