Roy Golan has posted comments on this change.

Change subject: core: add support to update running vm
......................................................................


Patch Set 11:

(5 comments)

http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java:

Line 135:         return mUpdateVmsStatic.IsUpdateValid(source, destination);
Line 136:     }
Line 137: 
Line 138:     public static boolean copyNonEditableFieldsToDestination(VmStatic 
source, VmStatic destination) {
Line 139:         return 
mUpdateVmsStatic.copyNonEditableFieldsToDestination(source, destination);
the return value isn't being used. should it?
Line 140:     }
Line 141: 
Line 142:     /**
Line 143:      * Verifies the add vm command .


http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolHandler.java:

Line 69:      */
Line 70:     private static void ApplyNextRunConfiguration(Guid vmId) {
Line 71:         // Remove snpashot first, in case other update is in progress, 
it will block this one with exclusive lock
Line 72:         // and any newer update should be preffered to this one.
Line 73:         Snapshot runSnap = 
DbFacade.getInstance().getSnapshotDao().get(vmId, SnapshotType.NEXT_RUN);
can we just go and remove the snapshot and spare the roundtrip to fetch it?
Line 74:         if (runSnap != null) {
Line 75:             
DbFacade.getInstance().getSnapshotDao().remove(runSnap.getId());
Line 76:             VM vm = DbFacade.getInstance().getVmDao().get(vmId);
Line 77:             if (vm != null) {


Line 83:                 vm.setExportDate(null);
Line 84:                 vm.setOvfVersion(null);
Line 85: 
Line 86:                 VmManagementParametersBase updateVmParams = 
createUpdateVmParameters(vm);
Line 87:                 vm.getManagedVmDeviceMap().clear();
why is this needed? I don't see the vm object in use later
Line 88:                 vm.getVmUnamagedDeviceList().clear();
Line 89:                 
Backend.getInstance().runInternalAction(VdcActionType.UpdateVm, updateVmParams);
Line 90:             }
Line 91:         }


http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java:

Line 155: 
Line 156:     @CopyOnNewVersion
Line 157:     @EditableField
Line 158:     @Size(max = BusinessEntitiesDefinitions.GENERAL_MAX_SIZE)
Line 159:     private String isoPath;
what is the effect of changing this while VM runs?
Line 160: 
Line 161:     private OriginType origin;
Line 162: 
Line 163:     @CopyOnNewVersion


http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java:

Line 111:      * @param destination object to copy the non editable to it
Line 112:      */
Line 113:     public boolean copyNonEditableFieldsToDestination(Object source, 
Object destination) {
Line 114:         Class<?> cls = source.getClass();
Line 115:         while (!cls.equals(Object.class)) {
is this check necessary?
Line 116:             for (Field srcFld : cls.getDeclaredFields()) {
Line 117:                 try {
Line 118:                     if (!Modifier.isFinal(srcFld.getModifiers()) && 
!IsFieldUpdatable(srcFld.getName())) {
Line 119:                         srcFld.setAccessible(true);


-- 
To view, visit http://gerrit.ovirt.org/26758
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie433352852f53f62e58349ce85475ee89e37ce89
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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