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 4: Code-Review+1 (3 comments) Basically +1, please see a few minor implementation nits inline. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmImagesCommand.java Line 59: Line 60: if (vdcReturnValue.getSucceeded()) { Line 61: getReturnValue().getInternalVdsmTaskIdList().addAll(vdcReturnValue.getInternalVdsmTaskIdList()); Line 62: } else { Line 63: StorageDomain domain = DbFacade.getInstance().getStorageDomainDao().get(image.getStorageIds().get(0)); please use getStorageDomainDao() instead of DbFacade.getInstance().getStorageDomainDao() Line 64: failedRemoving.add(image); Line 65: log.errorFormat("Can't remove image id: {0} for VM id: {1} from domain id: {2} due to: {3}.", Line 66: image.getImageId(), Line 67: getParameters().getVmId(), Line 68: image.getStorageIds().get(0), Line 69: vdcReturnValue.getFault().getMessage()); Line 70: Line 71: if (domain.getStorageDomainType() == StorageDomainType.Data) { Line 72: log.error("Image will be set at illegal state with no snapshot id."); I'd reduce this to log.info - you are reporting how the previous error ("Can't remove image...") is handled, not an error per-se. Line 73: TransactionSupport.executeInScope(TransactionScopeOption.Required, Line 74: new TransactionMethod<Object>() { Line 75: @Override Line 76: public Object runInTransaction() { Line 80: return true; Line 81: } Line 82: }); Line 83: } else { Line 84: log.error("The image is not on a data domain and will not be marked as illegal."); I'd reduce this to log.info - you are reporting how the previous error ("Can't remove image...") is handled, not an error per-se. Line 85: } Line 86: } Line 87: } Line 88: } -- 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: 4 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