@@ -258,7 +258,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
258
258
259
259
s_logger .debug ("release mem from host: " + hostId + ", old used: " + usedMem + ",reserved: " + reservedMem + ", total: " + totalMem + "; new used: " +
260
260
capacityMemory .getUsedCapacity () + ",reserved:" + capacityMemory .getReservedCapacity () + "; movedfromreserved: " + moveFromReserved +
261
- ", moveToReservered" + moveToReservered );
261
+ "; moveToReservered: " + moveToReservered );
262
262
263
263
_capacityDao .update (capacityCpu .getId (), capacityCpu );
264
264
_capacityDao .update (capacityMemory .getId (), capacityMemory );
@@ -772,7 +772,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
772
772
@ SuppressWarnings ("unchecked" )
773
773
Pair <Long , Long > hosts = (Pair <Long , Long >)opaque ;
774
774
Long oldHostId = hosts .first ();
775
-
776
775
State oldState = transition .getCurrentState ();
777
776
State newState = transition .getToState ();
778
777
Event event = transition .getEvent ();
@@ -825,15 +824,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
825
824
allocateVmCapacity (vm , fromLastHost );
826
825
}
827
826
828
- if (oldState == State .Migrating && newState == State .Running ) {
829
- boolean fromLastHost = false ;
830
- if (vm .getHostId ().equals (vm .getLastHostId ())) {
831
- s_logger .debug ("VM starting again on the last host it was stopped on" );
832
- fromLastHost = true ;
833
- }
834
- allocateVmCapacity (vm , fromLastHost );
835
- }
836
-
837
827
if (newState == State .Stopped ) {
838
828
if (vm .getType () == VirtualMachine .Type .User ) {
839
829
0 commit comments