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 2143246 - [RHEL9] ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'bytes'
Summary: [RHEL9] ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 9.2
Assignee: Rich Megginson
QA Contact: guazhang@redhat.com
URL:
Whiteboard: role:storage
Depends On:
Blocks: 2151342
TreeView+ depends on / blocked
 
Reported: 2022-11-16 12:54 UTC by guazhang@redhat.com
Modified: 2023-05-09 08:42 UTC (History)
3 users (show)

Fixed In Version: rhel-system-roles-1.21.0-0.13.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2151342 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:38:23 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 310 0 None Merged Thin pool test with large size volume fix 2022-12-08 21:08:37 UTC
Red Hat Issue Tracker RHELPLAN-139582 0 None None None 2022-11-16 13:01:37 UTC
Red Hat Product Errata RHEA-2023:2246 0 None None None 2023-05-09 07:38:47 UTC

Description guazhang@redhat.com 2022-11-16 12:54:24 UTC
Description of problem:
upstream rhel-system role regression testing found the error, please have a look

Version-Release number of selected component (if applicable):
ansible-core-2.14.0-1.el9.x86_64



How reproducible:


Steps to Reproduce:
1. git clone https://github.com/linux-system-roles/storage.git 

2. ansible-playbook -vv -i host tests_create_thinp_then_remove_scsi_generated.yml


Actual results:
get a error

Expected results:
no error

Additional info:



TASK [Calculate maximum usable space in thin pool] ************************************************************************************
task path: /mnt/tests/gitlab.cee.redhat.com/kernel-qe/kernel/-/archive/master/kernel-master.tar.gz/storage/storage_role/auto_run_role_local/storage/tests/test-verify-volume-size.yml:61
ok: [localhost] => {"bytes": 1152245236236, "changed": false, "lvm": "1t", "parted": "1TiB", "size": "1 TiB"}

TASK [Apply upper size limit to max usable thin pool space] ***************************************************************************
task path: /mnt/tests/gitlab.cee.redhat.com/kernel-qe/kernel/-/archive/master/kernel-master.tar.gz/storage/storage_role/auto_run_role_local/storage/tests/test-verify-volume-size.yml:66
ok: [localhost] => {"ansible_facts": {"_storage_test_max_thin_pool_size": "_storage_test_default_thpool_reserve_max"}, "changed": false}

TASK [Apply lower size limit to max usable thin pool space] ***************************************************************************
task path: /mnt/tests/gitlab.cee.redhat.com/kernel-qe/kernel/-/archive/master/kernel-master.tar.gz/storage/storage_role/auto_run_role_local/storage/tests/test-verify-volume-size.yml:71
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'storage_test_pool_size.bytes - _storage_test_max_thin_pool_size.bytes < _storage_test_default_thpool_reserve_min.bytes' failed. The error was: error while evaluating conditional (storage_test_pool_size.bytes - _storage_test_max_thin_pool_size.bytes < _storage_test_default_thpool_reserve_min.bytes): 'ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'bytes'\n\nThe error appears to be in '/mnt/tests/gitlab.cee.redhat.com/kernel-qe/kernel/-/archive/master/kernel-master.tar.gz/storage/storage_role/auto_run_role_local/storage/tests/test-verify-volume-size.yml': line 71, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Apply lower size limit to max usable thin pool space\n      ^ here\n"}

PLAY RECAP ****************************************************************************************************************************
localhost                  : ok=138  changed=2    unreachable=0    failed=1    skipped=77   rescued=0    ignored=0   


https://beaker.engineering.redhat.com/recipes/12954143#task152792546

Comment 1 Rich Megginson 2022-11-16 15:02:47 UTC
I have not been able to reproduce.  This is what I have tried:

* upstream with tox -e qemu-ansible-core-2.14
* downstream with basic-smoke-test
* downstream with Upstream-testsuite - with a rhel 8.7 and a rhel 9.2 image

> 2. ansible-playbook -vv -i host tests_create_thinp_then_remove_scsi_generated.yml

What is `host`?  Is it the localhost?  If so, how are you creating the scsi device to test against?  Because the rhel-system-roles test Sanity/basic-smoke-test doesn't work for scsi devices.

If `host` is not localhost, what is it?  What version of rhel?  Is it a local VM, a beaker machine, some lab machine?

Comment 2 Rich Megginson 2022-11-16 15:26:04 UTC
I was able to reproduce.  You have to have drives with a size of 1TB or higher.

