Allon Mureinik has uploaded a new change for review. Change subject: core: Fix task parame creation regression (862799) ......................................................................
core: Fix task parame creation regression (862799) A careless refactoring introduced a regression that disallowed creating tasks for external commands. This patch fixes it, and restores the previous behaviour (albeit in a streamlined, readable, manner, that does not involve copy-pasting the same block of code over and over). Change-Id: I71290e58978b680dbbbf88b024a19482b637a91b Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=862799 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/39/8339/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java index b58ca5e..80cccac 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java @@ -798,15 +798,11 @@ VdcActionParametersBase parameters) { // If there is no parent command, the command that its type // will be stored in the DB for thr task is the one creating the command - if (parentCommandType == VdcActionType.Unknown) { + VdcActionParametersBase parentParameters = parameters.getParentParameters(); + if (parentCommandType == VdcActionType.Unknown || parentParameters == null) { return parameters; } - VdcActionParametersBase parentParameters = parameters.getParentParameters(); - if (parentParameters == null) { - String msg = "No parameters exist for " + parentCommandType; - log.error(msg); - throw new VdcBLLException(VdcBllErrors.NO_PARAMETERS_FOR_TASK, msg); - } + // The parent parameters are the ones that are kept for the task. // In order to make sure that in case of rollback-by-command, the ROLLBACK // flow will be called, the execution reason of the child command is set -- To view, visit http://gerrit.ovirt.org/8339 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71290e58978b680dbbbf88b024a19482b637a91b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
