Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358987 - Should improve error prompt and log when import virtual machine from xen server failed
Summary: Should improve error prompt and log when import virtual machine from xen serv...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.0.0
Hardware: x86_64
OS: Unspecified
high
high vote
Target Milestone: ovirt-4.0.4
: ---
Assignee: Shahar Havivi
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-22 03:05 UTC by zhoujunqin
Modified: 2016-10-11 02:17 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-15 07:52:27 UTC
oVirt Team: Virt
michal.skrivanek: ovirt-4.0.z?
mgoldboi: ovirt-4.1?
mgoldboi: planning_ack+
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
Screenshot for step2 (deleted)
2016-07-22 03:05 UTC, zhoujunqin
no flags Details
vdsm.log (deleted)
2016-07-22 03:06 UTC, zhoujunqin
no flags Details

Description zhoujunqin 2016-07-22 03:05:39 UTC
Created attachment 1182683 [details]
Screenshot for step2

Description of problem:
Should improve error prompt and log when import virtual machine from xen server failed

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-31.el7_2.16.x86_64
virt-v2v-1.32.5-5.el7.x86_64
vdsm-4.18.3-0.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
Environment Setup
Prepare a rhel7 host which register to rhevm and with virt-v2v package installed.
Xen server hostname:hp-dl360eg8-08xxxxxx
VDSM host with virt-v2v package installed hostname:dell-op780xxxxxx

1. In order to import VMs password-less SSH access has to be enabled between VDSM host and the Xen host. The following steps needed to be done at the VDSM host:

1.1 Generate ssh kes for vdsm user
# sudo -u vdsm ssh-keygen

1.2 Copy vdsms public key to the Xen host
# sudo -u vdsm ssh-copy-id root@hp-dl360eg8-08xxxxxx

1.3 Login to the remote host (in order to test the connection and add the Xen host to the known_hosts file
# sudo -u vdsm ssh root@hp-dl360eg8-08xxxxxx

Result: Can login without password

1.4 Exit the remote Xen host logout

2. Then login rhevm 4.0 and try to import virtual machine from Xen.
Virtual Machines-->Import-->Fill items on 'Import Virtual Machine(s)' window with:
Data Center:xx
Source: Xen(via RHEL)
URI: xen+ssh://root@hp-dl360eg8-08xxxxxx
Proxy Host: dell-op780xxxxxx

Actual results:
Step2 failed to load xen server's guests with error:
Failed to communicate with the external provider, see log for additional details
Please see attachment-1

Expected results:
Should improve error prompt and log when import virtual machine from xen server failed

Additional info:
1. Checked vdsm.log
...
jsonrpc.Executor/4::WARNING::2016-07-22 05:01:58,620::v2v::959::root::(_add_disks) Disk {'alias': '/var/lib/xen/images/xen/xen-pv/xen-pv-rhel4.9-i386.img', 'type': 'disk', 'dev': 'xvda'} has unsupported format: <built-in function format>
jsonrpc.Executor/4::WARNING::2016-07-22 05:01:59,776::v2v::959::root::(_add_disks) Disk {'alias': '/var/lib/xen/images/rhel7-pv-test.img', 'type': 'disk', 'dev': 'xvda'} has unsupported format: <built-in function format>
jsonrpc.Executor/4::ERROR::2016-07-22 05:01:59,813::v2v::923::root::(_add_disk_info) Error getting disk size
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 920, in _add_disk_info
    vol = conn.storageVolLookupByPath(disk['alias'])
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4596, in storageVolLookupByPath
    if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self)
libvirtError: Storage volume not found: no storage vol with matching path

Comment 1 zhoujunqin 2016-07-22 03:06:17 UTC
Created attachment 1182685 [details]
vdsm.log

Comment 2 Michal Skrivanek 2016-07-22 06:35:02 UTC
not just the log, the exception right afterwards "NameError: global name 'params' is not defined" needs to be addressed too

Comment 3 Moran Goldboim 2016-07-25 07:57:49 UTC
raising priority to high due to the exception fix.

Comment 4 Shahar Havivi 2016-07-25 09:25:32 UTC
What does the audit log say?

Comment 5 zhoujunqin 2016-07-26 09:19:10 UTC
(In reply to Shahar Havivi from comment #4)
> What does the audit log say?

Unfortunately, after i start auditd service and empty /var/log/audit/audit.log, then run bug steps, nothing get in /var/log/audit/audit.log.

And need i do other operations, thanks.

Comment 6 Shahar Havivi 2016-07-27 07:11:26 UTC
(In reply to zhoujunqin from comment #5)
> (In reply to Shahar Havivi from comment #4)
> > What does the audit log say?
> 
> Unfortunately, after i start auditd service and empty
> /var/log/audit/audit.log, then run bug steps, nothing get in
> /var/log/audit/audit.log.
> 
> And need i do other operations, thanks.

With my tests I saw that we show the error that we get from vdsm in the audit log.
If its present to you then its sufficient.

Comment 7 Tomas Jelinek 2016-08-15 07:52:27 UTC
We log this issue in the engine's audit log (not auditd) - you can see the error in webadmin in bottom part in the "alerts".
This works in our environment - if it indeed does not work for you, please feel free to reopen.


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