Bug 1352422 - Import a VM created on a storage pool that doesn't exist in the current deployment fails with NullPointerException
Summary: Import a VM created on a storage pool that doesn't exist in the current deplo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-4.0.1
: 4.0.1.1
Assignee: Tal Nisan
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-04 06:54 UTC by Nisim Simsolo
Modified: 2016-08-22 12:29 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-22 12:29:14 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
tnisan: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine log (2.11 MB, text/plain)
2016-07-04 08:33 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 60131 0 master MERGED core: Pass storage pool ID to disk images on storage validation 2020-11-06 20:22:27 UTC
oVirt gerrit 60137 0 ovirt-engine-4.0 MERGED core: Pass storage pool ID to disk images on storage validation 2020-11-06 20:22:27 UTC
oVirt gerrit 60140 0 ovirt-engine-4.0.1 MERGED core: Pass storage pool ID to disk images on storage validation 2020-11-06 20:22:27 UTC

Description Nisim Simsolo 2016-07-04 06:54:25 UTC
Description of problem:
Trying to import VM from export domain failed with the next engine.log error: 
2016-07-04 09:46:38,839 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmCommand] (default task-11) [64bb86aa] Error during ValidateFailure.: org.ovirt.engine.core.common.errors.Eng
ineException: EngineException: java.lang.NullPointerException (Failed with error ENGINE and code 5001)

Version-Release number of selected component (if applicable):
rhevm-4.0.2-0.2.rc1.el7ev
vdsm-4.18.999-170.git0a993e4.el7.centos.x86_64
libvirt-client-1.2.17-13.el7_2.5.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.17.x86_64
sanlock-3.2.4-2.el7_2.x86_64

How reproducible:
100%

Steps to Reproduce:
1. import VM from export domain
2.
3.

Actual results:
The next "operation canceled" message poped up in webadmin: 
    Error while executing action: 
    VM:
    General command validation failure.

in engine.log the next ERROR is listed: NullPointerException (Failed with error ENGINE and code 5001)

Expected results:
Import VM should succeed without errors.

Additional info:
engine.log attached. 
issue occured at 2016-07-04 09:46:38,803

Comment 1 Allon Mureinik 2016-07-04 08:15:16 UTC
Logs?

Comment 2 Nisim Simsolo 2016-07-04 08:33:41 UTC
Created attachment 1175858 [details]
engine log

Comment 3 Tal Nisan 2016-07-04 12:10:38 UTC
Some clarification on the exact steps to reproduce as this bug will not be reproduced otherwise:

- Create an export domain on a specific storage pool and export a VM with disks to it
- Detach the export domain from the storage pool and attach it to another storage pool
- Remove the original storage pool from the system
- Try to import the VM in the new storage pool


This is caused since the storage pool ID is taken from the images themselves in the export domain, since the storage pool does not exist the operation fails, if we'd try to import the images in the original storage pool they were exported from it will work correctly.

Comment 4 Kevin Alon Goldblatt 2016-08-17 20:27:33 UTC
Tested with the following code:
----------------------------------------
rhevm-4.0.2.4-0.1.el7ev.noarch
vdsm-4.18.10-1.el7ev.x86_64

Tested with the following scenario:


Steps to Reproduce:
- Create an export domain on a specific storage pool and export a VM with disks to it
- Detach the export domain from the storage pool and attach it to another storage pool
- Remove the original storage pool from the system
- Try to import the VM in the new storage pool - Select the Domain  - Import VMs - Select the VM and import it successfully


Actual results:
The vm is successfully imported


Moving to VERIFIED!


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