← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2073862] Re: test_vmdk_bad_descriptor_mem_limit and test_vmdk_bad_descriptor_mem_limit_stream_optimized fail if qemu-img binary is missing

 

Reviewed:  https://review.opendev.org/c/openstack/nova/+/924148
Committed: https://opendev.org/openstack/nova/commit/a3202f7bf9f1aecc7d0632011167d38a1698f0a0
Submitter: "Zuul (22348)"
Branch:    master

commit a3202f7bf9f1aecc7d0632011167d38a1698f0a0
Author: Julien Le Jeune <julien.le-jeune@xxxxxxxxxxxx>
Date:   Mon Jul 15 14:10:43 2024 +0200

    Fix test_vmdk_bad_descriptor_mem_limit and test_vmdk_bad_descriptor_mem_limit_stream_optimized
    
    These tests depend on qemu-img being installed and in the path, if it is not installed, skip them.
    
    Change-Id: I896f16c512f24bcdd898ab002af4e5e068f66b64
    Closes-bug: #2073862
    Signed-off-by: Julien Le Jeune <julien.le-jeune@xxxxxxxxxxxx>


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2073862

Title:
  test_vmdk_bad_descriptor_mem_limit and
  test_vmdk_bad_descriptor_mem_limit_stream_optimized fail if qemu-img
  binary is missing

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  When qemu-img binary is not present on the system, these tests fail
  like we can see on these logs:

  ======================================================================
  ERROR: nova.tests.unit.image.test_format_inspector.TestFormatInspectors.test_vmdk_bad_descriptor_mem_limit
  ----------------------------------------------------------------------
  pythonlogging:'': {{{
  2024-07-23 11:44:54,011 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.
  2024-07-23 11:44:54,012 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.
  2024-07-23 11:44:54,015 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_member_api', 'project_reader_api', 'project_member_or_admin', 'project_reader_or_admin', 'os_compute_api:limits:other_project', 'os_compute_api:os-lock-server:unlock:unlock_override', 'os_compute_api:servers:create:zero_disk_flavor', 'compute:servers:resize:cross_cell', 'os_compute_api:os-shelve:unshelve_to_host'] 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 "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 408, in test_vmdk_bad_descriptor_mem_limit
      self._test_vmdk_bad_descriptor_mem_limit()
    File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 382, in _test_vmdk_bad_descriptor_mem_limit
      img = self._create_allocated_vmdk(image_size // units.Mi,
    File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 183, in _create_allocated_vmdk
      subprocess.check_output(
    File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/usr/lib/python3.10/subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command 'qemu-img convert -f raw -O vmdk -o subformat=monolithicSparse -S 0 /tmp/tmpw0q0ibvj/nova-unittest-formatinspector--monolithicSparse-wz0i4kj1.raw /tmp/tmpw0q0ibvj/nova-unittest-formatinspector--monolithicSparse-qpo78jee.vmdk' returned non-zero exit status 127.


  
  ======================================================================
  ERROR: nova.tests.unit.image.test_format_inspector.TestFormatInspectors.test_vmdk_bad_descriptor_mem_limit_stream_optimized
  ----------------------------------------------------------------------
  pythonlogging:'': {{{
  2024-07-23 11:43:31,443 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.
  2024-07-23 11:43:31,443 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.
  2024-07-23 11:43:31,446 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_member_api', 'project_reader_api', 'project_member_or_admin', 'project_reader_or_admin', 'os_compute_api:limits:other_project', 'os_compute_api:os-lock-server:unlock:unlock_override', 'os_compute_api:servers:create:zero_disk_flavor', 'compute:servers:resize:cross_cell', 'os_compute_api:os-shelve:unshelve_to_host'] 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 "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 411, in test_vmdk_bad_descriptor_mem_limit_stream_optimized
      self._test_vmdk_bad_descriptor_mem_limit(subformat='streamOptimized')
    File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 382, in _test_vmdk_bad_descriptor_mem_limit
      img = self._create_allocated_vmdk(image_size // units.Mi,
    File "/home/jlejeune/dev/pci_repos/stash/nova/nova/tests/unit/image/test_format_inspector.py", line 183, in _create_allocated_vmdk
      subprocess.check_output(
    File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/usr/lib/python3.10/subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command 'qemu-img convert -f raw -O vmdk -o subformat=streamOptimized -S 0 /tmp/tmpofdw3k4d/nova-unittest-formatinspector--streamOptimized-ib3_obsl.raw /tmp/tmpofdw3k4d/nova-unittest-formatinspector--streamOptimized-v9to40ic.vmdk' returned non-zero exit status 127.

  
  I think we just need to skip these tests if that binary is missing like it's already the case in other tests which call _create_img() method for example: https://opendev.org/openstack/nova/src/branch/master/nova/tests/unit/image/test_format_inspector.py#L70.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2073862/+subscriptions



References