mirror of https://github.com/apache/cloudstack.git
host is stucked in prepareMaintenance mode if you put last host into maintenance mode,
fixed
This commit is contained in:
parent
18dc85c765
commit
3ab96b99af
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue