Bug 1405058

Summary: Import KVM guest image: loading available VMs to import failed if one of the KVM storage pools is inaccessible.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.6.3CC: bugs, mavital, mgoldboi, nashok, nsimsolo, tgolembi, tjelinek
Target Milestone: ovirt-4.1.0-betaFlags: tjelinek: ovirt-4.1+
nsimsolo: testing_plan_complete+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 4.1.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:47:40 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:
Attachments:
Description Flags
vdsm.log
none
engine.log none

Description Nisim Simsolo 2016-12-15 13:32:27 UTC
Description of problem:
Trying to load available VMs to import from KVM failed (list is empty) while one of the iscsi storage pool was inaccessible but the rest of the pool were up and it was possible to run VMs on KVM environment.
In such case, only the inaccessible pool related VMs should not be listed as grayed out VMs (allign it with bug https://bugzilla.redhat.com/show_bug.cgi?id=1296222)

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.6.3-0.1.el7ev
qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64
vdsm-4.18.21-1.el7ev.x86_64
libvirt-client-2.0.0-10.el7.x86_64
sanlock-3.4.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Make on of the KVM storages pool inaccessible.
2. Open import dialog, enter KVM details and click load.
3.

Actual results:
load VMs failed

Expected results:
Load VMs should not fail and the VMs with inaccessible should be listed as grayed out VMs
Additional info:
vdsm and engine logs attached

Comment 1 Nisim Simsolo 2016-12-15 13:32:59 UTC
Created attachment 1232174 [details]
vdsm.log

Comment 2 Nisim Simsolo 2016-12-15 13:33:26 UTC
Created attachment 1232175 [details]
engine.log

Comment 3 Tomáš Golembiovský 2016-12-15 13:47:41 UTC
Problem analysis:

VDSM fails to fetch the disk size of some disks because of inaccessible storage pool. This is however not fatal from the VDSM point of view and the list of VMs is returned to the oVirt engine.

Engine receives the list but fails to parse the result because of the missing sizes. This leads to the exception in engine.log:

2016-12-15 10:08:52,554 ERROR [org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery] (default task-1) [] Exception: org.ovirt.engine.core.common.errors.EngineException: EngineException: java.lang.NumberFormatException: null (Failed with error ENGINE and code 5001)
	at org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:114) [bll.jar:]
	at org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.runVdsCommand(VDSBrokerFrontendImpl.java:33) [bll.jar:]
	at org.ovirt.engine.core.bll.QueriesCommandBase.runVdsCommand(QueriesCommandBase.java:257) [bll.jar:]
	at org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getVmsFromExternalProvider(GetVmsFromExternalProviderQuery.java:32) [bll.jar:]
...

Comment 4 Shahar Havivi 2016-12-26 13:09:48 UTC
VDSM should not return this vm as valid vm, it cannot reach the vm storage disk.
VDSM should skip this vm and return the rest of the vms

Comment 6 Tomas Jelinek 2017-01-18 08:14:28 UTC
*** Bug 1412594 has been marked as a duplicate of this bug. ***

Comment 7 Nisim Simsolo 2017-01-25 15:04:59 UTC
Verified: 
ovirt-engine-4.1.0.2-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
vdsm-4.19.1-1.el7ev.x86_64
sanlock-3.4.0-1.el7.x86_64

Test scenario added to external trackers.