Bug 1269948 - Failed to import VM / VM Template
Failed to import VM / VM Template
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
Unspecified Unspecified
urgent Severity urgent
: ovirt-3.6.0-rc3
: 3.6.0
Assigned To: Vered Volansky
Kevin Alon Goldblatt
: AutomationBlocker, Regression
: 1266930 1269930 1270022 (view as bug list)
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
  Show dependency treegraph
 
Reported: 2015-10-08 10:44 EDT by Israel Pinto
Modified: 2016-03-10 06:59 EST (History)
21 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-10 05:35:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
autmation_log_engine (1.86 MB, application/x-bzip)
2015-10-08 10:46 EDT, Israel Pinto
no flags Details
autmation_log_hosts (310.24 KB, application/x-bzip)
2015-10-08 10:47 EDT, Israel Pinto
no flags Details
manual_check_engine_log (281.48 KB, application/zip)
2015-10-08 10:49 EDT, Israel Pinto
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 47176 master MERGED core: Exclude import VM from CopyImageGroup CDA Never
oVirt gerrit 47177 refs/tags/ovirt-engine-3.6.0 MERGED core: Exclude import VM from CopyImageGroup CDA Never
oVirt gerrit 47181 refs/tags/ovirt-engine-3.6.0 ABANDONED core: Exclude import VM from CopyImageGroup CDA Never
oVirt gerrit 47182 ovirt-engine-3.6.0 MERGED core: Exclude import VM from CopyImageGroup CDA Never

  None (edit)
Description Israel Pinto 2015-10-08 10:44:52 EDT
Description of problem:
Failed to import VM.

Version-Release number of selected component (if applicable):
RHEVM: rhevm-lib-3.6.0-0.18.el6
VDSM: vdsm-4.17.8-1.el7ev

How reproducible:
All the time (manually and on automation test)

Steps to Reproduce:
1. Create new VM
2. Export VM to export domain
3. Remove VM
4. Import VM

Note: In automation the vm name is "export_vm" in manual check the vm name is "export_test"

Actual results:
Failed to import VM: "Internal Engine Error"

Expected results:
Import VM succeeded

Additional info:

From the engine log it looks like the engine says that the vm exists.
(The remove vm succeed, there is no vm with this name)
Engine log:
2015-10-08 15:10:24,990 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-7) [482b73ae] Correlation ID: vms_syncAction_1c1b246c-bbcb-4d2f, Job ID: be98fefb-769b-4430-9d0a-b79e2a970e8f, Call Stack: null, Custom Event ID: -1, Message: Failed to import Vm export_vm to Data Center golden_env_mixed, Cluster golden_env_mixed_1
2015-10-08 15:10:25,026 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-7) [482b73ae] Lock freed to object 'EngineLock:{exclusiveLocks='[export_vm=<VM_NAME, ACTION_TYPE_FAILED_NAME_ALREADY_USED>, 41029e5b-cd0e-498f-ae71-2f897d5c129f=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName export_vm>]', sharedLocks='[41029e5b-cd0e-498f-ae71-2f897d5c129f=<REMOTE_VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName export_vm>]'}'
2015-10-08 15:10:25,027 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-7) [] Operation Failed: [Internal Engine Error]



QE- Automation Engineer
int phone - 8272109
mobile - 052-4406697
Comment 1 Israel Pinto 2015-10-08 10:46 EDT
Created attachment 1081035 [details]
autmation_log_engine
Comment 2 Israel Pinto 2015-10-08 10:47 EDT
Created attachment 1081037 [details]
autmation_log_hosts
Comment 3 Israel Pinto 2015-10-08 10:49 EDT
Created attachment 1081038 [details]
manual_check_engine_log
Comment 5 Michal Skrivanek 2015-10-09 09:17:04 EDT
*** Bug 1269930 has been marked as a duplicate of this bug. ***
Comment 6 Omer Frenkel 2015-10-11 05:06:49 EDT
seems like import fails because of new storage validations in copy image command:

