Bug 1848586 - Fix upload_ova_as_template.py
Summary: Fix upload_ova_as_template.py
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.4.5
: ---
Assignee: Liran Rotenberg
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1828981
Blocks: 1853924
TreeView+ depends on / blocked
 
Reported: 2020-06-18 14:55 UTC by Arik
Modified: 2021-03-18 15:12 UTC (History)
4 users (show)

Fixed In Version: python3-ovirt-engine-sdk4-4.4.9-1
Doc Type: Bug Fix
Doc Text:
Cause: The imageio library interfaces were changed so that the previous mechanism for uploading disks via the sdk examples were deprecated. Consequence: The scripts for uploading disks such as upload_ova_as_template and upload_ova_as_vm fail. Fix: Upgraded the scripts based upon the upload_from_ova example and merged them with the ova file support code. Result: The scripts now upload the disks from the ova file successfully.
Clone Of:
Environment:
Last Closed: 2021-03-18 15:12:30 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)
engine.log (216.50 KB, application/x-xz)
2021-02-01 13:50 UTC, Nisim Simsolo
no flags Details
vdsm.log (402.49 KB, application/x-xz)
2021-02-01 13:51 UTC, Nisim Simsolo
no flags Details
screenshot of upload ova as VM (320.92 KB, image/png)
2021-02-01 13:51 UTC, Nisim Simsolo
no flags Details
screenshot of upload OVA as template (318.69 KB, image/png)
2021-02-01 13:52 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 110308 0 master MERGED examples: Upgrade ova uploading scripts 2021-02-07 08:24:42 UTC

Description Arik 2020-06-18 14:55:59 UTC
The upload_ova_as_template.py example needs to be adjusted due to recent changes in imageio.

Comment 1 Arik 2020-06-18 15:09:38 UTC
upload_ova_as_vm.py should probably also be adjusted.

Comment 3 Nisim Simsolo 2021-02-01 13:42:38 UTC
Reassigned:
ovirt-engine-4.4.5.3-0.14.el8ev
vdsm-4.40.50.3-1.el8ev.x86_64
qemu-kvm-5.1.0-14.module+el8.3.0+8790+80f9c6d8.1.x86_64
libvirt-daemon-6.6.0-7.3.module+el8.3.0+9547+7d548490.x86_64

Reassigning reason:
1. upload_ova_as_vm.py script hangs forever, in WebAdmin -> disks there are 6 disks of the same OVA, 5 of them are locked and 1 is with ok status.
upload ova started at (see engine.log attached):
2021-02-01 12:04:24,694+02 INFO  [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-13) [412516ad-257a-4838-b8a0-9c8db2d2aeab] Running command: AddDiskCommand internal: false. Entities affected :  ID: d43bba3d-d1ff-4e4e-b651-16d70d9bec91 Type: StorageAction group CREATE_DISK with role type USER

2. upload_ova_as_template.py failed with (from engine.log):
2021-02-01 14:21:22,226+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-20) [] Operation Failed: [Cannot transfer Virtual Disk: The following disks are locked: 1_RHEL8_Disk1. Please try again in a few minutes.]
WebAdmin -> disks, 5 disks are locked and one is in ok status.

engine.log, vdsm.log  and WebAdmin screenshots attached

Comment 4 RHEL Program Management 2021-02-01 13:42:40 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 Nisim Simsolo 2021-02-01 13:50:34 UTC
Created attachment 1752844 [details]
engine.log

Comment 6 Nisim Simsolo 2021-02-01 13:51:02 UTC
Created attachment 1752845 [details]
vdsm.log

Comment 7 Nisim Simsolo 2021-02-01 13:51:37 UTC
Created attachment 1752846 [details]
screenshot of upload ova as VM

Comment 8 Nisim Simsolo 2021-02-01 13:52:04 UTC
Created attachment 1752847 [details]
screenshot of upload OVA as template

Comment 9 Arik 2021-02-02 10:22:01 UTC
Liran, can you please take a look?

Comment 11 Nisim Simsolo 2021-02-22 09:31:59 UTC
Verfication builds:
ovirt-engine-4.4.5.6-0.11.el8ev
vdsm-4.40.50.6-1.el8ev.x86_64
libvirt-daemon-6.6.0-13.module+el8.3.1+9548+0a8fede5.x86_64
qemu-kvm-5.1.0-20.module+el8.3.1+9918+230f5c26.x86_64

Verification scenario:
1. Upload OVA as VM.
2. Verify upload succeeds, run VM and verify VM is running properly.
3. Upload OVA as template.
4. Verify template uploaded successfully.
5. Create VM from template.
6. Verify VM created, run VM and verify VM is running properly.

Comment 12 Nisim Simsolo 2021-02-22 09:32:45 UTC
Polarion test case updated with the new upload method.

Comment 13 Sandro Bonazzola 2021-03-18 15:12:30 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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