Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This is a problem in the test. The test is trying to create a "too large" volume and checks whether the role properly fails and reports the error. "Too large" is defined as 500 GB. The problem is, you have a 931.5G-sized disk, so the role behaves properly and does not fail.
Relevant line:
https://github.com/linux-system-roles/storage/blob/359a1cfd985f8c57dc3a6daee124a63c141124cd/tests/tests_lvm_errors.yml#L11
The test assumes that the test system will prepare suitable disks, so it expects disks of a specific size. It is therefore unprepared to run on an arbitrary machine.
(Thank you for the report, good catch!)
(In reply to Pavel Cahyna from comment #5)
> This is a problem in the test. The test is trying to create a "too large"
> volume and checks whether the role properly fails and reports the error.
> "Too large" is defined as 500 GB. The problem is, you have a 931.5G-sized
> disk, so the role behaves properly and does not fail.
>
Yeah, it works now after I change the size to 1024 GB which larger than the disks, thanks.
Thanks
Yi
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-2020:4809
Description of problem: storage role tests: tests_lvm_errors.yml failed Version-Release number of selected component (if applicable): rhel-system-roles-1.0-10.el8_1.noarch ansible-2.9.6-1.el8ae.noarch 4.18.0-193.el8.x86_64 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: [root@storageqe-62 rhel-system-roles.storage]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 279.4G 0 disk ├─sda1 8:1 0 600M 0 part /boot/efi ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 277.8G 0 part ├─rhel_storageqe--62-root 253:0 0 50G 0 lvm / ├─rhel_storageqe--62-swap 253:1 0 7.9G 0 lvm [SWAP] └─rhel_storageqe--62-home 253:2 0 220G 0 lvm /home sdb 8:16 0 279.4G 0 disk sdc 8:32 0 186.3G 0 disk sdd 8:48 0 111.8G 0 disk sde 8:64 0 111.8G 0 disk sdf 8:80 0 931.5G 0 disk sdg 8:96 0 931.5G 0 disk sdh 8:112 0 931.5G 0 disk sdi 8:128 0 931.5G 0 disk sdj 8:144 0 931.5G 0 disk sdk 8:160 0 279.4G 0 disk sdl 8:176 0 279.4G 0 disk nvme0n1 259:0 0 745.2G 0 disk [root@storageqe-62 rhel-system-roles.storage]# ansible-playbook --flush-cache -vvvv -i inventory tests/tests_lvm_errors.yml ---snip--- TASK [storage : manage the pools and volumes to match the specified state] ********************************************************************************************************************************************************************************** task path: /root/storage/tasks/main-blivet.yml:104 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618 `" && echo ansible-tmp-1585819459.4557722-157445432802618="` echo /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618 `" ) && sleep 0' Using module file /root/storage/library/blivet.py <localhost> PUT /root/.ansible/tmp/ansible-local-21262m0s0kyr2/tmpw3cj6ok3 TO /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618/AnsiballZ_blivet.py <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618/ /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618/AnsiballZ_blivet.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618/AnsiballZ_blivet.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1585819459.4557722-157445432802618/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => { "actions": [ { "action": "create format", "device": "/dev/sdi", "fs_type": "lvmpv" }, { "action": "create device", "device": "/dev/foo", "fs_type": null }, { "action": "create device", "device": "/dev/mapper/foo-test1", "fs_type": null }, { "action": "create format", "device": "/dev/mapper/foo-test1", "fs_type": "xfs" } ], "changed": true, "invocation": { "module_args": { "disklabel_type": null, "packages_only": false, "pools": [ { "disks": [ "sdi" ], "name": "foo", "state": "present", "type": "lvm", "volumes": [ { "_device": "/dev/mapper/foo-test1", "_mount_id": "/dev/mapper/foo-test1", "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": "/opt/test1", "name": "test1", "pool": "foo", "size": "500 GiB", "state": "present", "type": "lvm" } ] } ], "safe_mode": true, "use_partitions": null, "volumes": [] } }, "leaves": [ "/dev/sda1", "/dev/sda2", "/dev/mapper/rhel_storageqe--62-home", "/dev/mapper/rhel_storageqe--62-root", "/dev/mapper/rhel_storageqe--62-swap", "/dev/sdb", "/dev/sdh", "/dev/sdj", "/dev/sdc", "/dev/sdk", "/dev/sdl", "/dev/sdd", "/dev/sde", "/dev/sdf", "/dev/sdg", "/dev/nvme0n1", "/dev/mapper/foo-test1" ], "mounts": [ { "dump": 0, "fstype": "xfs", "opts": "defaults", "passno": 0, "path": "/opt/test1", "src": "/dev/mapper/foo-test1", "state": "mounted" } ], "packages": [ "e2fsprogs", "dosfstools", "xfsprogs", "lvm2" ], "pools": [ { "disks": [ "sdi" ], "name": "foo", "state": "present", "type": "lvm", "volumes": [ { "_device": "/dev/mapper/foo-test1", "_mount_id": "/dev/mapper/foo-test1", "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": "/opt/test1", "name": "test1", "pool": "foo", "size": "500 GiB", "state": "present", "type": "lvm" } ] } ], "volumes": [] } TASK [storage : debug] ************************************************************************************************************************************************************************************************************************************** task path: /root/storage/tasks/main-blivet.yml:113 ok: [localhost] => { "blivet_output": { "actions": [ { "action": "create format", "device": "/dev/sdi", "fs_type": "lvmpv" }, { "action": "create device", "device": "/dev/foo", "fs_type": null }, { "action": "create device", "device": "/dev/mapper/foo-test1", "fs_type": null }, { "action": "create format", "device": "/dev/mapper/foo-test1", "fs_type": "xfs" } ], "changed": true, "failed": false, "leaves": [ "/dev/sda1", "/dev/sda2", "/dev/mapper/rhel_storageqe--62-home", "/dev/mapper/rhel_storageqe--62-root", "/dev/mapper/rhel_storageqe--62-swap", "/dev/sdb", "/dev/sdh", "/dev/sdj", "/dev/sdc", "/dev/sdk", "/dev/sdl", "/dev/sdd", "/dev/sde", "/dev/sdf", "/dev/sdg", "/dev/nvme0n1", "/dev/mapper/foo-test1" ], "mounts": [ { "dump": 0, "fstype": "xfs", "opts": "defaults", "passno": 0, "path": "/opt/test1", "src": "/dev/mapper/foo-test1", "state": "mounted" } ], "packages": [ "e2fsprogs", "dosfstools", "xfsprogs", "lvm2" ], "pools": [ { "disks": [ "sdi" ], "name": "foo", "state": "present", "type": "lvm", "volumes": [ { "_device": "/dev/mapper/foo-test1", "_mount_id": "/dev/mapper/foo-test1", "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": "/opt/test1", "name": "test1", "pool": "foo", "size": "500 GiB", "state": "present", "type": "lvm" } ] } ], "volumes": [] } } TASK [storage : set the list of pools for test verification] ************************************************************************************************************************************************************************************************ task path: /root/storage/tasks/main-blivet.yml:116 ok: [localhost] => { "ansible_facts": { "_storage_pools_list": [ { "disks": [ "sdi" ], "name": "foo", "state": "present", "type": "lvm", "volumes": [ { "_device": "/dev/mapper/foo-test1", "_mount_id": "/dev/mapper/foo-test1", "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": "/opt/test1", "name": "test1", "pool": "foo", "size": "500 GiB", "state": "present", "type": "lvm" } ] } ] }, "changed": false } TASK [storage : set the list of volumes for test verification] ********************************************************************************************************************************************************************************************** task path: /root/storage/tasks/main-blivet.yml:120 ok: [localhost] => { "ansible_facts": { "_storage_volumes_list": [] }, "changed": false } TASK [storage : manage mounts to match the specified state] ************************************************************************************************************************************************************************************************* task path: /root/storage/tasks/main-blivet.yml:132 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513 `" && echo ansible-tmp-1585819470.059062-172243525843513="` echo /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513 `" ) && sleep 0' Using module file /usr/lib/python3.6/site-packages/ansible/modules/system/mount.py <localhost> PUT /root/.ansible/tmp/ansible-local-21262m0s0kyr2/tmp7puoit2e TO /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513/AnsiballZ_mount.py <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513/ /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513/AnsiballZ_mount.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513/AnsiballZ_mount.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1585819470.059062-172243525843513/ > /dev/null 2>&1 && sleep 0' changed: [localhost] => (item={'src': '/dev/mapper/foo-test1', 'path': '/opt/test1', 'fstype': 'xfs', 'opts': 'defaults', 'dump': 0, 'passno': 0, 'state': 'mounted'}) => { "ansible_loop_var": "mount_info", "changed": true, "dump": "0", "fstab": "/etc/fstab", "fstype": "xfs", "invocation": { "module_args": { "backup": false, "boot": true, "dump": null, "fstab": null, "fstype": "xfs", "opts": "defaults", "passno": null, "path": "/opt/test1", "src": "/dev/mapper/foo-test1", "state": "mounted" } }, "mount_info": { "dump": 0, "fstype": "xfs", "opts": "defaults", "passno": 0, "path": "/opt/test1", "src": "/dev/mapper/foo-test1", "state": "mounted" }, "name": "/opt/test1", "opts": "defaults", "passno": "0", "src": "/dev/mapper/foo-test1" } TASK [storage : tell systemd to refresh its view of /etc/fstab] ********************************************************************************************************************************************************************************************* task path: /root/storage/tasks/main-blivet.yml:143 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177 `" && echo ansible-tmp-1585819471.3370225-107569943746177="` echo /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177 `" ) && sleep 0' Using module file /usr/lib/python3.6/site-packages/ansible/modules/system/systemd.py <localhost> PUT /root/.ansible/tmp/ansible-local-21262m0s0kyr2/tmpdudxd1bu TO /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177/AnsiballZ_systemd.py <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177/ /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177/AnsiballZ_systemd.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177/AnsiballZ_systemd.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1585819471.3370225-107569943746177/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "daemon_reexec": false, "daemon_reload": true, "enabled": null, "force": null, "masked": null, "name": null, "no_block": false, "scope": null, "state": null, "user": null } }, "name": null, "status": {} } TASK [storage : Update facts] ******************************************************************************************************************************************************************************************************************************* task path: /root/storage/tasks/main-blivet.yml:153 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154 `" && echo ansible-tmp-1585819473.0919645-11696771395154="` echo /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154 `" ) && sleep 0' Using module file /usr/lib/python3.6/site-packages/ansible/modules/system/setup.py <localhost> PUT /root/.ansible/tmp/ansible-local-21262m0s0kyr2/tmpdnvvw3sa TO /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154/AnsiballZ_setup.py <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154/ /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154/AnsiballZ_setup.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154/AnsiballZ_setup.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1585819473.0919645-11696771395154/ > /dev/null 2>&1 && sleep 0' ok: [localhost] TASK [UNREACH] ********************************************************************************************************************************************************************************************************************************************** task path: /root/storage/tests/tests_lvm_errors.yml:113 fatal: [localhost]: FAILED! => { "changed": false, "msg": "this should be unreachable" } TASK [Check that we failed in the role] ********************************************************************************************************************************************************************************************************************* task path: /root/storage/tests/tests_lvm_errors.yml:118 fatal: [localhost]: FAILED! => { "assertion": "ansible_failed_task.name != 'UNREACH'", "changed": false, "evaluated_to": false, "msg": "Role has not failed when it should have" } PLAY RECAP ************************************************************************************************************************************************************************************************************************************************** localhost : ok=70 changed=2 unreachable=0 failed=1 skipped=16 rescued=3 ignored=0 [root@storageqe-62 rhel-system-roles.storage]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 279.4G 0 disk ├─sda1 8:1 0 600M 0 part /boot/efi ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 277.8G 0 part ├─rhel_storageqe--62-root 253:0 0 50G 0 lvm / ├─rhel_storageqe--62-swap 253:1 0 7.9G 0 lvm [SWAP] └─rhel_storageqe--62-home 253:2 0 220G 0 lvm /home sdb 8:16 0 279.4G 0 disk sdc 8:32 0 186.3G 0 disk sdd 8:48 0 111.8G 0 disk sde 8:64 0 111.8G 0 disk sdf 8:80 0 931.5G 0 disk sdg 8:96 0 931.5G 0 disk sdh 8:112 0 931.5G 0 disk sdi 8:128 0 931.5G 0 disk └─foo-test1 253:3 0 500G 0 lvm /opt/test1 sdj 8:144 0 931.5G 0 disk sdk 8:160 0 279.4G 0 disk sdl 8:176 0 279.4G 0 disk nvme0n1 259:0 0 745.2G 0 disk