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.
This commit is contained in:
Koushik Das 2014-02-21 16:16:52 +05:30
parent df1e3998ff
commit 167babd8c8
1 changed files with 2 additions and 0 deletions

View File

@ -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);