liron aravot has posted comments on this change.
Change subject: core: Remove image while VDSM returns not exist.
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
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();
this should be done as transaction
Line 301: } else {
Line 302:
getReturnValue().getTaskIdList().addAll(vdcReturnValue.getInternalTaskIdList());
Line 303: }
Line 304:
....................................................
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);
this should be set to true also in case of ImageDoesNotExistInDomainError no?
like in RemoveImage
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()) {
no need for the "else" word..it's just makes the code more confusing in my
opinion.
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: liron aravot <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches