yast / yast-storage-ng

Rewrite of https://github.com/yast/yast-storage
http://yast.github.io/
GNU General Public License v2.0
14 stars 20 forks source link

Fix total size #1377

Closed ancorgs closed 6 months ago

ancorgs commented 6 months ago

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

coveralls commented 6 months ago

Coverage Status

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

yast-bot commented 6 months ago

:heavy_check_mark: Internal Jenkins job #1153 successfully finished :heavy_check_mark: Created OBS submit request #1164333