Sergey Gotliv has posted comments on this change.
Change subject: backend: unlock imported glance image on create errors
......................................................................
Patch Set 1:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCreateTaskHandler.java
Line 106: public void endWithFailure() {
Line 107:
enclosingCommand.getParameters().getDiskImage().setImageStatus(ImageStatus.ILLEGAL);
Line 108: ImagesHandler.updateImageStatus(
Line 109:
enclosingCommand.getParameters().getDiskImage().getImageId(),
Line 110:
enclosingCommand.getParameters().getDiskImage().getImageStatus());
compensate() calls to RemoveDiskCommand which calls to RemoveImageCommand which
first marks the image as ILLEGAL...
Do you need mark it as ILLEGAL either?
Line 111: compensate();
Line 112: enclosingCommand.getReturnValue().setSucceeded(true);
Line 113: }
Line 114:
Line 107:
enclosingCommand.getParameters().getDiskImage().setImageStatus(ImageStatus.ILLEGAL);
Line 108: ImagesHandler.updateImageStatus(
Line 109:
enclosingCommand.getParameters().getDiskImage().getImageId(),
Line 110:
enclosingCommand.getParameters().getDiskImage().getImageStatus());
Line 111: compensate();
This comment is not related to this patch.
Why compensate() call to RemoveDiskCommand() and not RemoveImageCommand
directly?
Line 112: enclosingCommand.getReturnValue().setSucceeded(true);
Line 113: }
Line 114:
Line 115: @Override
--
To view, visit http://gerrit.ovirt.org/19371
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I49054d36eef780d0902f7dcd448ca44797f42916
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches