Maor Lipchuk has posted comments on this change.

Change subject: core: Remove image while VDSM returns not exist.
......................................................................


Patch Set 1: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 294:             setLock(null);
Line 295:             if (vdcReturnValue.getSucceeded()) {
Line 296:                 getParameters().getImagesParameters().add(p);
Line 297:                 setSucceeded(vdcReturnValue.getSucceeded());
Line 298:                 if (vdcReturnValue.getInternalTaskIdList().isEmpty()) 
{
if vdcReturnValue.getSucceeded() == true then one of two should occour

1) task was created 
2) We got ImageDoesnotExist error. (which will cause the internal task list to 
be empty)
Line 299:                     // We get here if we got 
imageDoesNotExistsInDomain for the disk image from VDSM.
Line 300:                     endCommand();
Line 301:                 } else {
Line 302:                     
getReturnValue().getTaskIdList().addAll(vdcReturnValue.getInternalTaskIdList());


Line 296:                 getParameters().getImagesParameters().add(p);
Line 297:                 setSucceeded(vdcReturnValue.getSucceeded());
Line 298:                 if (vdcReturnValue.getInternalTaskIdList().isEmpty()) 
{
Line 299:                     // We get here if we got 
imageDoesNotExistsInDomain for the disk image from VDSM.
Line 300:                     endCommand();
true, will do.
Line 301:                 } else {
Line 302:                     
getReturnValue().getTaskIdList().addAll(vdcReturnValue.getInternalTaskIdList());
Line 303:                 }
Line 304: 


Line 298:                 if (vdcReturnValue.getInternalTaskIdList().isEmpty()) 
{
Line 299:                     // We get here if we got 
imageDoesNotExistsInDomain for the disk image from VDSM.
Line 300:                     endCommand();
Line 301:                 } else {
Line 302:                     
getReturnValue().getTaskIdList().addAll(vdcReturnValue.getInternalTaskIdList());
why?
Line 303:                 }
Line 304: 
Line 305:             }
Line 306:         } else {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveTemplateSnapshotCommand.java
Line 42:                                 VdcActionType.RemoveVmTemplate,
Line 43:                                 VdcObjectType.Storage,
Line 44:                                 getParameters().getStorageDomainId()));
Line 45: 
Line 46:                 setSucceeded(true);
true
Line 47:             }
Line 48:         } catch (VdcBLLException e) {
Line 49:             if (e.getErrorCode() == 
VdcBllErrors.ImageDoesNotExistInDomainError) {
Line 50:                 log.errorFormat("Image {0} does not exists in domain 
{1}. Removing disk from DB only.",


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
Line 76:         if (getParameters().isRemoveDisks() && hasImages) {
Line 77:             if (!removeVmImages(null)) {
Line 78:                 return false;
Line 79:             // We get here if we got imageDoesNotExistsInDomain for 
all the VM disks from VDSM.
Line 80:             } else if (getReturnValue().getTaskIdList().isEmpty()) {
done
Line 81:                 endCommandWithoutTasks();
Line 82:             }
Line 83:         }
Line 84:         else {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I36915c44e65e20e3ce222683650a562603e4bb05
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to