Moti Asayag has posted comments on this change. Change subject: aaa: more fixes to command context propgation ......................................................................
Patch Set 1: (6 comments) http://gerrit.ovirt.org/#/c/29290/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 2179: return getBackend().runInternalQuery(type, queryParams, context.getEngineContext()); Line 2180: } Line 2181: Line 2182: protected CommandContext cloneOnlyEngineContext() { Line 2183: return getContext().withoutCompensationContext().withoutExecutionContext().withoutLock(); you're not cloning anything here... shouldn't be dupContext().with.... Line 2184: } http://gerrit.ovirt.org/#/c/29290/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java: Line 38: VdcReturnValueBase result = Line 39: runInternalAction(VdcActionType.PersistentSetupNetworks, Line 40: new AddNetworksByLabelParametersBuilder(getContext()).buildParameters(getNic(), Line 41: getLabel(), Line 42: getClusterNetworksByLabel()), getContext().clone().withoutCompensationContext().withoutExecutionContext()); you can use dupContext() instead of getContext().clone() Line 43: if (result.getSucceeded()) { Line 44: getReturnValue().setActionReturnValue(getLabel()); Line 45: } else { Line 46: propagateFailure(result); http://gerrit.ovirt.org/#/c/29290/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/PersistentSetupNetworksCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/PersistentSetupNetworksCommand.java: Line 48: if (getParameters().getShouldBeLogged()) { Line 49: AuditLogDirector.log(this, AuditLogType.PERSIST_NETWORK_ON_HOST); Line 50: } Line 51: Line 52: VdcReturnValueBase returnValue = runInternalAction(VdcActionType.SetupNetworks, getParameters(), getContext().clone().withoutCompensationContext().withoutExecutionContext()); same Line 53: if (returnValue.getSucceeded() Line 54: && SETUP_NETWORKS_RESOLUTION.NO_CHANGES_DETECTED != returnValue.getActionReturnValue()) { Line 55: VdsActionParameters parameters = new VdsActionParameters(getParameters().getVdsId()); Line 56: parameters.setShouldBeLogged(false); Line 55: VdsActionParameters parameters = new VdsActionParameters(getParameters().getVdsId()); Line 56: parameters.setShouldBeLogged(false); Line 57: parameters.setCorrelationId(getCorrelationId()); Line 58: returnValue = runInternalAction(VdcActionType.CommitNetworkChanges, Line 59: parameters, getContext().clone().withoutCompensationContext().withoutExecutionContext()); same Line 60: } Line 61: Line 62: if (!returnValue.getSucceeded()) { Line 63: propagateFailure(returnValue); http://gerrit.ovirt.org/#/c/29290/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/UnlabelNicCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/UnlabelNicCommand.java: Line 30: VdcReturnValueBase result = Line 31: runInternalAction(VdcActionType.PersistentSetupNetworks, Line 32: new RemoveNetworksByLabelParametersBuilder(getContext()).buildParameters(getNic(), Line 33: getLabel(), Line 34: getVds().getVdsGroupId()), getContext().clone().withoutCompensationContext().withoutExecutionContext()); same Line 35: Line 36: if (!result.getSucceeded()) { Line 37: propagateFailure(result); Line 38: } http://gerrit.ovirt.org/#/c/29290/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/AbstractVmInterfaceCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/AbstractVmInterfaceCommand.java: Line 41: ActivateDeactivateVmNicParameters parameters = new ActivateDeactivateVmNicParameters(nic, plugAction, newNic); Line 42: parameters.setVmId(getParameters().getVmId()); Line 43: Line 44: VdcReturnValueBase returnValue = Line 45: runInternalAction(VdcActionType.ActivateDeactivateVmNic, parameters, getContext().clone().withoutCompensationContext().withoutExecutionContext()); same Line 46: if (!returnValue.getSucceeded()) { Line 47: propagateFailure(returnValue); Line 48: } Line 49: -- To view, visit http://gerrit.ovirt.org/29290 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icbf9e0216c83d981d11bb2d8d2a939fd2a279d9d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches