Michael Kublin has posted comments on this change.
Change subject: core: NPEs in AddVmTemplate.endSuccesfully after engine crash
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
I don't understand how these patch should solve something, and how we can loose
vmId if crash of engine occurred.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
Line 113:
Line 114: VmHandler.LockVm(vmDynamic, getCompensationContext());
Line 115: setActionReturnValue(Guid.Empty);
Line 116: setVmTemplateId(Guid.NewGuid());
Line 117: getParameters().setVmTemplateId(getVmTemplateId());
The change of name is good but these is bullshit that it should solve any
NullPointerException after engine crash. How, change of the name can provide a
correct parameter?
Line 118: getParameters().setEntityId(getVmTemplateId());
Line 119:
Line 120: TransactionSupport.executeInNewTransaction(new
TransactionMethod<Void>() {
Line 121:
Line 361:
Line 362: @Override
Line 363: protected void endSuccessfully() {
Line 364: setVmTemplateId(getParameters().getVmTemplateId());
Line 365:
setVmId(((CreateImageTemplateParameters)getParameters().getImagesParameters().get(0)).getVmId());
Why I need setVmId it is passed via parameters, look mat contractor of command.
The command should create template from vm, so vmId is passed to command and
should not be retrieved from some parameters.
Line 366: for (VdcActionParametersBase p :
getParameters().getImagesParameters()) {
Line 367:
Backend.getInstance().EndAction(VdcActionType.CreateImageTemplate, p);
Line 368: }
Line 369: if (reloadVmTemplateFromDB() != null) {
--
To view, visit http://gerrit.ovirt.org/9106
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I12c40cd3736a0516473de223ec84301f84983d3b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches