nagaboinaramgopal opened a new pull request, #14042: URL: https://github.com/apache/cloudstack/pull/14042
### Description Adds optional HA admission control: an operator can reserve a fraction of each cluster's CPU/memory so new deployments leave headroom for HA-triggered restarts when a host fails. A new cluster-scoped setting `cluster.ha.failover.capacity.reservethreshold` (Float, default 1.0 = disabled) controls it. Below 1.0, FirstFitPlanner excludes any cluster whose allocated + requested CPU or memory would cross that fraction from new deployments, using the same `listClustersCrossingThreshold` path the capacity disable threshold already uses. HA restarts are not subject to the reserve, so the headroom is available exactly when failover needs it. Off by default, so existing behaviour is unchanged until an operator opts in per cluster. For example, 0.8 keeps about 20% of a cluster's CPU and memory free for failover. It is meant to be set below the corresponding `cluster.*.allocated.capacity.disablethreshold`. ### Types of changes - [x] New feature (non-breaking change which adds functionality) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [x] Minor ### How Has This Been Tested? Added unit tests in `FirstFitPlannerTest`: - `checkHAFailoverReserveDisabledByDefault`: at the default 1.0 the cluster selection is unchanged. - `checkHAFailoverReserveExcludesClusterOnDeploy`: a cluster whose allocation would cross the reserve is excluded from a new deployment. Also built the standard packages and deployed on a KVM advanced zone. -- 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]
