@@ -258,7 +258,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
258258
259259 s_logger .debug ("release mem from host: " + hostId + ", old used: " + usedMem + ",reserved: " + reservedMem + ", total: " + totalMem + "; new used: " +
260260 capacityMemory .getUsedCapacity () + ",reserved:" + capacityMemory .getReservedCapacity () + "; movedfromreserved: " + moveFromReserved +
261- ", moveToReservered" + moveToReservered );
261+ "; moveToReservered: " + moveToReservered );
262262
263263 _capacityDao .update (capacityCpu .getId (), capacityCpu );
264264 _capacityDao .update (capacityMemory .getId (), capacityMemory );
@@ -772,7 +772,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
772772 @ SuppressWarnings ("unchecked" )
773773 Pair <Long , Long > hosts = (Pair <Long , Long >)opaque ;
774774 Long oldHostId = hosts .first ();
775-
776775 State oldState = transition .getCurrentState ();
777776 State newState = transition .getToState ();
778777 Event event = transition .getEvent ();
@@ -825,15 +824,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
825824 allocateVmCapacity (vm , fromLastHost );
826825 }
827826
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-
837827 if (newState == State .Stopped ) {
838828 if (vm .getType () == VirtualMachine .Type .User ) {
839829
0 commit comments