Juan Hernandez has uploaded a new change for review. Change subject: core: Load VM disks before updating ......................................................................
core: Load VM disks before updating The list of disks of a VM object needs to be loaded before comparing it to the VM object given in the parameters of the update operation, otherwise we assume that the list of disks has changed and the update can't be performed. Change-Id: I0fa0a0397a44adc93680eae593a92346f9e67600 Bug-Url: https://bugzilla.redhat.com/1059713 Signed-off-by: Juan Hernandez <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/24060/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java index 9cfa278..9113f98 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java @@ -250,6 +250,8 @@ return false; } + populateVm(vmFromDB); + if (!canRunActionOnNonManagedVm()) { return false; } @@ -630,4 +632,14 @@ return getParameters().getWatchdog() != null; } + /** + * The VM object, as loaded by the {@link #getVm()} method, doesn't contain all the required information in order to + * compare it to another fully populated VM object. This method populates the VM with the additional required + * information, in particular with the list of disks. + * + * @param vm the VM object that will be populated + */ + private void populateVm(VM vm) { + VmHandler.updateDisksFromDb(vm); + } } -- To view, visit http://gerrit.ovirt.org/24060 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fa0a0397a44adc93680eae593a92346f9e67600 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
