This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2059426 - [RHEL8] AttributeError: 'DiskLabel' object has no attribute 'cipher'
Summary: [RHEL8] AttributeError: 'DiskLabel' object has no attribute 'cipher'
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Vojtech Trefny
QA Contact: CS System Management SST QE
URL:
Whiteboard: role:storage
Depends On: 2060030
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-01 02:22 UTC by guazhang@redhat.com
Modified: 2024-01-11 04:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-12 10:02:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-3242 0 None Migrated None 2023-09-12 09:59:17 UTC
Red Hat Issue Tracker RHELPLAN-114068 0 None None None 2022-03-01 02:25:41 UTC

Internal Links: 2060030

Description guazhang@redhat.com 2022-03-01 02:22:35 UTC
Description of problem:
system role testing hit the error, please have a look.

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

How reproducible:
jsut hit it once

Steps to Reproduce:
1. install rhel-system-roles-1.15.0-1.el8.noarch 
2. ansible-playbook -vv -i host tests_luks_pool_nvme_generated.yml
3.



ansible [core 2.12.2]
  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.8/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 2.10.3
  libyaml = True

Actual results:


Expected results:


Additional info:



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:75
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'DiskLabel' object has no attribute 'cipher'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1646091858.0473711-46962-179506041171356/AnsiballZ_blivet.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1646091858.0473711-46962-179506041171356/AnsiballZ_blivet.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1646091858.0473711-46962-179506041171356/AnsiballZ_blivet.py\", line 48, in invoke_module\n    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_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1716, in <module>\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1712, in main\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1664, in run_module\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1312, in manage_pool\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1197, in manage\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1128, in _apply_defaults\n  File \"/tmp/ansible_blivet_payload_x2davmur/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1101, in _update_from_device\nAttributeError: 'DiskLabel' object has no attribute 'cipher'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}


https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2022/02/63502/6350222/11539232/140499611/taskout.log

https://beaker.engineering.redhat.com/recipes/11539232#task140499611

Comment 1 Rich Megginson 2022-03-01 15:51:20 UTC
> jsut hit it once

Does that mean you ran the test again and did not see the error?  Is the error reproducible?

Did you only see the error with the tests_luks_pool_nvme_generated.yml?

@vtrefny The error is being reported here:

library/blivet.py:1101

        elif param_name == 'encryption_cipher' and encrypted:
            self._pool['encryption_cipher'] = self._device.parents[0].parents[0].format.cipher

so self._device.parents[0].parents[0].format is a DiskLabel object?  and it has no `cipher` method?

