While running the tests for Glance on Centos, the 'qemu-img' is failing due to missing qemu-img command[1]:
~~~
/bin/sh: qemu-img: command not found
{4} glance.tests.functional.test_healthcheck_middleware.HealthcheckMiddlewareTest.test_healthcheck_enabled [6.082316s] ... ok
{2} glance.tests.functional.v2.test_images.TestImages.test_owning_tenant_can_communitize_image [5.017702s] ... ok
{7} glance.tests.functional.test_cache_middleware.TestImageCacheSqlite.test_partial_download_of_cached_images_v2_api [6.331016s] ... ok
{7} glance.tests.functional.test_client_redirects.TestClientRedirects.test_redirect_to_new_host [0.033611s] ... ok
{6} glance.tests.functional.test_logging.TestLogging.test_no_debug [6.030891s] ... ok
{6} glance.tests.functional.test_sqlite.TestSqlite.test_big_int_mapping ... SKIPPED: test requires exe: sqlite3
{5} glance.tests.functional.v2.test_images.TestImageDirectURLVisibility.test_image_direct_url_visible [3.947811s] ... ok
{3} glance.tests.functional.v2.test_images.TestImages.test_image_import_qcow_virtual_size_calculation [5.023139s] ... FAILED
While running the tests for Glance on Centos, the 'qemu-img' is failing due to missing qemu-img command[1]: tests.functiona l.test_ healthcheck_ middleware. HealthcheckMidd lewareTest. test_healthchec k_enabled [6.082316s] ... ok tests.functiona l.v2.test_ images. TestImages. test_owning_ tenant_ can_communitize _image [5.017702s] ... ok tests.functiona l.test_ cache_middlewar e.TestImageCach eSqlite. test_partial_ download_ of_cached_ images_ v2_api [6.331016s] ... ok tests.functiona l.test_ client_ redirects. TestClientRedir ects.test_ redirect_ to_new_ host [0.033611s] ... ok tests.functiona l.test_ logging. TestLogging. test_no_ debug [6.030891s] ... ok tests.functiona l.test_ sqlite. TestSqlite. test_big_ int_mapping ... SKIPPED: test requires exe: sqlite3 tests.functiona l.v2.test_ images. TestImageDirect URLVisibility. test_image_ direct_ url_visible [3.947811s] ... ok tests.functiona l.v2.test_ images. TestImages. test_image_ import_ qcow_virtual_ size_calculatio n [5.023139s] ... FAILED
~~~
/bin/sh: qemu-img: command not found
{4} glance.
{2} glance.
{7} glance.
{7} glance.
{6} glance.
{6} glance.
{5} glance.
{3} glance.
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/ zuul/src/ opendev. org/openstack/ glance/ glance/ tests/functiona l/v2/test_ images. py", line 959, in test_image_ import_ qcow_virtual_ size_calculatio n qcow(128 * units.Mi)
fn = self._create_
File "/home/ zuul/src/ opendev. org/openstack/ glance/ glance/ tests/functiona l/v2/test_ images. py", line 911, in _create_qcow
shell=True)
File "/usr/lib64/ python3. 6/subprocess. py", line 356, in check_output .stdout
**kwargs)
File "/usr/lib64/ python3. 6/subprocess. py", line 438, in run
output=stdout, stderr=stderr)
subprocess. CalledProcessEr ror: Command 'qemu-img create -f qcow2 /tmp/glance- unittest- images- 05gx9_p1. qcow2 134217728' returned non-zero exit status 127.
~~~
We need to add qemu-img on the bindep.txt to have it working on Centos.
[1] https:/ /zuul.opendev. org/t/openstack /build/ b1e5959024d34af 795912478ac9809 ff/console