Tomas Jelinek has posted comments on this change. Change subject: core: added is_run_once flag to vm_dynamic ......................................................................
Patch Set 1: (3 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java Line 59: @Override Line 60: protected CreateVmVDSCommandParameters initCreateVmParams() { Line 61: CreateVmVDSCommandParameters createVmParams = super.initCreateVmParams(); Line 62: Line 63: getVm().setRunOnce(true); you are right - I will do that. Line 64: RunVmOnceParams runOnceParams = getParameters(); Line 65: Line 66: SysPrepParams sysPrepParams = new SysPrepParams(); Line 67: sysPrepParams.setSysPrepDomainName(runOnceParams.getSysPrepDomainName()); .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java Line 225: * The VM's ID Line 226: * @param isRunOnce Line 227: * Whether or not the VM is running in run once. Line 228: */ Line 229: void saveIsRunOnce(Guid vmid, boolean isRunOnce); please see the comment in CreateVmVDSCommand - it is actually updated only alone. Line 230: Line 231: /** Line 232: * Removes the VM with the specified id. Line 233: * .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/CreateVmVDSCommand.java Line 42: command.execute(); Line 43: if (command.getVDSReturnValue().getSucceeded()) { Line 44: vm.setInitialized(true); Line 45: saveSetInitializedToDb(vm.getId()); Line 46: DbFacade.getInstance().getVmDao().saveIsRunOnce(vm.getId(), vm.isRunOnce()); We can not do this - the is_run_once is not known by VDSM so it will not be returned from it so the VdsBrokerObjectsBuilder.updateVMDynamicData will not build it correctly (unless I would hit the DB each time which is even worse). So it has to be updated separately and not by DbFacade.getInstance().getVmDynamicDao().update otherwise it would be set to "false" by VdsUpdateRunTimeInfo. Line 47: Line 48: TransactionSupport.executeInScope(TransactionScopeOption.Required, Line 49: new TransactionMethod<Object>() { Line 50: @Override -- To view, visit http://gerrit.ovirt.org/17481 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25acdbcc84d326c694d7ae5ff1facaf13e5d683e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches