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.
Bug 1990793 - [storage role] Get syntax errors in tests_lvm_errors.yml
Summary: [storage role] Get syntax errors in tests_lvm_errors.yml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 8.5
Assignee: Rich Megginson
QA Contact: guazhang@redhat.com
URL:
Whiteboard: role:storage
Depends On:
Blocks: 1991142
TreeView+ depends on / blocked
 
Reported: 2021-08-06 09:03 UTC by guazhang@redhat.com
Modified: 2021-11-09 20:39 UTC (History)
7 users (show)

Fixed In Version: rhel-system-roles-1.7.1-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1991142 (view as bug list)
Environment:
Last Closed: 2021-11-09 17:46:07 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles storage pull 220 0 None None None 2021-08-07 15:39:46 UTC
Red Hat Issue Tracker RHELPLAN-92628 0 None None None 2021-08-06 09:07:44 UTC
Red Hat Product Errata RHBA-2021:4159 0 None None None 2021-11-09 17:46:25 UTC

Description guazhang@redhat.com 2021-08-06 09:03:36 UTC
Description of problem:
Storage role regression testing failed, please have a look if hit a bug.

Version-Release number of selected component (if applicable):
rhel-system-roles-1.5.1-1.el8.noarch

How reproducible:


Steps to Reproduce:
1. ansible-playbook -vv -i host tests_lvm_errors.yml
2.
3.



TASK [rhel-system-roles.storage : get required packages] *******************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:18
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: [{'name': 'foo', 'disks': '{{ unused_disks[0] }}', 'volumes': [{'name': 'test1', 'size': '{{ volume_size }}', 'mount_point': '{{ mount_location1 }}'}]}]: 'volume_size' is undefined\n\nThe error appears to be in '/usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml': line 18, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: get required packages\n  ^ here\n"}



task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:57
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute '_device'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1530, in <module>\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1526, in main\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1488, in run_module\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1181, in manage_volume\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 521, in manage\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 639, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}



TASK [rhel-system-roles.storage : failed message] **************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:71
fatal: [localhost]: FAILED! => {"changed": false, "msg": {"changed": false, "exception": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1530, in <module>\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1526, in main\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1488, in run_module\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1181, in manage_volume\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 521, in manage\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 639, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628238291.2594755-244172-85072390066614/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1530, in <module>\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1526, in main\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1488, in run_module\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1181, in manage_volume\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 521, in manage\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_thpg5b7b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 639, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}

Comment 1 Rich Megginson 2021-08-06 14:33:42 UTC
What is your controller platform (el8? el8.5?) and what version of ansible are you using - 2.8 or 2.9?

I see this message in the output from running my test on f34 using ansible 2.9:

The task includes an option with an undefined variable. The error was: [{'name': 'foo', 'disks': '{{ unused_disks[0] }}', 'volumes': [{'name': 'test1', 'size': '{{ volume_size }}', 'mount_point': '{{ mount_location1 }}'}]}]: 'volume_size' is undefined

The error appears to be in '/home/rmeggins/linux-system-roles/storage/tasks/main-blivet.yml': line 18, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

but the "rescue:" block handles this 

So I'm not sure how this error "leaked" out of the rescue block - that's really strange

This is a real bug and I am going to fix it - but I want to know why this wasn't found by CI testing

Comment 2 guazhang@redhat.com 2021-08-07 13:13:36 UTC
Hi,

# ansible --version
ansible 2.9.23
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Jul 14 2021, 07:24:37) [GCC 8.5.0 20210514 (Red Hat 8.5.0-2)]

[root@storageqe-90 ~]# uname -a
Linux storageqe-90.lab.eng.brq.redhat.com 4.18.0-326.el8.x86_64 #1 SMP Tue Jul 27 20:07:27 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux   
[root@storageqe-90 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 Beta (Ootpa)
DISTRO=RHEL-8.5.0-20210730.n.0

I test it by my physics server and hit it every time, the error is very easy to reproduce.

Comment 5 guazhang@redhat.com 2021-08-10 11:52:37 UTC
Hi,

rhel-system-roles-1.7.5-99.el8.noarch

fixed the get required packages task error.

TASK [rhel-system-roles.storage : get required packages] *******************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:18
ok: [localhost] => {"actions": [], "changed": false, "crypts": [], "leaves": [], "mounts": [], "packages": [], "pools": [], "volumes": []}



but still hit other errors, or the error is expected ?


TASK [rhel-system-roles.storage : Mask the systemd cryptsetup services] ****************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:51


the task in tests_lvm_errors.yaml 
TASK [Try to create LVM volume from outside of any pool.] ******************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/tests_lvm_errors.yml:157

TASK [rhel-system-roles.storage : manage the pools and volumes to match the specified state] *******************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:57
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute '_device'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1552, in <module>\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1548, in main\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1510, in run_module\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1203, in manage_volume\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 536, in manage\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

TASK [rhel-system-roles.storage : failed message] **************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:71
fatal: [localhost]: FAILED! => {"changed": false, "msg": {"changed": false, "exception": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1552, in <module>\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1548, in main\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1510, in run_module\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1203, in manage_volume\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 536, in manage\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/AnsiballZ_blivet.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1552, in <module>\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1548, in main\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1510, in run_module\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1203, in manage_volume\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 536, in manage\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 348, in _look_up_device\n  File \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType' object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}

Comment 6 Rich Megginson 2021-08-10 14:58:56 UTC
(In reply to guazhang from comment #5)
> Hi,
> 
> rhel-system-roles-1.7.5-99.el8.noarch
> 
> fixed the get required packages task error.
> 
> TASK [rhel-system-roles.storage : get required packages]
> *****************************************************************************
> **
> task path:
> /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:18
> ok: [localhost] => {"actions": [], "changed": false, "crypts": [], "leaves":
> [], "mounts": [], "packages": [], "pools": [], "volumes": []}
> 
> 
> 
> but still hit other errors, or the error is expected ?

Yes, and no.

Yes, there is an error expected here.  The point of the test is to pass in various bad parameters to the storage role to see that it raises errors.

No, the problem is that the error being raised by the storage role is not the expected error.  I will investigate.

Another issue is a general observation about the way Ansible does "exception handling".  There is unfortunately no way to completely hide the errors from the Ansible output when using the block/rescue style.  The error is always printed to the log with a BIG BOLD "FAILED!" error message, which is alarming to users, even though the error is caught and handled appropriately.  I'm not sure if there is a way around this unless we go to a completely different way to handle such errors in Ansible.

The only way to really tell, when you are looking at an Ansible log, to see if the error is a "real" error or not, is to look at the play summary printed at the end.  For example:

PLAY RECAP *********************************************************************
hostname : ok=193  changed=4    unreachable=0    failed=10   skipped=94   rescued=10   ignored=0

You can see that there were 10 failed tasks, but 10 rescued, meaning all of the errors were handled.

You can also tell that the exit code of the ansible-playbook command is 0 for success, or non-zero for failure.


> 
> 
> TASK [rhel-system-roles.storage : Mask the systemd cryptsetup services]
> ****************************************************************
> task path:
> /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:51
> 
> 
> the task in tests_lvm_errors.yaml 
> TASK [Try to create LVM volume from outside of any pool.]
> *****************************************************************************
> *
> task path:
> /usr/share/ansible/roles/rhel-system-roles.storage/tests/tests_lvm_errors.
> yml:157
> 
> TASK [rhel-system-roles.storage : manage the pools and volumes to match the
> specified state] *******************************************
> task path:
> /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:57
> An exception occurred during task execution. To see the full traceback, use
> -vvv. The error was: AttributeError: 'NoneType' object has no attribute
> '_device'
> fatal: [localhost]: FAILED! => {"changed": false, "module_stderr":
> "Traceback (most recent call last):\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n   
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 40, in invoke_module\n   
> runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None,
> run_name='__main__', alter_sys=True)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return
> _run_module_code(code, init_globals, run_name, mod_spec)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n   
> mod_name, mod_spec, pkg_name, script_name)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code,
> run_globals)\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1552, in <module>\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1548, in main\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1510, in run_module\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1203, in manage_volume\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 536, in manage\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 348, in _look_up_device\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType'
> object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE
> FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
> 
> TASK [rhel-system-roles.storage : failed message]
> *****************************************************************************
> *********
> task path:
> /usr/share/ansible/roles/rhel-system-roles.storage/tasks/main-blivet.yml:71
> fatal: [localhost]: FAILED! => {"changed": false, "msg": {"changed": false,
> "exception": "Traceback (most recent call last):\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n   
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 40, in invoke_module\n   
> runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None,
> run_name='__main__', alter_sys=True)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return
> _run_module_code(code, init_globals, run_name, mod_spec)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n   
> mod_name, mod_spec, pkg_name, script_name)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code,
> run_globals)\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1552, in <module>\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1548, in main\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1510, in run_module\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1203, in manage_volume\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 536, in manage\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 348, in _look_up_device\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType'
> object has no attribute '_device'\n", "failed": true, "module_stderr":
> "Traceback (most recent call last):\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n   
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File
> \"/root/.ansible/tmp/ansible-tmp-1628571143.4451976-262603-185620659085404/
> AnsiballZ_blivet.py\", line 40, in invoke_module\n   
> runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None,
> run_name='__main__', alter_sys=True)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return
> _run_module_code(code, init_globals, run_name, mod_spec)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n   
> mod_name, mod_spec, pkg_name, script_name)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code,
> run_globals)\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1552, in <module>\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1548, in main\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1510, in run_module\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1203, in manage_volume\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 536, in manage\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 348, in _look_up_device\n  File
> \"/tmp/ansible_blivet_payload_qd02o675/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 658, in _get_device_id\nAttributeError: 'NoneType'
> object has no attribute '_device'\n", "module_stdout": "", "msg": "MODULE
> FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}

Comment 10 guazhang@redhat.com 2021-08-19 14:27:16 UTC
Hi,

the package rhel-system-roles-1.7.1-1.el8 fixed the issue.

Comment 14 guazhang@redhat.com 2021-08-20 03:06:03 UTC
Move to verified since #10

Comment 16 errata-xmlrpc 2021-11-09 17:46:07 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/RHBA-2021:4159


Note You need to log in before you can comment on or make changes to this bug.