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
> 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?
(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.
(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?
Can not get the blivet.log even if I test it several times.
(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.
(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
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.
(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
(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.
(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.
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
(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?