Bug 1854888

Summary: RHV-M shows successful operation if OVA export/import failed during "qemu-img convert" phase
Product: Red Hat Enterprise Virtualization Manager Reporter: nijin ashok <nashok>
Component: ovirt-engineAssignee: Steven Rosenberg <srosenbe>
Status: CLOSED ERRATA QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.11CC: ahadas, emarcus, nsimsolo, srosenbe, tnisan
Target Milestone: ovirt-4.4.3   
Target Release: 4.4.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhv-4.4.3-3 Doc Type: Enhancement
Doc Text:
This enhancements adds error handling for OVA import and export operations, providing successful detection and reporting to the Red Hat Virtualization Manager if the qemu-img process fails to complete.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-24 13:09:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description nijin ashok 2020-07-08 12:16:31 UTC
Description of problem:

If an OVA export/import failed during "qemu-img convert" phase, the RHV-M shows the successful status even though the disk copy operation is failed. This was observed in bug 1813028 and bug 1748879.

The issue can also be reproducible if we kill the "qemu-img" process while converting the OVA. The reproducer steps in the above bug can also be used to reproduce the bug.

The ova ansible logs show that the operation was failed.

===
skipping disk: path=/rhev/data-center/mnt/blockSD/106fd6c1-a215-457e-b8c5-a08bb6448f58/images/2c542318-d55d-4347-9996-cb3c4b85a4ab/ef082d8e-19b4-4bcb-b1b6-9d09d70030a5 size=1132331008
converting disk: /rhev/data-center/mnt/blockSD/106fd6c1-a215-457e-b8c5-a08bb6448f58/images/2c542318-d55d-4347-9996-cb3c4b85a4ab/ef082d8e-19b4-4bcb-b1b6-9d09d70030a5, offset 13312
Killed
===

However, the engine logs show a successful message.

===
Exporting VM myagent as an OVA to /var/tmp/myagent.ova on Host vm250-142.example.com
===

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

ovirt-engine-4.3.10.3-0.2.el7.noarch

How reproducible:

100%

Steps to Reproduce:

1. Export/import an OVA from RHV-M.
2. Kill the "qemu-img convert" process duing the operation.
3. Check the output of manager event logs. It will be showing a successful message to the user.

Actual results:

RHV-M shows successful operation if OVA export/import failed during "qemu-img convert" phase 

Expected results:

The user will only realize that the operation has failed once they boot the VM. If there is an error during the disk copy operation of the disk, then the engine should mark the whole OVA operation has failed.   

Additional info:

Comment 3 Nisim Simsolo 2020-10-07 07:20:06 UTC
Verified:
ovirt-engine-4.4.3.5-0.5.el8ev
vdsm-4.40.32-1.el8ev.x86_64
qemu-kvm-5.1.0-10.module+el8.3.0+8254+568ca30d.x86_64
libvirt-daemon-6.6.0-6.module+el8.3.0+8125+aefcf088.x86_64

Verification scenario:
1. Export VM as OVA
2. Kill qemu-img convert process.
3. Verify operation failed with the next event in WebAdmin: 
"export:
Failed Exporting VM vm_name as an OVA to /home/rhv_ova/vm_name.ova on Host hostname"
4. Import OVA
5. Kill qemu-img conver process.
4. Verify operation faled with the next event:
"Failed Importing VM vm_name to Cluster Default"

Comment 5 Eli Marcus 2020-11-22 18:11:06 UTC
Hi Steve, 
please review this doc text for the errata and release notes: 

This enhancements adds error handling for OVA import and export operations, providing successful detection and reporting to the Red Hat Virtualization Manager if the qemu-img process fails to complete.

Comment 6 Steven Rosenberg 2020-11-23 10:13:49 UTC
(In reply to Eli Marcus from comment #5)
> Hi Steve, 
> please review this doc text for the errata and release notes: 
> 
> This enhancements adds error handling for OVA import and export operations,
> providing successful detection and reporting to the Red Hat Virtualization
> Manager if the qemu-img process fails to complete.

This is fine. Thank you.

Comment 10 errata-xmlrpc 2020-11-24 13:09:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: Red Hat Virtualization security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:5179