host is stucked in prepareMaintenance mode if you put last host into maintenance mode,

fixed
This commit is contained in:
anthony 2011-06-27 11:30:23 -07:00
parent 18dc85c765
commit 3ab96b99af
1 changed files with 2 additions and 4 deletions

View File

@ -940,7 +940,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
VirtualMachineGuru<T> vmGuru = getVmGuru(vm);
try {
if (!stateTransitTo(vm, forced ? Event.AgentReportStopped : Event.StopRequested, vm.getHostId(), null)) {
if (!stateTransitTo(vm, Event.StopRequested, vm.getHostId(), null)) {
throw new ConcurrentOperationException("VM is being operated on.");
}
} catch (NoTransitionException e1) {
@ -1018,10 +1018,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
s_logger.warn("Unable to release storage resources.", e);
}
vm.setReservationId(null);
try {
return stateTransitTo(vm, Event.OperationSucceeded, null);
return stateTransitTo(vm, Event.OperationSucceeded, null, null);
} catch (NoTransitionException e) {
s_logger.warn(e.getMessage());
return false;