]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: simplify QCOW migration distro check
authorJason Dillaman <dillaman@redhat.com>
Thu, 14 Jan 2021 16:52:05 +0000 (11:52 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 14 Jan 2021 16:52:05 +0000 (11:52 -0500)
If the qemu-img command fails when attempting to use the QCOW (v1) format,
assume that the distro does not have support for the format enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/workunits/rbd/cli_migration.sh

index 63ceeb14e3b2dca8d12352ef76d87fc03655474e..9e9099850370877846f11d37d740100e20a9e7da 100755 (executable)
@@ -142,19 +142,13 @@ EOF
 }
 
 test_import_qcow_format() {
-    case "$(lsb_release --id --short)" in
-    RedHatEnterpriseWorkstation|RedHatEnterpriseServer|RedHatEnterprise|CentOS)
-        # QCOW format not included in EL variants
-        return
-        ;;
-    *)
-        ;;
-    esac
-
     local base_image=$1
     local dest_image=$2
 
-    qemu-img convert -f raw -O qcow rbd:rbd/${base_image} ${TEMPDIR}/${base_image}.qcow
+    if ! qemu-img convert -f raw -O qcow rbd:rbd/${base_image} ${TEMPDIR}/${base_image}.qcow; then
+        echo "skipping QCOW test"
+        return 0
+    fi
     qemu-img info -f qcow ${TEMPDIR}/${base_image}.qcow
 
     cat > ${TEMPDIR}/spec.json <<EOF