Comment 2 guazhang@redhat.com 2022-03-02 01:34:58 UTC
(In reply to Rich Megginson from comment #1)
> > jsut hit it once
> 
> Does that mean you ran the test again and did not see the error?  Is the
> error reproducible?
> 
I have ran many times but can not hit the bug again. 


> Did you only see the error with the tests_luks_pool_nvme_generated.yml?
> 
> @vtrefny The error is being reported here:
> 
> library/blivet.py:1101
> 
>         elif param_name == 'encryption_cipher' and encrypted:
>             self._pool['encryption_cipher'] =
> self._device.parents[0].parents[0].format.cipher
> 
> so self._device.parents[0].parents[0].format is a DiskLabel object?  and it
> has no `cipher` method?

I just hit the error one time with the tests_luks_pool_nvme_generated.yml, so I'm not sure if we can hit it with other tests.

Comment 3 Vojtech Trefny 2022-03-02 14:45:14 UTC
(In reply to Rich Megginson from comment #1)
> > jsut hit it once
> 
> Does that mean you ran the test again and did not see the error?  Is the
> error reproducible?
> 
> Did you only see the error with the tests_luks_pool_nvme_generated.yml?
> 
> @vtrefny The error is being reported here:
> 
> library/blivet.py:1101
> 
>         elif param_name == 'encryption_cipher' and encrypted:
>             self._pool['encryption_cipher'] =
> self._device.parents[0].parents[0].format.cipher
> 
> so self._device.parents[0].parents[0].format is a DiskLabel object?  and it
> has no `cipher` method?

For pools "self._device.parents[0].parents[0]" should be the disk backing the pool which is encrypted, so format should be "LUKS" where we get all the encryption specific properties like "cipher" from. For some reason blivet thinks the disk has a partition table on it (that's the "DiskLabel" format).

This is from cleanup after the failed test:

/dev/nvme1n1: 6 bytes were erased at offset 0x00000000 (crypto_LUKS): 4c 55 4b 53 ba be
/dev/nvme1n1: 6 bytes were erased at offset 0x00004000 (crypto_LUKS): 53 4b 55 4c ba be
/dev/nvme1n1: 4 bytes were erased at offset 0x000001c6 (atari): e5 47 58 77
/dev/nvme1n1: calling ioctl to re-read partition table: Success

which means blkid sees an atari partition table on the disk and if we (in blivet) see both a format (LUKS in this case) and a partition table (atari in this case) it prefers the partition table (this is to support some crazy setups like boot ISOs where the image contains mix of partition tables and formats). Of course there is no atari partition table on the disk, blkid had a few bugs where the atari partition table was falsely detected and these were not backported to RHEL 8 so I'm quite sure this is the root issue here. This also explains why the issue appears randomly -- the "fake" atari partition table is detected in some random data on the disk. @guazhang do we have the blivet.log from the failed test so we can be sure this is really the issue?

Comment 4 guazhang@redhat.com 2022-03-04 00:35:28 UTC
Can not get the blivet.log even if I test it several times.

Comment 5 Rich Megginson 2022-03-04 01:35:29 UTC
(In reply to guazhang from comment #4)
> Can not get the blivet.log even if I test it several times.

blivet.log (and other .log files) are in the /tmp directory on the managed host.

Comment 6 guazhang@redhat.com 2022-03-04 04:58:36 UTC
(In reply to Rich Megginson from comment #5)
> (In reply to guazhang from comment #4)
> > Can not get the blivet.log even if I test it several times.
> 
> blivet.log (and other .log files) are in the /tmp directory on the managed
> host.

I meaning I can not reproduce the bug so can not get the blivet.log

Comment 8 Vojtech Trefny 2022-03-23 14:49:29 UTC
So based on the logs, this is definitely the atari partition table issue:

 'DEVNAME': '/dev/nvme2n1',
 'ID_PART_TABLE_TYPE': 'atari'

Do we want to keep this open for tracking the issue in the storage role or should I close it? The blkid/util-linux issue is planned for 8.7.

Comment 9 Rich Megginson 2022-03-23 15:12:58 UTC
(In reply to Vojtech Trefny from comment #8)
> So based on the logs, this is definitely the atari partition table issue:
> 
>  'DEVNAME': '/dev/nvme2n1',
>  'ID_PART_TABLE_TYPE': 'atari'
> 
> Do we want to keep this open for tracking the issue in the storage role or
> should I close it? The blkid/util-linux issue is planned for 8.7.

Is there a BZ for that?  If so, add it as a "Depends On" to this BZ

Comment 10 Vojtech Trefny 2022-03-23 15:27:35 UTC
(In reply to Rich Megginson from comment #9)
> (In reply to Vojtech Trefny from comment #8)
> > So based on the logs, this is definitely the atari partition table issue:
> > 
> >  'DEVNAME': '/dev/nvme2n1',
> >  'ID_PART_TABLE_TYPE': 'atari'
> > 
> > Do we want to keep this open for tracking the issue in the storage role or
> > should I close it? The blkid/util-linux issue is planned for 8.7.
> 
> Is there a BZ for that?  If so, add it as a "Depends On" to this BZ

Yes, https://bugzilla.redhat.com/show_bug.cgi?id=2060030 is already added as dependency here.

Comment 11 Rich Megginson 2022-03-23 15:30:34 UTC
(In reply to Vojtech Trefny from comment #10)
> (In reply to Rich Megginson from comment #9)
> > (In reply to Vojtech Trefny from comment #8)
> > > So based on the logs, this is definitely the atari partition table issue:
> > > 
> > >  'DEVNAME': '/dev/nvme2n1',
> > >  'ID_PART_TABLE_TYPE': 'atari'
> > > 
> > > Do we want to keep this open for tracking the issue in the storage role or
> > > should I close it? The blkid/util-linux issue is planned for 8.7.
> > 
> > Is there a BZ for that?  If so, add it as a "Depends On" to this BZ
> 
> Yes, https://bugzilla.redhat.com/show_bug.cgi?id=2060030 is already added as
> dependency here.

Ok.  Then I'll leave this BZ open for now.  I'll move it to ASSIGNED since it is "in progress".  Once 2060030 is fixed, I'll move this to ON_QA and attach to the errata, or otherwise get QA to verify.

Comment 13 guazhang@redhat.com 2023-05-04 02:00:07 UTC
Hi,

Hit the issue again with RHEL8.9, please have a look.

rhel-system-roles-1.21.1-1.el8_8.noarch
python3-blivet-1:3.6.0-4.el8.noarch

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:73
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'DiskLabel' object has no attribute 'cipher'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/AnsiballZ_blivet.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/AnsiballZ_blivet.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/AnsiballZ_blivet.py\", line 48, in invoke_module\n    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_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1930, in <module>\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1926, in main\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1878, in run_module\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1529, in manage_pool\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1257, in manage\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1181, in _apply_defaults\n  File \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1155, in _update_from_device\nAttributeError: 'DiskLabel' object has no attribute 'cipher'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}


https://beaker.engineering.redhat.com/recipes/13829874#task159597747

Comment 15 Rich Megginson 2023-07-19 19:47:39 UTC
(In reply to guazhang from comment #13)
> Hi,
> 
> Hit the issue again with RHEL8.9, please have a look.
> 
> rhel-system-roles-1.21.1-1.el8_8.noarch
> python3-blivet-1:3.6.0-4.el8.noarch
> 
> 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:73
> An exception occurred during task execution. To see the full traceback, use
> -vvv. The error was: AttributeError: 'DiskLabel' object has no attribute
> 'cipher'
> fatal: [localhost]: FAILED! => {"changed": false, "module_stderr":
> "Traceback (most recent call last):\n  File
> \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/
> AnsiballZ_blivet.py\", line 107, in <module>\n    _ansiballz_main()\n  File
> \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/
> AnsiballZ_blivet.py\", line 99, in _ansiballz_main\n   
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File
> \"/root/.ansible/tmp/ansible-tmp-1682903337.2800765-89163-32915184337509/
> AnsiballZ_blivet.py\", line 48, in invoke_module\n    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_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1930, in <module>\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1926, in main\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1878, in run_module\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1529, in manage_pool\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1257, in manage\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1181, in _apply_defaults\n  File
> \"/tmp/ansible_blivet_payload_qpjki2jw/ansible_blivet_payload.zip/ansible/
> modules/blivet.py\", line 1155, in _update_from_device\nAttributeError:
> 'DiskLabel' object has no attribute 'cipher'\n", "module_stdout": "", "msg":
> "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
> 
> 
> https://beaker.engineering.redhat.com/recipes/13829874#task159597747

@vtrefny any ideas?  Has something been fixed in blivet since May?

Comment 16 RHEL Program Management 2023-09-12 09:57:54 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 17 RHEL Program Management 2023-09-12 10:02:57 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 18 Red Hat Bugzilla 2024-01-11 04:25:12 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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