Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1318461

Summary: engine-image-uploader fails when the VM contains snapshots
Product: Red Hat Enterprise Virtualization Manager Reporter: nijin ashok <nashok>
Component: ovirt-image-uploaderAssignee: Rafael Martins <rmartins>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.3CC: aaviram, amureini, gklein, lsurette, rbalakri, Rhev-m-bugs, rmartins, sbonazzo, srevivo, tnisan, ykaul, ylavi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-03 10:10:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
debug log
none
ovf file none

Description nijin ashok 2016-03-17 00:18:46 UTC
Description of problem:

engine-image-uploader is failing with below error, when the VM disk contains a snapshot.

ERROR: Section/Disk/parentRef element. Message: Argument must be string or unicode.

Version-Release number of selected component (if applicable):

rhevm-3.6.3.4-0.1.el6.noarch
rhevm-image-uploader-3.6.0-1.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:

1. Create a VM and take a snapshot.

2. Export the VM to the export domain.

3. Create ovf from the export domain path using

tar -zcvf file.ovf images/ master/

4. Upload the image to RHEV-M

engine-image-uploader --verbose upload -e export file.ovf

5. It fails with 

ERROR: Section/Disk/parentRef element. Message: Argument must be string or unicode.


Actual results:

engine-image-uploader is not working if the VM is having snapshot.

Expected results:

engine-image-uploader should work with snapshots

Additional info:

Comment 1 nijin ashok 2016-03-17 00:21:52 UTC
The VM which tried.

              image_guid              |            image_group_id            |               parentid               
--------------------------------------+--------------------------------------+--------------------------------------
 134d7432-2c9c-4d73-b8a0-efe28deb335b | 341e4e29-41c4-4032-b7c0-32cab61be126 | 00000000-0000-0000-0000-000000000000
 a2710e3e-5117-4966-89a3-370088b34142 | 341e4e29-41c4-4032-b7c0-32cab61be126 | 134d7432-2c9c-4d73-b8a0-efe28deb335b


====
qemu-img info images/341e4e29-41c4-4032-b7c0-32cab61be126/134d7432-2c9c-4d73-b8a0-efe28deb335b
image: images/341e4e29-41c4-4032-b7c0-32cab61be126/134d7432-2c9c-4d73-b8a0-efe28deb335b
file format: raw
virtual size: 2.0G (2147483648 bytes)
disk size: 1.7G

qemu-img info images/341e4e29-41c4-4032-b7c0-32cab61be126/a2710e3e-5117-4966-89a3-370088b34142
image: images/341e4e29-41c4-4032-b7c0-32cab61be126/a2710e3e-5117-4966-89a3-370088b34142
file format: qcow2
virtual size: 2.0G (2147483648 bytes)
disk size: 196K
cluster_size: 65536
backing file: ../341e4e29-41c4-4032-b7c0-32cab61be126/134d7432-2c9c-4d73-b8a0-efe28deb335b (actual path: images/341e4e29-41c4-4032-b7c0-32cab61be126/../341e4e29-41c4-4032-b7c0-32cab61be126/134d7432-2c9c-4d73-b8a0-efe28deb335b)
backing file format: raw
Format specific information:
    compat: 0.10
====

Comment 2 nijin ashok 2016-03-17 00:24:54 UTC
Created attachment 1137254 [details]
debug log

Comment 3 nijin ashok 2016-03-17 00:25:29 UTC
Created attachment 1137256 [details]
ovf file

Comment 4 Yaniv Lavi 2016-03-24 09:25:55 UTC
Do we support exporting with snapshots and importing this with the tool?

Comment 5 Allon Mureinik 2016-03-24 12:26:31 UTC
(In reply to Yaniv Dary from comment #4)
> Do we support exporting with snapshots and importing this with the tool?
This tool is maintained by the Integration team, not the Storage team.
Sandro?

Comment 6 Sandro Bonazzola 2016-04-07 12:50:45 UTC
(In reply to Allon Mureinik from comment #5)
> (In reply to Yaniv Dary from comment #4)
> > Do we support exporting with snapshots and importing this with the tool?
> This tool is maintained by the Integration team, not the Storage team.
> Sandro?

Question was on export, not on import.

Comment 7 Yaniv Lavi 2016-05-09 11:01:30 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 11 Yaniv Lavi 2016-06-02 08:20:37 UTC
How did we resolve this use case in the UI uploader? Do we support snapshots?

Comment 12 Allon Mureinik 2016-06-02 09:06:57 UTC
(In reply to Yaniv Dary from comment #11)
> How did we resolve this use case in the UI uploader? Do we support snapshots?
Nope.
Not in 4.0, at least.

Comment 13 Rafael Martins 2016-09-12 13:27:41 UTC
I can reproduce this error, that happens when uploading the image to engine with image-uploader. Do we still need to fix it, as this tool is deprecated and will be removed in 4.1?

Comment 14 Yaniv Lavi 2016-09-13 11:36:18 UTC
(In reply to Rafael Martins from comment #13)
> I can reproduce this error, that happens when uploading the image to engine
> with image-uploader. Do we still need to fix it, as this tool is deprecated
> and will be removed in 4.1?

Did we ever support uploading using this tool?

Comment 15 Rafael Martins 2016-09-13 11:41:05 UTC
(In reply to Yaniv Dary from comment #14)
> (In reply to Rafael Martins from comment #13)
> > I can reproduce this error, that happens when uploading the image to engine
> > with image-uploader. Do we still need to fix it, as this tool is deprecated
> > and will be removed in 4.1?
> 
> Did we ever support uploading using this tool?

Yes, it was the default way to upload an image until now. If you talk about supporting upload of images with snapshots, I'm not sure, maybe sandro can clarify.

Comment 16 Sandro Bonazzola 2016-10-03 10:10:47 UTC
We supported uploading images but without snapshots.
The tool has been deprecated in 4.0 and is going to be removed in 4.1.
ovirt-imagio should now be used to upload images.