Allon Mureinik has posted comments on this change.
Change subject: core: Avoid marking imported images as illegal when removing a
guest from an import domain.
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmImagesCommand.java
Line 64: getParameters().getVmId(),
Line 65: vdcReturnValue.getFault().getMessage());
Line 66:
Line 67: if (getParameters().getParentCommand() !=
VdcActionType.RemoveVmFromImportExport
Line 68: && getParameters().getParentCommand() !=
VdcActionType.RemoveVmTemplateFromImportExport) {
I'm not a fan of this solution - it creates an additional coupling between the
different commands.
How about the following approach - we should only update the status if the
image is on a DATA domain:
[pseudo code]
StorageDomain sd = getStorageDomainDao().get(image.getStorageDoaminIds().get(0);
if (sd.getStorageDomainType().isData()) {
// update status to illegal...
}
Line 69: log.error("Image will be set at illegal state
with no snapshot id.");
Line 70:
Line 71:
TransactionSupport.executeInScope(TransactionScopeOption.Required,
Line 72: new TransactionMethod<Object>() {
--
To view, visit http://gerrit.ovirt.org/18708
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I08a2163caaa48f58c5f24f32483cc43d03078348
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lee Yarwood <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Lee Yarwood <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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