yast / yast-storage-ng

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

Add internal setting to configure swap reusing in GuidedProposal #1362

Closed ancorgs closed 9 months ago

ancorgs commented 9 months ago

Problem

Currently YaST’s guided storage proposal reuses any available swap, even if that swap is not in the candidate devices.

That’s the traditional behavior inherited from the SLE-12 times. Although it has been reported as confusing at https://bugzilla.suse.com/show_bug.cgi?id=1175535 and https://bugzilla.suse.com/show_bug.cgi?id=1215639 .

It’s still not decided which possibilities we want to use regarding re-use of partitions at Agama. But while we decide what to do in Agama, the current behavior of reusing swap is confusing because it’s not clear what is happening looking at the UI.

Solution

This implements a new setting at ProposalSettings to fine-tune swap reusing at the GuidedProposal. It has three possible values:

YaST keeps using :any and there is no plan to make that configurable in AutoYaST or in the YaST UI, although the modes :none and :candidate can easily be part of a future solution for the mentioned bug reports.

Testing

Added new unit tests. Not tested with YaST in a real system, but the change looks safe enough.

Tested with a modified version of Agama that sets the new setting to :none. Works as expected.

coveralls commented 9 months ago

Coverage Status

coverage: 97.767% (+0.008%) from 97.759% when pulling dbfbca9eafb1e7f1c9d41c6712fbae6388458a15 on ancorgs:swap_reuse into c7d9c4acf6c7011f8d02891791629d61e424afa0 on yast:master.

yast-bot commented 9 months ago

:heavy_check_mark: Internal Jenkins job #1141 successfully finished :heavy_check_mark: Created OBS submit request #1119179