Omer Frenkel has posted comments on this change. Change subject: core: Change Vm status on destroy only for SRC VMs ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/25568/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java: Line 54: for (VmNetworkInterface ifc : interfaces) { Line 55: VmNetworkStatistics stats = ifc.getStatistics(); Line 56: DbFacade.getInstance().getVmNetworkStatisticsDao().update(stats); Line 57: } Line 58: } not sure if all the updates above need to be done in case this is not the host running the vm Line 59: DbFacade.getInstance() Line 60: .getVdsDynamicDao() Line 61: .updatePartialVdsDynamicCalc(getVdsId(), 0, 0, 0, Line 62: -curVm.getVmMemSizeMb(), -curVm.getNumOfCpus()); Line 91: } Line 92: Line 93: private void changeStatus(DestroyVmVDSCommandParameters parameters, VM curVm) { Line 94: // do the state transition only if that VM is really running on SRC Line 95: if (curVm.getRunOnVds() != null || curVm.getStatus() != VMStatus.MigratingTo) { i thought we will compare the vm.runOnVds with getVdsId() this way you take into consideration all cases and not only the specific migration flow Line 96: // Updating the DB Line 97: ResourceManager.getInstance().InternalSetVmStatus(curVm, Line 98: parameters.getGracefully() ? VMStatus.PoweringDown : VMStatus.Down); Line 99: } -- To view, visit http://gerrit.ovirt.org/25568 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I422e75fc863e3416261a4d3eaef4312dc933bdac Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches