Bug 1894651

Summary: storage: omitted parameters on existing pool/volume is interpreted as "use the default"
Product: Red Hat Enterprise Linux 8 Reporter: David Lehman <dlehman>
Component: rhel-system-rolesAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Lin Li <lilin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: cwei, djez, lilin, ovasik, pcahyna, rmeggins
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard: role:storage
Fixed In Version: rhel-system-roles-1.0.0-28.el8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 16:02:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Lehman 2020-11-04 17:13:47 UTC
Description of problem:
When some parameters are omitted in the specification of a pool/volume that already exists on disk, the pool/volume will be modified to reflect the role's default for those settings. Most users will not expect this.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. create a pool or volume with any non-role-default setting
2. run the role w/o specifying the parameter corresponding to that setting


Actual results:
The pool/volume will have been modified to the role default for the omitted setting.

Expected results:
For existing pool/volume, omitted parameter should be interpreted as "leave that setting as it is".

Additional info:
For a non-existing pool/volume, it should be interpreted as "use the default".

Comment 1 Lin Li 2021-01-13 08:01:42 UTC
Hi Pavel,
I designed 4 cases for the bug. Is it enough? Is my understanding correct? If yes, I will set ITM to 16, is it ok?
Thanks!
case 1:
1, create a pool which is an existing pool with any non-role-default setting
2, run the role w/o specifying the parameter corresponding to that setting
3, omitted parameter should be interpreted as "leave that setting as it is"

case 2:
1, create a volume which is an existing volume with any non-role-default setting
2, run the role w/o specifying the parameter corresponding to that setting
3, omitted parameter should be interpreted as "leave that setting as it is"

case 3:
1, create a pool which is a non-existing pool with any non-role-default setting
2, run the role w/o specifying the parameter corresponding to that setting
3, it should be interpreted as "use the default"

case 4:
1, create a volume which is a non-existing pool with any non-role-default setting
2, run the role w/o specifying the parameter corresponding to that setting
3, it should be interpreted as "use the default"

Comment 2 Lin Li 2021-01-14 13:46:53 UTC
I will set ITM to 14 if 16 is too late.

Comment 3 David Lehman 2021-01-26 13:25:59 UTC
The proposed cases look good to me. There are several in the upstream pull request along the same lines.

Comment 4 Lin Li 2021-02-03 02:18:51 UTC
Hi David,
Could you tell me when the patch is ready? I change ITM to 16. Is it ok?

Comment 6 Lin Li 2021-02-16 14:47:24 UTC
Hi David,
I remember you said that there is a playbook for this bug. May I ask which palybook can verify this bug? 
Thanks!

Comment 7 David Lehman 2021-02-16 16:14:35 UTC
The verification is spread across several playbooks:

  tests_change_fs.yml
  tests_create_disk_then_remove.yml
  tests_create_partition_volume_then_remove.yml
  tests_luks.yml
  tests_luks_pool.yml
  tests_raid_pool_options.yml
  tests_raid_volume_options.yml
 
Each has roughly one test to verify that the role preserves non-default settings on pre-existing pools and volumes. To identify the specific tests you can view the patch:

  https://github.com/linux-system-roles/storage/pull/59/files


If it will help I can create a new/separate playbook that implements the suggested test battery from comment 1.

Comment 8 Lin Li 2021-02-16 16:53:22 UTC
Thanks David!
I am running these playbooks. I will update test result after I finish my testing.

Comment 29 errata-xmlrpc 2021-05-18 16:02:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1909