Liron Aravot has uploaded a new change for review.

Change subject: core: ImportVm - avoid early run of end method
......................................................................

core: ImportVm - avoid early run of end method

When creating tasks for the imported vm images, the parameters entity id
was set to the disk id - this caused that the end method of import vm
command will be called before the tasks on all disks were finished -
causing to the vm and it's disks appear as OK while there not all tasks
has finished running which can cause to hazardous issues and to the end
method to be called for each disk separately.

Change-Id: I0598698bb85c8359b981b643ee26e7cb777707b9
NOTE: ImportVmTemplate is handled in a different patch.
Signed-off-by: Liron Aravot <lara...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/26/11326/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
index 1e1725b..d671312 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
@@ -562,7 +562,7 @@
             p.setSourceDomainId(getParameters().getSourceDomainId());
             p.setStoragePoolId(getParameters().getStoragePoolId());
             p.setImportEntity(true);
-            p.setEntityId(disk.getImageId());
+            p.setEntityId(getVm().getId());
             p.setQuotaId(disk.getQuotaId() != null ? disk.getQuotaId() : 
getParameters().getQuotaId());
             if (getParameters().getVm().getDiskMap() != null
                     && 
getParameters().getVm().getDiskMap().containsKey(diskGuidList.get(i))) {


--
To view, visit http://gerrit.ovirt.org/11326
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0598698bb85c8359b981b643ee26e7cb777707b9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <lara...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to