You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ad9ac5
Browse filesBrowse the repository at this point in the historyBrowse files
prachi
committed
Bug 11200 - maximum number of guests per host
Changes:
To make sure migration does not attempt to pick a host that has running VMs more than the max guest VM's limit:
- Changed manual migration to call host allocators to return a list of hosts suitable for migration. Host allocators check for the max guest VM limit.
- Earlier we returned hosts with enough capacity but now Host Allocators make other checks along with capacity. So the list of hosts returned are hosts that have enough capacity AND satisfy all other conditions like host tags, max guests limit etc. Or in other words Allocators dont return the hosts that dont satisfy all conditions even if they have capacity.
-Therefore, now we mark the list of hosts returned for manual migration as 'suitable' hosts instead of 'hasenoughCapacity' in the HostResponse.
- HA migration already calls allocators, so no change is needed there.
Copy file name to clipboardExpand all lines: api/src/com/cloud/api/response/HostResponse.java
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,9 @@ public class HostResponse extends BaseResponse {
150
150
@SerializedName("hasEnoughCapacity") @Param(description="true if this host has enough CPU and RAM capacity to migrate a VM to it, false otherwise")
151
151
privateBooleanhasEnoughCapacity;
152
152
153
+
@SerializedName("suitableForMigration") @Param(description="true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests vm limit etc) to migrate a VM to it , false otherwise")
154
+
privateBooleansuitableForMigration;
155
+
153
156
@SerializedName("allocationstate") @Param(description="the allocation state of the host")
154
157
privateStringallocationState;
155
158
@@ -485,6 +488,14 @@ public Boolean hasEnoughCapacity() {
0 commit comments