Bug 1567197

Summary: add details to OVA import failure error message dialog
Product: Red Hat Enterprise Virtualization Manager Reporter: Steffen Froemer <sfroemer>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.6CC: lsurette, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.2.3Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 06:24:50 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:

Description Steffen Froemer 2018-04-13 14:30:00 UTC
Description of problem:
On trying to import RHGSC appliance-3.2, the dialog showing "Failed to load VM configuration OVA file: /root/rhgsc-appliance-3.2-rhel-6-x86_64.rhevm.ova

The correct issue is mentioned in vdsm.log

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

How reproducible:
100%

Steps to Reproduce:
1. Copy file to Hypervisor 
2. import the appropriate file via "Import Virtual Machines" Dialog.


Actual results:
"Failed to load VM configuration OVA file: /root/rhgsc-appliance-3.2-rhel-6-x86_64.rhevm.ova

Expected results:
The import should work correctly

Additional info:
This issue does have different flavors.

1. IOError: [Errno 13] Permission denied: u'/root/rhgsc-appliance-3.2-rhel-6-x86_64.rhevm.ova'


2018-03-23 12:03:45,109+0100 INFO  (jsonrpc/2) [jsonrpc.JsonRpcServer] RPC call Host.getHardwareInfo succeeded in 0.00 seconds (__init__:539)
2018-03-23 12:03:45,111+0100 INFO  (jsonrpc/4) [jsonrpc.JsonRpcServer] RPC call VM.getStats failed (error 1) in 0.00 seconds (__init__:539)
2018-03-23 12:03:48,563+0100 ERROR (jsonrpc/6) [jsonrpc.JsonRpcServer] Internal server error (__init__:577)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 572, in _handle_request
    res = method(**params)
  File "/usr/lib/python2.7/site-packages/vdsm/rpc/Bridge.py", line 202, in _dynamicMethod
    result = fn(*methodArgs)
  File "/usr/share/vdsm/API.py", line 1537, in getExternalVmFromOva
    return v2v.get_ova_info(ova_path)
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 226, in get_ova_info
    root = ET.fromstring(_read_ovf_from_ova(ova_path))
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1207, in _read_ovf_from_ova
    elif tarfile.is_tarfile(ova_path):
  File "/usr/lib64/python2.7/tarfile.py", line 2585, in is_tarfile
    t = open(name)
  File "/usr/lib64/python2.7/tarfile.py", line 1660, in open
    return func(name, "r", fileobj, **kwargs)
  File "/usr/lib64/python2.7/tarfile.py", line 1722, in gzopen
    fileobj = bltn_open(name, mode + "b")
IOError: [Errno 13] Permission denied: u'/root/rhgsc-appliance-3.2-rhel-6-x86_64.rhevm.ova'
2018-03-23 12:03:48,564+0100 INFO  (jsonrpc/6) [jsonrpc.JsonRpcServer] RPC call Host.getExternalVmFromOva failed (error -32603) in 0.01 seconds (__init__:539)
2018-03-23 12:03:49,398+0100 INFO  (jsonrpc/3) [jsonrpc.JsonRpcServer] RPC call Host.getAllVmStats succeeded in 0.01 seconds (__init__:539)
2018-03-23 12:03:49,712+0100 INFO  (Reactor thread) [ProtocolDetector.AcceptorImpl] Accepted connection from ::1:44296 (protocoldetector:72)
2018-03-23 12:03:49,716+0100 INFO  (Reactor thread) [ProtocolDetector.Detector] Detected protocol stomp from ::1:44296 (protocoldetector:127)



2. V2VError: Error parsing ovf information: no memory size

2018-03-23 12:12:07,611+0100 INFO  (jsonrpc/4) [jsonrpc.JsonRpcServer] RPC call Host.getHardwareInfo succeeded in 0.00 seconds (__init__:539)
2018-03-23 12:12:07,839+0100 ERROR (jsonrpc/7) [jsonrpc.JsonRpcServer] Internal server error (__init__:577)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 572, in _handle_request
    res = method(**params)
  File "/usr/lib/python2.7/site-packages/vdsm/rpc/Bridge.py", line 202, in _dynamicMethod
    result = fn(*methodArgs)
  File "/usr/share/vdsm/API.py", line 1537, in getExternalVmFromOva
    return v2v.get_ova_info(ova_path)
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 231, in get_ova_info
    _add_general_ovf_info(vm, root, ns, ova_path)
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1260, in _add_general_ovf_info
    raise V2VError('Error parsing ovf information: no memory size')
V2VError: Error parsing ovf information: no memory size
2018-03-23 12:12:07,840+0100 INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer] RPC call Host.getExternalVmFromOva failed (error -32603) in 0.00 seconds (__init__:539)
2018-03-23 12:12:08,054+0100 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] RPC call Host.getAllVmStats succeeded in 0.02 seconds (__init__:539)

Comment 1 Michal Skrivanek 2018-04-14 05:21:42 UTC
Import has been rewritten in 4.2. It is possible that errors are still not reported clearly enough, but we’d need fresh set of issues

Can we test these scenarios and check how it looks now?

Comment 2 Steffen Froemer 2018-04-18 06:16:02 UTC
Hi Michal,

indeed, I've tested same scenario in RHV-4.2 and the error messages are more clear now. I think we're fine in closing this issue. If customer would like to see something else, I will re-open it.

Comment 3 Franta Kust 2019-05-16 13:03:27 UTC
BZ<2>Jira Resync

Comment 4 Daniel Gur 2019-08-28 13:11:45 UTC
sync2jira

Comment 5 Daniel Gur 2019-08-28 13:15:58 UTC
sync2jira