Liron Aravot has posted comments on this change.
Change subject: core: NPEs in AddVmTemplate.endSuccesfully after engine crash
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
Line 361:
Line 362: @Override
Line 363: protected void endSuccessfully() {
Line 364: setVmTemplateId(getParameters().getVmTemplateId());
Line 365:
setVmId(((CreateImageTemplateParameters)getParameters().getImagesParameters().get(0)).getVmId());
mkublin, please take a look at the constructor.
in the constructor : vmId is not memeber of the parameters and not passed in
the parameters, but is taken in the constructor from the passed VmStatic data
VmStatic parameterMasterVm = parameters.getMasterVm();
public AddVmTemplateCommand(T parameters) {
if (parameterMasterVm != null) {
super.setVmId(parameterMasterVm.getId());
.....
}
}
beacuse we don't want to serialize each time the VmStatic, JSON serializer
configured to ignore it in the class JsonAddVmTemplateParametersMixIn:
@JsonIgnore
@Override
public abstract VmStatic getMasterVm();
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