Bug 2066880
Summary: | storage - support for adding/removing disks to/from storage pools | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Rich Megginson <rmeggins> | |
Component: | rhel-system-roles | Assignee: | Rich Megginson <rmeggins> | |
Status: | CLOSED ERRATA | QA Contact: | Lin Li <lilin> | |
Severity: | unspecified | Docs Contact: | Gabi Fialová <gfialova> | |
Priority: | unspecified | |||
Version: | 8.7 | CC: | gfialova, lilin, nhosoi, spetrosi, vtrefny | |
Target Milestone: | rc | Keywords: | Triaged | |
Target Release: | 8.7 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | role:storage | |||
Fixed In Version: | rhel-system-roles-1.20.0-1.el8 | Doc Type: | Enhancement | |
Doc Text: |
.Support for managing pool members in the `storage` RHEL System Role
The `storage` RHEL System Role can now add or remove disks from existing LVM pools without removing the pool first. New disks can be added to the pool to increase the pool capacity and disks that are currently part of the pool can be freed for another use.
|
Story Points: | --- | |
Clone Of: | ||||
: | 2072742 (view as bug list) | Environment: | ||
Last Closed: | 2022-11-08 09:40:52 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: | ||||
Bug Depends On: | 2078801, 2079220, 2081276 | |||
Bug Blocks: | 2072742 |
Description
Rich Megginson
2022-03-22 16:39:20 UTC
Hi Vojtech, Could you kindly tell me how to verify the bug? Thanks in advance! (In reply to Lin Li from comment #1) > Hi Vojtech, > Could you kindly tell me how to verify the bug? > Thanks in advance! The bug has not been fixed yet - and I would expect there to be an automated test included with the role. The BZ will be move to state POST once there is a fix to test. (In reply to Rich Megginson from comment #2) > (In reply to Lin Li from comment #1) > > Hi Vojtech, > > Could you kindly tell me how to verify the bug? > > Thanks in advance! > > The bug has not been fixed yet - and I would expect there to be an automated > test included with the role. The BZ will be move to state POST once there > is a fix to test. Hi Rich, Could you tell me which case can verify the bug? Thanks in advance! (In reply to Lin Li from comment #3) > (In reply to Rich Megginson from comment #2) > > (In reply to Lin Li from comment #1) > > > Hi Vojtech, > > > Could you kindly tell me how to verify the bug? > > > Thanks in advance! > > > > The bug has not been fixed yet - and I would expect there to be an automated > > test included with the role. The BZ will be move to state POST once there > > is a fix to test. > > Hi Rich, > Could you tell me which case can verify the bug? > Thanks in advance! tests/tests_lvm_pool_members.yml request for pre-verify - scratch build is A yum repository for the scratch build of rhel-system-roles-1.19.3-0.2.el8 (task 46159506) is available at: http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/ You can install the rpms locally by putting this .repo file in your /etc/yum.repos.d/ directory: http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/rhel-system-roles-1.19.3-0.2.el8-scratch.repo RPMs and build logs can be found in the following locations: http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/noarch/ The full list of available rpms is: http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/noarch/rhel-system-roles-1.19.3-0.2.el8.src.rpm http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/noarch/rhel-system-roles-1.19.3-0.2.el8.noarch.rpm Hi Rich, I hit below error when running tests/tests_lvm_pool_members.yml. Could you login storageqe-05.sqe.lab.eng.bos.redhat.com/redhat to check it? Thanks a lot! [root@storageqe-05 rhel-system-roles.storage]# ansible-playbook tests/tests_lvm_pool_members.yml TASK [Collect LUKS info for this member] ***************************************************************************************** fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "cryptsetup luksDump /dev/sdr1", "msg": "[Errno 2] No such file or directory: b'cryptsetup': b'cryptsetup'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} PLAY RECAP *********************************************************************************************************************** 127.0.0.1 : ok=373 changed=15 unreachable=0 failed=1 skipped=289 rescued=0 ignored=0 (In reply to Lin Li from comment #6) > Hi Rich, > I hit below error when running tests/tests_lvm_pool_members.yml. > Could you login storageqe-05.sqe.lab.eng.bos.redhat.com/redhat to check it? > Thanks a lot! > > [root@storageqe-05 rhel-system-roles.storage]# ansible-playbook > tests/tests_lvm_pool_members.yml > TASK [Collect LUKS info for this member] > ***************************************************************************** > ************ > fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "cryptsetup > luksDump /dev/sdr1", "msg": "[Errno 2] No such file or directory: > b'cryptsetup': b'cryptsetup'", "rc": 2, "stderr": "", "stderr_lines": [], > "stdout": "", "stdout_lines": []} > > PLAY RECAP > ***************************************************************************** > ****************************************** > 127.0.0.1 : ok=373 changed=15 unreachable=0 failed=1 > skipped=289 rescued=0 ignored=0 Which test is this? basic-smoke-test or Upstream-testsuite? Is this rhel 8.6 or rhel 8.7? (In reply to Rich Megginson from comment #7) > (In reply to Lin Li from comment #6) > > Hi Rich, > > I hit below error when running tests/tests_lvm_pool_members.yml. > > Could you login storageqe-05.sqe.lab.eng.bos.redhat.com/redhat to check it? > > Thanks a lot! > > > > [root@storageqe-05 rhel-system-roles.storage]# ansible-playbook > > tests/tests_lvm_pool_members.yml > > TASK [Collect LUKS info for this member] > > ***************************************************************************** > > ************ > > fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "cryptsetup > > luksDump /dev/sdr1", "msg": "[Errno 2] No such file or directory: > > b'cryptsetup': b'cryptsetup'", "rc": 2, "stderr": "", "stderr_lines": [], > > "stdout": "", "stdout_lines": []} > > > > PLAY RECAP > > ***************************************************************************** > > ****************************************** > > 127.0.0.1 : ok=373 changed=15 unreachable=0 failed=1 > > skipped=289 rescued=0 ignored=0 > > Which test is this? basic-smoke-test or Upstream-testsuite? Is this rhel > 8.6 or rhel 8.7? DISTRO=RHEL-8.7.0-20220625.0 wget http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.19.3/0.2.el8/noarch/rhel-system-roles-1.19.3-0.2.el8.noarch.rpm rpm -ivh rhel-system-roles-1.19.3-0.2.el8.noarch.rpm cd /usr/share/ansible/roles/rhel-system-roles.storage ansible-playbook tests/tests_lvm_pool_members.yml (In reply to Lin Li from comment #6) > fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "cryptsetup > luksDump /dev/sdr1", "msg": "[Errno 2] No such file or directory: > b'cryptsetup': b'cryptsetup'", "rc": 2, "stderr": "", "stderr_lines": [], > "stdout": "", "stdout_lines": []} > You need to install cryptsetup. We use it in tests to verify the role result and it's not used by the role (or blivet) directly so it isn't installed (blivet uses libcryptsetup). We should probably add cryptsetup to some list of test dependencies. I installed cryptsetup. The below error happened. Could you tell me why? fatal: [127.0.0.1]: FAILED! => {"actions": [], "changed": false, "crypts": [], "leaves": [], "mounts": [], "msg": "encrypted pool 'foo' missing key/password", "packages": [], "pools": [], "volumes": []} TASK [rhel-system-roles.storage : failed message] ******************************************************************************** fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": {"actions": [], "changed": false, "crypts": [], "failed": true, "invocation": {"module_args": {"disklabel_type": null, "diskvolume_mkfs_option_map": {}, "packages_only": false, "pool_defaults": {"disks": [], "encryption": false, "encryption_cipher": null, "encryption_key": null, "encryption_key_size": null, "encryption_luks_version": null, "encryption_password": null, "raid_chunk_size": null, "raid_device_count": null, "raid_level": null, "raid_metadata_version": null, "raid_spare_count": null, "state": "present", "type": "lvm", "volumes": []}, "pools": [{"disks": ["sds", "sdt", "sdu", "sdv", "sdw", "sdx", "sdy", "sdz"], "encryption": true, "encryption_cipher": null, "encryption_key": null, "encryption_key_size": 0, "encryption_luks_version": "luks2", "encryption_password": null, "name": "foo", "raid_chunk_size": null, "raid_device_count": null, "raid_level": null, "raid_metadata_version": null, "raid_spare_count": null, "state": "present", "type": "lvm", "volumes": []}], "safe_mode": false, "use_partitions": true, "volume_defaults": {"cache_devices": [], "cache_mode": null, "cache_size": 0, "cached": false, "compression": null, "deduplication": null, "disks": [], "encryption": false, "encryption_cipher": null, "encryption_key": null, "encryption_key_size": null, "encryption_luks_version": null, "encryption_password": null, "fs_create_options": "", "fs_label": "", "fs_overwrite_existing": true, "fs_type": "xfs", "mount_check": 0, "mount_device_identifier": "uuid", "mount_options": "defaults", "mount_passno": 0, "mount_point": "", "raid_chunk_size": null, "raid_device_count": null, "raid_level": null, "raid_metadata_version": null, "raid_spare_count": null, "size": 0, "state": "present", "thin": null, "thin_pool_name": null, "thin_pool_size": null, "type": "lvm", "vdo_pool_size": null}, "volumes": []}}, "leaves": [], "mounts": [], "msg": "encrypted pool 'foo' missing key/password", "packages": [], "pools": [], "volumes": []}} TASK [rhel-system-roles.storage : Unmask the systemd cryptsetup services] ******************************************************** PLAY RECAP *********************************************************************************************************************** 127.0.0.1 : ok=34 changed=0 unreachable=0 failed=1 skipped=26 rescued=1 ignored=0 I run the tests on the same machine and I think the issue was caused by the previously failed run from comment #6 -- it left behind the encrypted VG "foo" (the test unfortunately doesn't clean after itself when it fails) so when running the test case again it failed because the first step is "Create volume group 'foo' with 3 PVs", but because the VG already exists this translates to "add 2 more encrypted PVs to the existing VG" and at this step we don't provide the encryption passphrase so it fails. (In reply to Vojtech Trefny from comment #11) > I run the tests on the same machine and I think the issue was caused by the > previously failed run from comment #6 -- it left behind the encrypted VG > "foo" (the test unfortunately doesn't clean after itself when it fails) so > when running the test case again it failed because the first step is "Create > volume group 'foo' with 3 PVs", but because the VG already exists this > translates to "add 2 more encrypted PVs to the existing VG" and at this step > we don't provide the encryption passphrase so it fails. I have a fix for ensuring cryptsetup is present for the tests, and it makes the test pass on 8.7. However, I am unable to run the test tests/tests_lvm_pool_members.yml on rhel 8.6 or centos-9: TASK [linux-system-roles.storage : manage the pools and volumes to match the specified state] *** task path: /home/rmeggins/linux-system-roles/storage/tests/roles/linux-system-roles.storage/tasks/main-blivet.yml:77 Monday 27 June 2022 10:00:34 -0600 (0:00:00.031) 0:01:55.009 *********** fatal: [/home/rmeggins/.cache/linux-system-roles/centos-9.qcow2]: FAILED! => { "actions": [], "changed": false, "crypts": [], "leaves": [], "mounts": [], "packages": [], "pools": [], "volumes": [] } MSG: failed to remove disk 'sda1' from pool 'foo': 'str' object has no attribute 'path' (In reply to Rich Megginson from comment #12) > tests/tests_lvm_pool_members.yml on rhel 8.6 or centos-9: > > failed to remove disk 'sda1' from pool 'foo': 'str' object has no attribute > 'path' Oh, I missed that, sorry. This is fixed in blivet on 8.7 and 9.1: https://bugzilla.redhat.com/show_bug.cgi?id=2079220 and https://bugzilla.redhat.com/show_bug.cgi?id=2079221 but not on older versions of RHEL. So our options are to either skip the entire test case with older blivet or to ask for zstream for these bugs for 8.6/9.0. We already skip part of the test with older blivet so that might be the easiest way. (In reply to Vojtech Trefny from comment #13) > (In reply to Rich Megginson from comment #12) > > tests/tests_lvm_pool_members.yml on rhel 8.6 or centos-9: > > > > failed to remove disk 'sda1' from pool 'foo': 'str' object has no attribute > > 'path' > > Oh, I missed that, sorry. This is fixed in blivet on 8.7 and 9.1: > https://bugzilla.redhat.com/show_bug.cgi?id=2079220 and > https://bugzilla.redhat.com/show_bug.cgi?id=2079221 but not on older > versions of RHEL. So our options are to either skip the entire test case > with older blivet or to ask for zstream for these bugs for 8.6/9.0. We > already skip part of the test with older blivet so that might be the easiest > way. I think we should skip the test case on older versions of blivet. But tests_lvm_pool_members.yml already has this? https://github.com/linux-system-roles/storage/blob/master/tests/tests_lvm_pool_members.yml#L251 - is that not working, or we need it somewhere else? (In reply to Rich Megginson from comment #14) > (In reply to Vojtech Trefny from comment #13) > > (In reply to Rich Megginson from comment #12) > > > tests/tests_lvm_pool_members.yml on rhel 8.6 or centos-9: > > > > > > failed to remove disk 'sda1' from pool 'foo': 'str' object has no attribute > > > 'path' > > > > Oh, I missed that, sorry. This is fixed in blivet on 8.7 and 9.1: > > https://bugzilla.redhat.com/show_bug.cgi?id=2079220 and > > https://bugzilla.redhat.com/show_bug.cgi?id=2079221 but not on older > > versions of RHEL. So our options are to either skip the entire test case > > with older blivet or to ask for zstream for these bugs for 8.6/9.0. We > > already skip part of the test with older blivet so that might be the easiest > > way. > > I think we should skip the test case on older versions of blivet. But > tests_lvm_pool_members.yml already has this? > https://github.com/linux-system-roles/storage/blob/master/tests/ > tests_lvm_pool_members.yml#L251 - is that not working, or we need it > somewhere else? Thanks for the patch Vojtech. merged. Verified on rhel-system-roles-1.19.3-1.el8 [root@storageqe-05 tests]# ansible-playbook tests_lvm_pool_members.yml PLAY RECAP *********************************************************************************************************************** 127.0.0.1 : ok=693 changed=37 unreachable=0 failed=0 skipped=500 rescued=0 ignored=0 Move to verified. 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-2022:7568 |