Comment 4 guazhang@redhat.com 2022-11-19 11:44:13 UTC
Hi,

[root@storageqe-104 tests]# cat host 
localhost  ansible_connection=local
[root@storageqe-104 tests]# 


[root@storageqe-104 tests]# lsscsi -g
[0:0:0:0]    disk    ATA      HFS480G3H2X069N  DZ02  /dev/sda   /dev/sg0 
[1:0:0:0]    disk    ATA      SAMSUNG MZ7LH480 904Q  /dev/sdb   /dev/sg1 
[2:0:0:0]    disk    ATA      SAMSUNG MZ7LH480 904Q  /dev/sdc   /dev/sg2 
[3:0:0:0]    disk    ATA      SAMSUNG MZ7LH480 904Q  /dev/sdd   /dev/sg3 
[root@storageqe-104 tests]# lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                            8:0    1 447.1G  0 disk 
├─sda1                         8:1    1     1G  0 part /boot
└─sda2                         8:2    1 446.1G  0 part 
  ├─rhel_storageqe--104-root 253:0    0    70G  0 lvm  /
  ├─rhel_storageqe--104-swap 253:1    0   7.7G  0 lvm  [SWAP]
  └─rhel_storageqe--104-home 253:2    0 368.4G  0 lvm  /home
sdb                            8:16   1 447.1G  0 disk 
└─sdb1                         8:17   1 447.1G  0 part 
  └─vg1-tpool1_tdata         253:4    0    10G  0 lvm  
    └─vg1-tpool1-tpool       253:5    0    10G  0 lvm  
      ├─vg1-tpool1           253:6    0    10G  1 lvm  
      └─vg1-lv1              253:7    0     3G  0 lvm  
sdc                            8:32   1 447.1G  0 disk 
└─sdc1                         8:33   1 447.1G  0 part 
sdd                            8:48   1 447.1G  0 disk 
└─sdd1                         8:49   1 447.1G  0 part 
  └─vg1-tpool1_tmeta         253:3    0    12M  0 lvm  
    └─vg1-tpool1-tpool       253:5    0    10G  0 lvm  
      ├─vg1-tpool1           253:6    0    10G  1 lvm  
      └─vg1-lv1              253:7    0     3G  0 lvm  
[root@storageqe-104 tests]# 
[root@storageqe-104 tests]# uname -a
Linux storageqe-104.rhts.eng.pek2.redhat.com 5.14.0-191.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 9 15:02:51 EST 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@storageqe-104 tests]#

Comment 6 guazhang@redhat.com 2022-12-07 04:35:15 UTC
Hi,


test failed with the test package. 

TASK [debug] **************************************************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:124
ok: [localhost] => {
    "storage_test_actual_size": {
        "bytes": 1869169767219,
        "changed": false,
        "failed": false,
        "lvm": "1t",
        "parted": "1TiB",
        "size": "1 TiB"
    }
}

TASK [debug] **************************************************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:127
ok: [localhost] => {
    "storage_test_expected_size": "1900391755530.0"
}

TASK [assert] *************************************************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:130
fatal: [localhost]: FAILED! => {
    "assertion": "(storage_test_expected_size|int - storage_test_actual_size.bytes)|abs / storage_test_expected_size|int < 0.01",
    "changed": false,
    "evaluated_to": false,
    "msg": "Volume lv1 has unexpected size (expected: 1900391755530 / actual: 1869169767219)"
}

PLAY RECAP ****************************************************************************************************************************
localhost                  : ok=771  changed=10   unreachable=0    failed=1    skipped=540  rescued=0    ignored=0   

[root@storageqe-69 tests]# 

[root@storageqe-69 tests]# uname -a
Linux storageqe-69.rhts.eng.pek2.redhat.com 5.14.0-205.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 2 08:55:37 EST 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@storageqe-69 tests]# rpm -qa |grep role
rhel-system-roles-1.21.0-0.10.storage.el9.noarch
[root@storageqe-69 tests]#

Comment 7 Rich Megginson 2022-12-07 15:23:52 UTC
@japokorn please take a look

Comment 16 guazhang@redhat.com 2022-12-20 04:08:45 UTC
test pass with fixed package, move to verified.

Comment 19 errata-xmlrpc 2023-05-09 07:38:23 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/RHEA-2023:2246


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