Repository: cloudstack Updated Branches: refs/heads/master df1e3998f -> 167babd8c
CLOUDSTACK-6124: During MS maintenance unfinished work items are not cleaned up resulting in them getting repeated for every subsequent maintenance Updating the op_it_work table entry appropriately in db once the unfinished work item is completed. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/167babd8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/167babd8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/167babd8 Branch: refs/heads/master Commit: 167babd8c82bd7fc476dc5dc2f632e61038dd115 Parents: df1e399 Author: Koushik Das <[email protected]> Authored: Fri Feb 21 16:16:52 2014 +0530 Committer: Koushik Das <[email protected]> Committed: Fri Feb 21 16:29:51 2014 +0530 ---------------------------------------------------------------------- .../orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/167babd8/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---------------------------------------------------------------------- diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 888c750..d19fc38 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -2132,10 +2132,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac if (work.getType() == State.Starting) { _haMgr.scheduleRestart(vm, true); work.setManagementServerId(_nodeId); + work.setStep(Step.Done); _workDao.update(work.getId(), work); } else if (work.getType() == State.Stopping) { _haMgr.scheduleStop(vm, vm.getHostId(), WorkType.CheckStop); work.setManagementServerId(_nodeId); + work.setStep(Step.Done); _workDao.update(work.getId(), work); } else if (work.getType() == State.Migrating) { _haMgr.scheduleMigration(vm);
