Liron Aravot has uploaded a new change for review. Change subject: core: always perform ovf update after disk creation ......................................................................
core: always perform ovf update after disk creation Currently the OVF Update is performed after the disk creation only if atleast one OVF store creation succeeds. The reason for that is that prior to change I54cc9 the OVF update flow first updated the existing OVF stores, then created new stores if needed and if atleast of creation was succesful - update the OVF data. As in change I54cc9 the order of operations was change (first the OVF disks are created and then the OVF data is updated) performing the update only if one disk succeeded is wrong and it should be done always. Change-Id: Ic029f819f2d0c0a51c098667daa319b921f8750c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138124 Signed-off-by: Liron Aravot <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfStoresForStorageDomainCommand.java 1 file changed, 5 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/35950/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfStoresForStorageDomainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfStoresForStorageDomainCommand.java index 69fe786..7ff7b65 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfStoresForStorageDomainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfStoresForStorageDomainCommand.java @@ -63,11 +63,9 @@ } private void endCommandOperations() { - boolean atleastOneSucceeded = false; for (VdcActionParametersBase p : getParameters().getImagesParameters()) { Guid diskId = ((AddImageFromScratchParameters) p).getDiskInfo().getId(); if (p.getTaskGroupSuccess()) { - atleastOneSucceeded = true; StorageDomainOvfInfo storageDomainOvfInfoDb = getStorageDomainOvfInfoDao() @@ -92,13 +90,11 @@ } } - if (atleastOneSucceeded) { - // if we'd have the possibility to know whether we failed because of failure to acquire locks as there's an - // update in progress, we could - // try again (avoid setSucceeded(true) in that scenario). - VdcReturnValueBase returnValue = runInternalActionWithTasksContext(VdcActionType.ProcessOvfUpdateForStorageDomain, createProcessOvfUpdateForDomainParams(), null); - getReturnValue().getInternalVdsmTaskIdList().addAll(returnValue.getInternalVdsmTaskIdList()); - } + // if we'd have the possibility to know whether we failed because of failure to acquire locks as there's an + // update in progress, we could + // try again (avoid setSucceeded(true) in that scenario). + VdcReturnValueBase returnValue = runInternalActionWithTasksContext(VdcActionType.ProcessOvfUpdateForStorageDomain, createProcessOvfUpdateForDomainParams(), null); + getReturnValue().getInternalVdsmTaskIdList().addAll(returnValue.getInternalVdsmTaskIdList()); setSucceeded(true); } -- To view, visit http://gerrit.ovirt.org/35950 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic029f819f2d0c0a51c098667daa319b921f8750c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Liron Aravot <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
