test only works on i386: test_get_disk_mapping_stable_rescue_ide_cdrom

Bug #1909969 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Lee Yarwood

Bug Description

Hi,

Running test_get_disk_mapping_stable_rescue_ide_cdrom on arm64 or ppcel64 results in failure:

> ======================================================================
> FAIL: nova.tests.unit.virt.libvirt.test_blockinfo.LibvirtBlockInfoTest.test_get_disk_mapping_stable_rescue_ide_cdrom
> nova.tests.unit.virt.libvirt.test_blockinfo.LibvirtBlockInfoTest.test_get_disk_mapping_stable_rescue_ide_cdrom
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: pythonlogging:'': {{{
> 2020-12-05 01:40:10,410 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
> 2020-12-05 01:40:10,411 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
> 2020-12-05 01:40:10,412 WARNING [oslo_policy.policy] Policy Rules ['os_compute_api:extensions', 'os_compute_api:os-floating-ip-pools', 'os_compute_api:os-quota-sets:defaults', 'os_compute_api:os-availability-zone:list', 'os_compute_api:limits', 'project_reader_api', 'os_compute_api:os-lock-server:unlock:unlock_override', 'os_compute_api:servers:create:zero_disk_flavor', 'compute:servers:resize:cross_cell'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
> }}}
>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/libvirt/test_blockinfo.py", line 352, in test_get_disk_mapping_stable_rescue_ide_cdrom
> self._test_get_disk_mapping_stable_rescue(
> File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/libvirt/test_blockinfo.py", line 293, in _test_get_disk_mapping_stable_rescue
> self.assertEqual(expected, mapping)
> File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 415, in assertEqual
> self.assertThat(observed, matcher, message)
> File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 502, in assertThat
> raise mismatch_error
> testtools.matchers._impl.MismatchError: !=:
> reference = {'disk': {'boot_index': '1', 'bus': 'virtio', 'dev': 'vda', 'type': 'disk'},
> 'disk.rescue': {'bus': 'ide', 'dev': 'hda', 'type': 'cdrom'},
> 'root': {'boot_index': '1', 'bus': 'virtio', 'dev': 'vda', 'type': 'disk'}}
> actual = {'disk': {'boot_index': '1', 'bus': 'virtio', 'dev': 'vda', 'type': 'disk'},
> 'disk.rescue': {'bus': 'scsi', 'dev': 'sda', 'type': 'cdrom'},
> 'root': {'boot_index': '1', 'bus': 'virtio', 'dev': 'vda', 'type': 'disk'}}

Looks like 'bus': 'ide' is not happening as expected...

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

FYI, doing something like this should fix it:

+ expect_disk_config_rescue = {
+ 'bus': 'ide', 'dev': 'hda', 'type': 'cdrom'}
+ libvirt_g_a = blockinfo.libvirt_utils.get_arch({})
+ if libvirt_g_a == 'aarch64' or libvirt_g_a == 'ppc64le':
+ expect_disk_config_rescue['bus'] = 'scsi'
+ expect_disk_config_rescue['dev'] = 'sda'

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :
Changed in nova:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Lee Yarwood (lyarwood)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 23.0.0.0rc1

This issue was fixed in the openstack/nova 23.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.