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 1854187 - storage: calltrace observed when set type: partition for storage_pools
Summary: storage: calltrace observed when set type: partition for storage_pools
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.5
Assignee: David Lehman
QA Contact: David Jež
Eliane Ramos Pereira
URL:
Whiteboard: role:storage
Depends On: 1957876
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-06 17:01 UTC by Zhang Yi
Modified: 2023-09-15 00:33 UTC (History)
5 users (show)

Fixed In Version: rhel-system-roles-1.2.2-3.el8
Doc Type: Bug Fix
Doc Text:
.`Traceback` no longer observed when set `type: partition` for `storage_pools` Previously, when setting the variable `type` as `partition` for `storage_pools` in a playbook, running this playbook would fail and indicate `traceback`. This update fixes the issue and the `Traceback` error no longer appears.
Clone Of:
Environment:
Last Closed: 2021-11-09 17:44:38 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 issues 118 0 None open storage: calltrace observed when set type: partition for storage_pools 2021-01-08 17:19:37 UTC
Github linux-system-roles storage pull 214 0 None open Capture inherited volume type in return value. 2021-05-13 22:13:44 UTC
Red Hat Product Errata RHBA-2021:4159 0 None None None 2021-11-09 17:44:53 UTC

Description Zhang Yi 2020-07-06 17:01:18 UTC
Description of problem:
storage: Traceback observed when set type: partition for storage_pools

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:



playbook:
---
- hosts: all
  become: true
  vars:
    mount_location: '/opt/test1'
    volume_group_size: '5g'
    volume_size: '4g'

  tasks:
    - include_role:
        name: storage

    - include_tasks: get_unused_disk.yml
      vars:
        min_size: "{{ volume_group_size }}"
        max_return: 3

    - name: Test for Fix key for partition pool 
      block:
        - name: Fix key for partition pool
          include_role:
            name: storage
          vars:
            storage_safe_mode: false
            storage_pools:
              - name: vg
                disks: "{{ unused_disks }}"
                type: partition
                volumes:
                  - name: lv 
                    size: "{{ volume_size }}"
                    mount_point: "{{ mount_location }}"

ansible log:
TASK [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: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 `"&& mkdir /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078 && echo ansible-tmp-1594054156.4183838-36261-24628781999078="` echo /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078 `" ) && sleep 0'
Using module file /usr/share/ansible/roles/rhel-system-roles.storage/library/blivet.py
<localhost> PUT /root/.ansible/tmp/ansible-local-3568357b785m1/tmpuyrdiczu TO /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/ /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py", line 102, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1190, in <module>
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1187, in main
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1140, in run_module
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 877, in manage_pool
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 783, in manage
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 765, in _manage_volumes
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 353, in manage
  File "/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 454, in _create
AttributeError: 'DiskDevice' object has no attribute 'free_space'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1594054156.4183838-36261-24628781999078/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_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1190, in <module>\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1187, in main\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1140, in run_module\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 877, in manage_pool\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 783, in manage\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 765, in _manage_volumes\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 353, in manage\n  File \"/tmp/ansible_blivet_payload_b_0aei6b/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 454, in _create\nAttributeError: 'DiskDevice' object has no attribute 'free_space'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

PLAY RECAP *****************************************************************************************************************************************************************************************
localhost                  : ok=35   changed=0    unreachable=0    failed=1    skipped=15   rescued=0    ignored=0

Comment 3 David Lehman 2021-05-13 22:13:45 UTC
To be clear, current upstream produces the correct on-disk layout. It does not, however, produce the correct type for the volume in the blivet module's return value.

Comment 19 errata-xmlrpc 2021-11-09 17:44:38 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

Comment 20 Red Hat Bugzilla 2023-09-15 00:33:56 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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