Bug 1371304 - Uncaught exception occured when try to import Virtual Machine from Export domain
Summary: Uncaught exception occured when try to import Virtual Machine from Export domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.4
: 4.0.4.2
Assignee: Idan Shaby
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-29 20:40 UTC by saeedi
Modified: 2016-09-26 12:33 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:33:39 UTC
oVirt Team: Storage
Embargoed:
ykaul: ovirt-4.0.z+
ykaul: planning_ack+
amureini: devel_ack+
ykaul: testing_ack+


Attachments (Terms of Use)
Screenshot (62.81 KB, image/png)
2016-08-29 20:40 UTC, saeedi
no flags Details
Ovirt ui log requested (2.29 KB, text/plain)
2016-08-30 20:36 UTC, saeedi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 63075 0 master MERGED webadmin: don't cast from Guid to StorageDomain 2016-08-31 14:02:28 UTC
oVirt gerrit 63116 0 ovirt-engine-4.0 MERGED webadmin: don't cast from Guid to StorageDomain 2016-09-02 18:40:29 UTC
oVirt gerrit 63118 0 ovirt-engine-4.0.4 MERGED webadmin: don't cast from Guid to StorageDomain 2016-09-04 06:50:28 UTC

Description saeedi 2016-08-29 20:40:53 UTC
Created attachment 1195519 [details]
Screenshot

Description of problem:
I have two server that ovirt has been installed on both of them. First server has ovirt 3.5 and the second has ovirt 4.0.3 (The bug is exist on 4.0.2.x too. I updated it to 4.0.3 today but problem exist).
I export two machine from first server to Export domain (with NFS fs) and then detach Export domain from first server and Attach it to second server. I try to import one of them and import successfully without any error. 
Then try to import second virtual machine and proccess failed immediately after click on import button. I try it more and more after restart ovirt-engine and vdsmd services but with no success.

Difference between this two machines are  the following list:
1. second Virtual Machine created based on template (I know about that and i export template first and then export the Virtual Machine)
2. we assigned 2 disks to second virtual machine but first machine has one disk. 

Version-Release number of selected component (if applicable):
4.0.2.x and 4.0.3

How reproducible:


Steps to Reproduce:
1. I try to import VM again and error occurred like before.

Actual results:
Uncaught exception occured and nothing happens after that. 

Expected results:
I except that show the import window to do next steps

Additional info:
I check http

Comment 1 Tal Nisan 2016-08-30 07:48:49 UTC
Hi Saeedi, can you please attach the Engine logs?

Comment 2 saeedi 2016-08-30 08:11:41 UTC
Hi Nisan,

I checked engine log and not corresponded log appear on engine.log. Below log is for when i select Export domain till error occurred

2016-08-30 12:37:57,929 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-67) [] START, GetVmsInfoVDSCommand( GetVmsInfoVDSCommandParameters:{runAsync='true', storagePoolId='00000001-0001-0001-0001-0000000000b8', ignoreFailoverLimit='false', storageDomainId='5aa9815c-dec9-4f03-a253-c8d86ccbeb73', vmIdList='null'}), log id: 4593d1f
2016-08-30 12:37:58,348 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-67) [] FINISH, GetVmsInfoVDSCommand, log id: 4593d1f
2016-08-30 12:37:58,385 INFO  [org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher] (DefaultQuartzScheduler1) [9fd9506] Fetched 5 VMs from VDS 'c0725b70-a093-4f05-8703-e0c6ba0bb47c'
2016-08-30 12:38:14,514 INFO  [org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher] (DefaultQuartzScheduler9) [] Fetched 5 VMs from VDS 'c0725b70-a093-4f05-8703-e0c6ba0bb47c'

As you see no Error message reported.

Comment 3 saeedi 2016-08-30 08:29:20 UTC
Is there any solution to import the VM from ovirt-shell CLI? I wasn't able to find it on ovirt document. if you can send any recipe about it, i can test too.

Comment 4 Idan Shaby 2016-08-30 14:37:09 UTC
The engine's log doesn't tell us about the problem since it's a ui problem.
Can you please attach the ui log?

Comment 5 saeedi 2016-08-30 19:58:21 UTC
I do the operation for several times and nothing printed in /var/log/ovirt-engine/ui.log. 
I think we need to install debuginfo packge for ovirt webadmin portal.My point is correct?

I'm going to install it before your answer.

Comment 6 saeedi 2016-08-30 20:36:46 UTC
Created attachment 1196076 [details]
Ovirt ui log requested

I installed ovirt-engine-webadmin-portal-debuginfo with yum. After that restart ovirt-engine and then navigate to ui.log and see ui Error message and attached it with ovirt-ui.log name.

Comment 7 saeedi 2016-08-31 18:50:55 UTC
How can i import the VM befor bug fixing? I want to know if it is possible to import VM with ovirt-shell. I can't wait for ovirt next release to do that.

Comment 8 Idan Shaby 2016-09-01 05:46:50 UTC
Try to import the template from the export domain before you import the vm that relies on the template. That should workaround the problem in the meanwhile.

Comment 10 Tal Nisan 2016-09-04 11:14:51 UTC
Idan, please provide clear steps to reproduce to  ease up QE's work

Comment 11 Idan Shaby 2016-09-04 11:28:23 UTC
Sure:

1. Create a vm (let's call it "vm1").
2. Create a template from "vm1" (let's call it "vm1_template").
3. Create a vm from "vm1_template" (let's call it "vm1_from_template").
4. Export "vm1_from_template" to the export domain.
5. Try to import "vm1_from_template" (before the fix a UI error was shown).
6. Check that there's no UI error.

Comment 12 Allon Mureinik 2016-09-05 10:44:32 UTC
This seems to have been broken for quite a while, so let's document what was fixed here. Idan?

Comment 13 Idan Shaby 2016-09-06 06:18:15 UTC
First, I want to add a few things that I forgot to mention in comment 11:
1. Between stages 1 and 2, you need to create a disk for vm1 (pretty obvious, but should be written).
2. In stage 4, "vm1_template" should also be exported.
3. Between stages 4 and 5, "vm1_from_template" and "vm1_template" should be removed, or else the bug won't be reproduced.

Also, added a doc text.

Comment 14 Kevin Alon Goldblatt 2016-09-13 13:53:21 UTC
Tested with the following code:
----------------------------------------
rhevm-4.0.4.2-0.1.el7ev.noarch
vdsm-4.18.13-1.el7ev.x86_64

Tested with the following scenario:

Steps to Reproduce:
1. Create a vm (let's call it "vm1") with a disk.
2. Create a template from "vm1" (let's call it "vm1_template").
3. Create a vm from "vm1_template" (let's call it "vm1_from_template").
4. Export "vm1_from_template" and "vm1_template" to the export domain.
5. Remove both "vm1_from_template" and "vm1_template
5. Try to import "vm1_from_template" >>>>> Works fine and there's NO UI error.




Actual results:
The Import VM from export domain based on a template from an export domain via the webadmin works fine

Expected results:



Moving to VERIFIED!


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