@@ -245,7 +245,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
245
245
246
246
s_logger .debug ("release mem from host: " + hostId + ", old used: " + usedMem + ",reserved: " + reservedMem + ", total: " + totalMem + "; new used: " +
247
247
capacityMemory .getUsedCapacity () + ",reserved:" + capacityMemory .getReservedCapacity () + "; movedfromreserved: " + moveFromReserved +
248
- ", moveToReservered" + moveToReservered );
248
+ "; moveToReservered: " + moveToReservered );
249
249
250
250
_capacityDao .update (capacityCpu .getId (), capacityCpu );
251
251
_capacityDao .update (capacityMemory .getId (), capacityMemory );
@@ -811,7 +811,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
811
811
@ SuppressWarnings ("unchecked" )
812
812
Pair <Long , Long > hosts = (Pair <Long , Long >)opaque ;
813
813
Long oldHostId = hosts .first ();
814
-
815
814
State oldState = transition .getCurrentState ();
816
815
State newState = transition .getToState ();
817
816
Event event = transition .getEvent ();
@@ -864,15 +863,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
864
863
allocateVmCapacity (vm , fromLastHost );
865
864
}
866
865
867
- if (oldState == State .Migrating && newState == State .Running ) {
868
- boolean fromLastHost = false ;
869
- if (vm .getHostId ().equals (vm .getLastHostId ())) {
870
- s_logger .debug ("VM starting again on the last host it was stopped on" );
871
- fromLastHost = true ;
872
- }
873
- allocateVmCapacity (vm , fromLastHost );
874
- }
875
-
876
866
if (newState == State .Stopped ) {
877
867
if (vm .getType () == VirtualMachine .Type .User ) {
878
868
0 commit comments