Repository: cloudstack Updated Branches: refs/heads/4.3-forward 96355dca4 -> c6a8659ac
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/c6a8659a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6a8659a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6a8659a Branch: refs/heads/4.3-forward Commit: c6a8659ac2c2c85c6f0e9fb8af11606aaa2f9a37 Parents: 96355dc Author: Koushik Das <[email protected]> Authored: Fri Feb 21 16:16:52 2014 +0530 Committer: Koushik Das <[email protected]> Committed: Fri Feb 21 16:16:52 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/c6a8659a/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 3405d44..bc6b65d 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -2129,10 +2129,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);
