Bug 1571039 - [DR] - Registering of a VM containing snapshots with memory from an imported domain fails with an NPE
Summary: [DR] - Registering of a VM containing snapshots with memory from an imported ...
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backup-Restore.VMs
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.2.3
: ---
Assignee: Tal Nisan
QA Contact: Natalie Gavrielov
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-24 02:01 UTC by i.am.stack
Modified: 2018-12-12 16:32 UTC (History)
10 users (show)

Fixed In Version: ovirt-engine-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-10 06:28:36 UTC
oVirt Team: Storage
rule-engine: ovirt-4.2+
rule-engine: blocker+

Attachments (Terms of Use)
The error from ovirt-engine.log (15.16 KB, text/plain)
2018-04-24 02:01 UTC, i.am.stack
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 90806 0 master MERGED core: Change validation of memory disks when registering a VM 2020-06-16 15:38:42 UTC
oVirt gerrit 90807 0 ovirt-engine-4.2 MERGED core: Change validation of memory disks when registering a VM 2020-06-16 15:38:42 UTC
oVirt gerrit 90808 0 ovirt-engine-4.2.3.z MERGED core: Change validation of memory disks when registering a VM 2020-06-16 15:38:42 UTC

Description i.am.stack 2018-04-24 02:01:52 UTC
Created attachment 1425772 [details]
The error from ovirt-engine.log

Description of problem:
I recently broke my oVirt installation. The mailing list helped me do a fresh re-install. Once that was up and functioning correctly, I imported my VM's from the previous install. All but one imported correctly and appear to be functional without issue. The one throws an error and the list asked that I open a report.

When I try to import that one VM I get the error "General
command validation failure." within the GUI. I have 
added as an attachment the output of the ovirt-engine.log.

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

How reproducible:
For me, every time.

Steps to Reproduce:
1. Storage -> Domains -> Data Domain -> VM Import
2. Select the VM -> Import
3. Click OK in the pop-up window.

Actual results:
"Error while executing action: Infra01: General
command validation failure."

Expected results:
An imported VM like all the rest.

Additional info:

OS: Scientific Linux 7.4 fully updated. For self-hosted engine and the 4 hypervisor hosts.

Storage: NFS mount.

Roy Golan posted to the list the following information (I am not sure how to interpret it so I hope it is useful - it is just the best lead I've got right now):
"I suspect
                List<Guid> guids = Guid.createGuidListFromString(snap.getMemoryVolume());

where guids is empty because there is not memory volume. which fails this

                StorageDomain sd = getStorageDomainDao().getForStoragePool(guids.get(0), params.getStoragePoolId());

What else can I give  you to help with the issue?

Comment 1 i.am.stack 2018-04-24 02:06:50 UTC
I selected the correct version in the menu, typed the wrong one in the comment. My apologies. The version is

Comment 2 Michal Skrivanek 2018-04-24 06:20:40 UTC
Tal, looks like you/Maor touched it recently

Comment 3 Yaniv Lavi 2018-05-01 08:18:51 UTC
Can you reproduce this bug?

Comment 4 Yaniv Lavi 2018-05-01 08:30:39 UTC
Maor said on thread:
It seems like a regression from 55a71302ef91c91e8d9d418794ea3be990dcfe71
Since memory disk was not considered a disk entity in the engine, the VM regisatration worked well.
Now, that the memory disk became an entity and the validation was added, it should also be addressed in the VM's OVF.
Now it isn't part of the VM's OVF and the disk does not get created in the DB and that is probably why the operation fails.

Comment 5 Elad 2018-05-01 08:33:04 UTC
Natalie, pease check, thanks

Comment 6 Tal Nisan 2018-05-01 08:45:17 UTC
I managed to reproduce it myself on 4.2.z, working on a solution

Comment 7 Tal Nisan 2018-05-01 18:43:33 UTC
Pushed a fix that handles the NPE yet there's a major flow in the flow that needs to be fixed, I've opened bug 1573600 for that issue

Comment 8 Natalie Gavrielov 2018-05-06 15:40:49 UTC

I've ran the scenario in comment 0 with build rhvm-
Now, there is no NPE, and the VM is registered, but the engine log shows that it fails to add the memory snapshots, this patch only takes care of the vm's registration? (not including the memory snapshots?)

Comment 9 Tal Nisan 2018-05-07 09:45:23 UTC
Yes, the importing of memory snapshot was broken from day one, that's why I've opened bug 1573600 for

Comment 10 Natalie Gavrielov 2018-05-08 08:05:58 UTC
Following comment 8 and comment 9 moving to verified.

Comment 11 Sandro Bonazzola 2018-05-10 06:28:36 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

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