Skip to content

server: reserve cluster capacity for HA failover (HA admission control) - #14042

Open
nagaboinaramgopal wants to merge 1 commit into
apache:mainfrom
nagaboinaramgopal:feature/ha-failover-capacity-reserve
Open

server: reserve cluster capacity for HA failover (HA admission control)#14042
nagaboinaramgopal wants to merge 1 commit into
apache:mainfrom
nagaboinaramgopal:feature/ha-failover-capacity-reserve

Conversation

@nagaboinaramgopal

Copy link
Copy Markdown

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

  • New feature (non-breaking change which adds functionality)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • 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.

Adds cluster.ha.failover.capacity.reservethreshold (default 1.0 =
disabled). When set below 1.0, FirstFitPlanner also excludes any cluster
whose allocated+requested cpu/memory would cross the reserve from new
deployments, so headroom stays free for HA-triggered restarts. The
threshold is per-cluster scope aware.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant