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:
:any Current behavior. For keeping compatibility in YaST.
:none Simply don’t reuse any swap. This will be used by Agama while we decide what to do.
:candidate Only reuse swaps that are in the candidate disks.
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.
coverage: 97.767% (+0.008%) from 97.759% when pulling dbfbca9eafb1e7f1c9d41c6712fbae6388458a15 on ancorgs:swap_reuse into c7d9c4acf6c7011f8d02891791629d61e424afa0 on yast:master.
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 theGuidedProposal
. It has three possible values::any
Current behavior. For keeping compatibility in YaST.:none
Simply don’t reuse any swap. This will be used by Agama while we decide what to do.:candidate
Only reuse swaps that are in the candidate disks.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.