Bug 2151342

Summary: [RHEL9] ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'bytes'
Product: Red Hat Enterprise Linux 8 Reporter: Rich Megginson <rmeggins>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: guazhang <guazhang>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.8CC: djez, guazhang, japokorn, rhel-cs-system-management-subsystem-qe, rmeggins, spetrosi
Target Milestone: rcKeywords: Triaged
Target Release: 8.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:storage
Fixed In Version: rhel-system-roles-1.21.0-0.13.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2143246 Environment:
Last Closed: 2023-05-16 08:31:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2143246    
Bug Blocks:    

Comment 4 guazhang@redhat.com 2022-12-07 03:32:38 UTC
Hi,

install rpm from http://brew-task-repos.usersys.redhat.com/repos/scratch/rmeggins/rhel-system-roles/1.21.0/0.10.storage.el8/noarch/rhel-system-roles-1.21.0-0.10.storage.el8.noarch.rpm, something was wrong here. 


TASK [Calculate the expected size based on pool size and percentage value] *************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:40
ok: [localhost] => {"ansible_facts": {"storage_test_expected_size": "1440306545295.0"}, "changed": false}

TASK [Default thin pool reserved space values] *****************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:47
ok: [localhost] => {"ansible_facts": {"_storage_test_default_thpool_reserve_percent": "20"}, "changed": false}

TASK [Default minimal thin pool reserved space size] ***********************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:51
ok: [localhost] => {"bytes": 1000000000, "changed": false, "lvm": "953m", "parted": "953MiB", "size": "953 MiB"}

TASK [Default maximal thin pool reserved space size] ***********************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:56
ok: [localhost] => {"bytes": 100000000000, "changed": false, "lvm": "93g", "parted": "93GiB", "size": "93 GiB"}

TASK [Calculate maximum usable space in thin pool] *************************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:62
ok: [localhost] => {"ansible_facts": {"_storage_test_max_thin_pool_size": "1152245236236.0"}, "changed": false}

TASK [Apply upper size limit to max usable thin pool space] ****************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:66
ok: [localhost] => {"ansible_facts": {"_storage_test_max_thin_pool_size": "1340306545295"}, "changed": false}

TASK [Apply lower size limit to max usable thin pool space] ****************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:71
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [Convert maximum usable thin pool space from int to Size] *************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:76
ok: [localhost] => {"bytes": 1340306545295, "changed": 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:81
ok: [localhost] => {
    "_storage_test_max_thin_pool_size": {
        "bytes": 1340306545295,
        "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:84
ok: [localhost] => {
    "storage_test_volume.thin_pool_size": "100%"
}

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

TASK [Establish base value for expected thin pool size] ********************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:90
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}

TASK [Calculate the expected size based on pool size and percentage value] *************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:97
ok: [localhost] => {"ansible_facts": {"storage_test_expected_thin_pool_size": "1340306545295.0"}, "changed": false}

TASK [Establish base value for expected thin pool volume size] *************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:104
ok: [localhost] => {"ansible_facts": {"storage_test_expected_tp_volume_size": "1440306545295.0"}, "changed": false}

TASK [Calculate the expected thin pool volume size based on percentage value] **********************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:108
ok: [localhost] => {"ansible_facts": {"storage_test_expected_tp_volume_size": "1340306545295.0"}, "changed": false}

TASK [Replace expected volume size with calculated value] ******************************************************************************
task path: /usr/share/ansible/roles/rhel-system-roles.storage/tests/test-verify-volume-size.yml:114
ok: [localhost] => {"ansible_facts": {"storage_test_expected_size": "1340306545295.0"}, "changed": false}

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": 1319413953331,
        "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": "1340306545295.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: 1340306545295 / actual: 1319413953331)"
}

PLAY RECAP *****************************************************************************************************************************
localhost                  : ok=819  changed=11   unreachable=0    failed=1    skipped=576  rescued=0    ignored=0   

[root@storageqe-104 tests]#

Comment 9 guazhang@redhat.com 2022-12-20 04:52:47 UTC
test pass with fixed package, move to verified.

Comment 13 errata-xmlrpc 2023-05-16 08:31:56 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:2804