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

Fix total size #1377

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Fix total size #1377

merged 2 commits into from
Apr 3, 2024

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Apr 3, 2024

Problem

When the GuidedProposal uses the :bigger_resize strategy for making space, it receives a list of potential resize actions.

Combining LVM with a separate boot disk, it may happen that the list of resize actions include actions on partitions of the boot disks that are not needed, because there is already enough free space in the booting disk without resizing any partition.

Sometimes, that leaded to an exception in the algorithm of Proposal::PartitionsDistributionsCalculator.

Solution

Take the corner case into account and return a zero in the value for "missing size" (there is no need to resize).

Testing

  • Added a new unit test
  • Tested manually

@coveralls
Copy link

Coverage Status

coverage: 97.815% (+0.005%) from 97.81%
when pulling 5deed73 on ancorgs:fix_total_size
into 123b26f on yast:master.

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 600ef23 into yast:master Apr 3, 2024
7 checks passed
@yast-bot
Copy link

yast-bot commented Apr 3, 2024

✔️ Internal Jenkins job #1153 successfully finished
✔️ Created OBS submit request #1164333

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