From 167babd8c82bd7fc476dc5dc2f632e61038dd115 Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Fri, 21 Feb 2014 16:16:52 +0530 Subject: [PATCH] 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. --- .../src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 888c7508984..d19fc38af62 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);