You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by mice xia <mi...@tcloudcomputing.com> on 2012/07/27 05:47:56 UTC

Review Request: Fix bug CS-15679 Max guest limit of hypervisor capabilities does not work

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6167/
-----------------------------------------------------------

Review request for cloudstack, Prachi Damle, Nitin Mehta, and Koushik Das.


Description
-------

-changes in CapacityManager/CapacityManagerImpl
hypervisor maxGuest limit check logic is extracted as a method "checkIfHostReachMaxGuestLimit" in capacityManager
instead of ==, use >= to check the limit

-changes in FirstFitAllocator
call checkIfHostReachMaxGuestLimit to check max guest limist

-changes in FirstFitPlanner
call checkIfHostReachMaxGuestLimit to check max guest limist, for situation that last_host_id exists

-changes in UserVmManagerImpl
call checkIfHostReachMaxGuestLimit to check max guest limist, for migration destination check


This addresses bug CS-15679.


Diffs
-----

  server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java ac2e92b 
  server/src/com/cloud/capacity/CapacityManager.java aad0d46 
  server/src/com/cloud/capacity/CapacityManagerImpl.java f400e44 
  server/src/com/cloud/deploy/FirstFitPlanner.java e70ea4d 
  server/src/com/cloud/vm/UserVmManagerImpl.java 649e215 

Diff: https://reviews.apache.org/r/6167/diff/


Testing
-------

Test following scenarios:

4vm on host xs1, xenserver default limit = xenserver sp2 limit = 5, create a new VM, suceed as expected
4vm on host xs1, xenserver default limit = xenserver sp2 limit = 4, create a new VM, failed as expected
4vm on host xs1, xenserver default limit = xenserver sp2 limit = 3, create a new VM, failed as expected
4vm on host xs1, xenserver default limit = xenserver sp2 limit = 3, stop and start an existing user VM, start failed as expected


Thanks,

mice xia