2015-10-08 13:30:56,623 INFO  [org.ovirt.engine.core.bll.ImportVmTemplateCommand] (org.ovirt.thread.pool-7-thread-41) [7dea2b6b] Running command: ImportVmTemplateCommand internal: false. Entities affected :  ID: 18af3aae-92c2-4c0c-8315-2d67a988a0e3 Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN
2015-10-08 13:30:57,052 WARN  [org.ovirt.engine.core.bll.CopyImageGroupCommand] (org.ovirt.thread.pool-7-thread-41) [f1da6d8] CanDoAction of action 'CopyImageGroup' failed for user admin@internal. Reasons: VAR__TYPE__STORAGE__DOMAIN
2015-10-08 13:30:57,053 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (org.ovirt.thread.pool-7-thread-41) [f1da6d8] transaction rolled back
2015-10-08 13:30:57,053 ERROR [org.ovirt.engine.core.bll.ImportVmTemplateCommand] (org.ovirt.thread.pool-7-thread-41) [f1da6d8] Command 'org.ovirt.engine.core.bll.ImportVmTemplateCommand' failed: EngineException: ENGINE (Failed with error ENGINE and code 5001)


i could also reproduce this locally with latest master.
Vered, can you please take a look?
Comment 7 Tal Nisan 2015-10-11 06:22:52 EDT
Omer, seems like this is the exception that fails the operation:

2015-10-08 15:39:10,963 ERROR [org.ovirt.engine.core.bll.ImportVmTemplateCommand] (org.ovirt.thread.pool-7-thread-4) [5d845592] Exception: java.lang.NumberFormatException: null
	at java.lang.Long.parseLong(Long.java:552) [rt.jar:1.8.0_51]
	at org.ovirt.engine.core.utils.MacAddressRangeUtils.macToLong(MacAddressRangeUtils.java:122) [utils.jar:]

It fails upon adding the devices so it's probably not a storage validation issue, can someone from you team have a look?
Comment 9 Vered Volansky 2015-10-11 08:02:57 EDT
The issue occurred locally without Any other exceptions.
CopyImageGroupCommand CDA fails since the disk is null (as it should be since the VM was removed). Some time ago there was no CDA for this command a all.
This was fixed in the patch. The same scenario is faulty (and now fixed) for ImportVMTemplate. I recommend verifying them both in this bz with this commit.
Comment 10 Tal Nisan 2015-10-11 09:45:24 EDT
OK, but this still leaves the issue of the device copying that fails with NumberFormatException
Omer, might be a good idea to see if there's a virt bug there
Comment 11 Omer Frenkel 2015-10-11 09:53:22 EDT
yes, i did take a look, cant see the reason for that, also tried to reproduce locally and failed on the can-do-action failure.

if it would consist after this is fixed, i'll try again and look deeper
Comment 12 Allon Mureinik 2015-10-11 15:48:30 EDT
*** Bug 1270022 has been marked as a duplicate of this bug. ***
Comment 13 Arik 2015-10-12 07:37:23 EDT
*** Bug 1266930 has been marked as a duplicate of this bug. ***
Comment 14 Carlos Mestre González 2015-10-20 17:10:42 EDT
Verified in 3.6.0-16 with NFS/ISCSI with vms and templates. 

Omer: is there any specific input to reproduce this NumberFormatException? is virt related? I'm marking this as verified (since from the storage part the bug is fixed)
Comment 15 Omer Frenkel 2015-10-21 03:05:02 EDT
(In reply to Carlos Mestre González from comment #14)
> Verified in 3.6.0-16 with NFS/ISCSI with vms and templates. 
> 
> Omer: is there any specific input to reproduce this NumberFormatException?

No, i could not reproduce this myself as well.

> is virt related? I'm marking this as verified (since from the storage part
> the bug is fixed)

if that exception would happen at some point, it should be a different bug.
this one tracks the storage validation issue
Comment 16 Allon Mureinik 2016-03-10 05:35:21 EST
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE
Comment 17 Allon Mureinik 2016-03-10 05:37:08 EST
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE
Comment 18 Allon Mureinik 2016-03-10 05:42:46 EST
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE
Comment 19 Allon Mureinik 2016-03-10 06:59:37 EST
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

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