← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1946457] Re: Functional test fails with a: "Unknown file format 'qcow'" error on Centos8

 

Reviewed:  https://review.opendev.org/c/openstack/glance/+/813406
Committed: https://opendev.org/openstack/glance/commit/947e541fc0f7c0fc2b759898ab8b9401d152f3d0
Submitter: "Zuul (22348)"
Branch:    master

commit 947e541fc0f7c0fc2b759898ab8b9401d152f3d0
Author: Andre Aranha <afariasa@xxxxxxxxxx>
Date:   Mon Oct 11 10:20:38 2021 +0000

    Update qcow test to use qcow2 instead
    
    qemu-img package for Centos 8 doesn't support qcow disk format anymore,
    due to this, tests using qcow are failing with
    `Unknown file format 'qcow'`.
    This patch updates the qcow tests for qcow2 instead.
    
    Closes-Bug: #1946457
    
    Change-Id: If488ae4299a6cab521eec9c5e9ce4f29f94057e1


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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1946457

Title:
  Functional test fails with a: "Unknown file format 'qcow'" error on
  Centos8

Status in Glance:
  Fix Released

Bug description:
  This issue was discovered on tests with FIPS enabled[1], but without FIPS the same issue happens.
  When running glance functional tests on a Centos8 server, the following issue happens:
  {1} glance.tests.functional.v2.test_images.TestImages.test_image_upload_qcow_virtual_size_calculation [5.522514s] ... FAILED

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):

        File "/home/zuul/src/opendev.org/openstack/glance/glance/tests/functional/v2/test_images.py", line 931, in test_image_upload_qcow_virtual_size_calculation
      fn = self._create_qcow(128 * units.Mi)

        File "/home/zuul/src/opendev.org/openstack/glance/glance/tests/functional/v2/test_images.py", line 914, in _create_qcow
      shell=True)

        File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
      **kwargs).stdout

        File "/usr/lib64/python3.6/subprocess.py", line 438, in run
      output=stdout, stderr=stderr)

      subprocess.CalledProcessError: Command 'qemu-img create -f qcow /tmp/glance-unittest-images-5flalm7e.qcow 134217728' returned non-zero exit status 127.
  ~~~

  Trying to run this command manually on a Centos8 server with qemu-img installed (qemu-img-15:4.2.0-48): qemu-img create -f qcow /tmp/glance-unittest-images-5flalm7e.qcow 134217728
  Initially it fails due to a gcrypt issue:
  ~~~
  $ qemu-img create -f qcow /tmp/glance-unittest-images-5flalm7e.qcow 134217728
  qemu-img: Unable to initialize gcrypt
  ~~~

  There is a bug for this that[2] and the solution is to update the libgcrypt package. Previously I had 'libgcrypt-1.8.3-4' and updated to: 'libgcrypt-1.8.5-4'.
  After this, I got the "Unknown file format 'qcow'" error:
  ~~~
  $ qemu-img create -f qcow /tmp/glance-unittest-images-5flalm7e.qcow 134217728
  qemu-img: /tmp/glance-unittest-images-5flalm7e.qcow: Unknown file format 'qcow'

  $ qemu-img create -f qcow2 /tmp/glance-unittest-images-5flalm7e.qcow 134217728
  Formatting '/tmp/glance-unittest-images-5flalm7e.qcow', fmt=qcow2 size=134217728 cluster_size=65536 lazy_refcounts=off refcount_bits=16
  ~~~

  Looking at our documentation I believe we don't support qcow format anymore[3], so should we still keep this test? Or maybe, change it to use qcow2 instead of qcow?
  I believe that the reason we didn't see this issue on the CI's, is because they are testing on a Ubuntu server (At least for the patch I analysed).

  [1]
  https://zuul.opendev.org/t/openstack/build/4f3a50281bc44ada9fb68ac24236cf1c/console

  [2] https://bugzilla.redhat.com/show_bug.cgi?id=1828681

  [3] https://docs.openstack.org/glance/train/user/formats.html#disk-
  format

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



References