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 <lyarw...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Lee Yarwood <lyarw...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to