mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
host is stucked in prepareMaintenance mode if you put last host into maintenance mode,
fixed Conflicts: server/src/com/cloud/vm/VirtualMachineManagerImpl.java
This commit is contained in:
parent
a59d70e7e4
commit
9b56ac973e
@ -931,7 +931,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) {
|
||||
@ -1009,13 +1009,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
||||
s_logger.warn("Unable to release storage resources.", e);
|
||||
}
|
||||
|
||||
vm.setReservationId(null);
|
||||
|
||||
try {
|
||||
if (!forced)
|
||||
return stateTransitTo(vm, Event.OperationSucceeded, null);
|
||||
else
|
||||
return true;
|
||||
return stateTransitTo(vm, Event.OperationSucceeded, null, null);
|
||||
} catch (NoTransitionException e) {
|
||||
s_logger.warn(e.getMessage());
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user