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 1991142 - [storage role] Get syntax errors in tests_lvm_errors.yml [NEEDINFO]
Summary: [storage role] Get syntax errors in tests_lvm_errors.yml
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 9.0 Beta
Assignee: Rich Megginson
QA Contact: guazhang@redhat.com
URL:
Whiteboard: role:storage
Depends On: 1990793
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-07 15:53 UTC by Rich Megginson
Modified: 2021-12-07 22:06 UTC (History)
6 users (show)

Fixed In Version: rhel-system-roles-1.8.1-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 1990793
Environment:
Last Closed: 2021-12-07 22:04:56 UTC
Type: Bug
Target Upstream Version:
Embargoed:
rmeggins: needinfo?
rmeggins: needinfo?


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:53:47 UTC
Red Hat Issue Tracker RHELPLAN-92813 0 None None None 2021-08-08 03:57:31 UTC

Description Rich Megginson 2021-08-07 15:53:47 UTC
+++ This bug was initially created as a clone of Bug #1990793 +++

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}}

--- Additional comment from Rich Megginson on 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

--- Additional comment from guazhang on 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 3 guazhang@redhat.com 2021-08-16 04:41:55 UTC
Hi

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

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": []}


fixed the task [get required packages] error.

Comment 7 guazhang@redhat.com 2021-08-19 14:29:58 UTC
Hi,

the package  rhel-system-roles-1.8.1-1.el9 has fixed the issue. move to verified.


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