nagaboinaramgopal commented on code in PR #14042:
URL: https://github.com/apache/cloudstack/pull/14042#discussion_r4168207037
##########
server/src/main/java/com/cloud/deploy/FirstFitPlanner.java:
##########
@@ -388,6 +388,27 @@ protected void removeClustersCrossingThreshold(List<Long>
clusterListForVmAlloca
logger.warn(warnMessageForClusterReachedCapacityThreshold);
}
+ excludeClustersCrossingHAReserve(capacity, cpu_requested,
ram_requested, plan, avoid, clusterListForVmAllocation);
Review Comment:
Good question. The reserve check lives inside
removeClustersCrossingThreshold, so it does run on the first HA attempt, since
HA starts the VM with its original planner. But if the VM can't fit outside the
reserve, HA falls back to SkipHeuresticsPlanner, which overrides
removeClustersCrossingThreshold to a no-op ("Deploying vm during HA process, so
skipping disable threshold check"). That skips the reserve exclusion too, so
the restart lands in the reserved capacity. So the reserve keeps normal
deployments out but stays available to HA restarts through that fallback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]