Bug 1003902 - [engine-backend] [text-only] [external-provider] import of rhos image using glance over rhev fails with: "Unable to get the disk image from the provider proxy: java.lang.RuntimeException: Unable to recognize QCOW2 format"
Summary: [engine-backend] [text-only] [external-provider] import of rhos image using g...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Federico Simoncelli
QA Contact: Elad
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-03 13:12 UTC by Elad
Modified: 2016-02-10 19:59 UTC (History)
9 users (show)

Fixed In Version: is18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:
abaron: Triaged+


Attachments (Terms of Use)
logs and screenshot (228.66 KB, application/x-gzip)
2013-09-03 13:12 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19370 0 None None None Never
oVirt gerrit 19752 0 None None None Never

Description Elad 2013-09-03 13:12:39 UTC
Created attachment 793189 [details]
logs and screenshot

Description of problem:
Using 'External provider" new option on RHEV 3.3, I tried to import a RHOS image to rhev, using glance.
The operation failed with this error on UI:

"Error while executing action: Cannot import Virtual Machine Disk. The specified disk does not exist."


Version-Release number of selected component (if applicable):
rhevm-3.3.0-0.16.master.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. add new external provider to rhev. I've added glance, click on 'test' to see if it's actually works. Make sure that you have images that can be imported from RHOS
2. try to import an image to a storage domain using 'import' option under the provider sub-tab on storage main tab


Actual results:
The operation will fail with this exception on engine.log:

2013-09-03 15:49:58,136 ERROR [org.ovirt.engine.core.bll.ImportRepoImageCommand] (ajp-/127.0.0.1:8702-8) [2e5ab859] Unable to get the disk image from the provider proxy: java.lang.RuntimeException: Unable to recog
nize QCOW2 format


Additional info:
logs and screenshot

Comment 2 Federico Simoncelli 2013-09-03 22:50:26 UTC
The relevant image was advertised as bare-qcow2 format in glance:

 # glance image-list
 +--------------------------------------+-----------------+-------------+------------------+------------+--------+
 | ID                                   | Name            | Disk Format | Container Format | Size       | Status |
 +--------------------------------------+-----------------+-------------+------------------+------------+--------+
 | a32222e7-f879-41ab-b66b-5cad299b0b8d | test            | qcow2       | bare             | 31357907   | active |
 +--------------------------------------+-----------------+-------------+------------------+------------+--------+

But instead the content wasn't a valid qcow2 image:

 # glance image-download --file test.qcow2 a32222e7-f879-41ab-b66b-5cad299b0b8d
 # file test.qcow2 
 test.qcow2: LZMA compressed data, streamed

Therefore the error:

2013-09-03 15:49:58,136 ERROR [org.ovirt.engine.core.bll.ImportRepoImageCommand] (ajp-/127.0.0.1:8702-8) [2e5ab859] Unable to get the disk image from the provider proxy: java.lang.RuntimeException: Unable to recognize QCOW2 format

Sadly glance doesn't protect against having/providing invalid qcow2 images (or any other format) and the engine backend needs to discover the qcow2 header in order to identify the virtual image size (to be kept in the image db entry).

If there's anything to do here maybe it's just to improve the error message.

Comment 5 Elad 2013-10-14 10:32:46 UTC
Proper error message is shown when a wrong image format is imported from glance:

"Error while executing action: Cannot import Virtual Machine Disk. Either the image is missing, or its format is corrupted or unrecognizable."

Verified on is18

Comment 6 Itamar Heim 2014-01-21 22:32:48 UTC
Closing - RHEV 3.3 Released

Comment 7 Itamar Heim 2014-01-21 22:32:51 UTC
Closing - RHEV 3.3 Released


Note You need to log in before you can comment on or make changes to this bug.