Skip to content

fix(observability): harden INT mgmt Prometheus against single-agent OOM blackout - #6187

Merged
openshift-merge-bot[bot] merged 3 commits into
Azure:mainfrom
raelga:raelg/aroslsre-1553-prom-int-survival
Jul 22, 2026
Merged

fix(observability): harden INT mgmt Prometheus against single-agent OOM blackout#6187
openshift-merge-bot[bot] merged 3 commits into
Azure:mainfrom
raelga:raelg/aroslsre-1553-prom-int-survival

Conversation

@raelga

@raelga Rael Garcia (raelga) commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What

Durable resilience mitigations for the INT management-cluster Prometheus agents, following the ~37h metrics blackout on int-uksouth-mgmt-1 (AROSLSRE-1530). A single prom-agent OOM-crashloop took down all monitoring for that cluster; nothing alerted because the per-cluster dead-man's-switch was never deployed (fixed separately in #6186).

This PR addresses the cause (unbounded single-agent memory + coarse sharding + a scheduling gap + a too-tight 2-node infra pool), scoped to the INT mgmt clusters, plus one small chart-wide HA fix.

Changes

INT mgmt (config.msft.clouds-overlay.yaml, clouds.public.environments.int):

  • infraAgentPool.minCount: 1 -> 2 — raises the guaranteed infra floor from 2 to 4 nodes (poolCount 2 × minCount 2). Autoscaler ceiling (maxCount 3/pool) unchanged. Cost: +2 × Standard_D4ds_v5 ≈ +$330/mo for INT.
  • shards: 2 -> 4 — halves per-shard series/WAL, so a remote-write stall replay after a restart stays bounded instead of ballooning past node memory.
  • resources.limits.memory: 4Gi -> 5Gi — caps a runaway pod so it OOM-kills itself rather than starving the infra node.
  • resources.requests.memory: 1.5Gi -> 2Gi — keeps all 8 pods (4 shards × 2 replicas) comfortably schedulable across the 4 nodes.

Chart (all envs), observability/prometheus/deploy/templates/prometheus.yaml:

  • Add additionalLabelSelectors: OnShard to the kubernetes.io/hostname topologySpreadConstraint so the two replicas of each shard spread across nodes. Soft (ScheduleAnyway) so it can never block scheduling. Fixes an observed bug on INT where both replicas of shard-1 landed on the same infra node, defeating replica HA.

Feasibility (live INT data)

  • Before: 2 infra nodes (Standard_D4ds_v5, ~11.8Gi allocatable each); agent memory effectively unbounded; 3 of 4 prom pods pinned to one node.
  • After: 4 nodes × ~11.8Gi = ~47Gi allocatable. 8 prom pods over 4 nodes ≈ 2/node. Requests: 2 × 2Gi + ~2Gi infra baseline ≈ 6Gi/node (~50%), headroom retained. OnShard guarantees each shard's replicas land on different nodes.

Scope / safety

  • Memory + node-floor tuning is INT-mgmt-only via the overlay; svc/stg/prod configs unchanged.
  • The chart anti-affinity change is a soft constraint (strict HA improvement, never blocks scheduling); it regenerates the committed helm fixtures only.
  • make -C observability verify, make verify-schema, and make -C config materialize pass.

Rollout

INT mgmt ships via sdp-pipelines EV2 (mgmt-pipeline). The minCount bump adds nodes (non-disruptive); no SKU change (which would be node-pool recreation).

Tracking: AROSLSRE-1552, AROSLSRE-1553, AROSLSRE-1554, AROSLSRE-1555 (Story AROSLSRE-1549, INFRA epic AROSLSRE-798).

…OM blackout

A single prom-agent OOM-crashloop blacked out metrics on int-uksouth-mgmt-1
for ~37h. Three durable mitigations, scoped to the INT mgmt clusters, plus one
chart-wide HA improvement:

- shards 2 -> 4 (INT mgmt): halves per-shard series and WAL, so a remote-write
  stall replay after a restart stays bounded instead of ballooning past node
  memory.
- memory limit 4Gi (INT mgmt): caps a runaway pod so it OOM-kills itself rather
  than starving the ~11.8Gi infra node and taking neighbours down with it.
- memory request 1.5Gi (INT mgmt): keeps all 8 pods (4 shards x 2 replicas)
  schedulable on the 2 infra nodes (4 x 1.5Gi = 6Gi/node).
- per-shard replica anti-affinity (chart, all envs): add OnShard to the
  hostname topologySpreadConstraint so the two replicas of a shard spread across
  nodes. Soft (ScheduleAnyway) so it never blocks scheduling. Fixes an observed
  bug where both replicas of shard-1 landed on the same node.

AROSLSRE-1553, AROSLSRE-1554

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves monitoring resilience for Microsoft INT management clusters by reducing single-prom-agent blast radius (via increased sharding + explicit memory request/limit) and strengthening shard-level HA placement (via shard-aware node spreading) in the Prometheus Helm chart.

Changes:

  • INT-only: increase Prometheus agent sharding (2→4) and set memory requests/limits for mgmt Prometheus agents in the MSFT clouds overlay config.
  • Chart-wide: add additionalLabelSelectors: OnShard to the hostname topology spread constraint so replicas of the same shard preferentially land on different nodes.
  • Regenerate/commit Helm template fixtures reflecting the new topology spread constraint output.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
config/config.msft.clouds-overlay.yaml INT mgmt Prometheus agent sharding + memory requests/limits override.
observability/prometheus/deploy/templates/prometheus.yaml Shard-aware hostname topology spread constraint to improve per-shard replica HA.
observability/prometheus/testdata/zz_fixture_TestHelmTemplate_helmtest_svc_resources.yaml Updated generated fixture output for Prometheus chart changes.
observability/prometheus/testdata/zz_fixture_TestHelmTemplate_helmtest_svc_resources_unset.yaml Updated generated fixture output for Prometheus chart changes.
observability/prometheus/testdata/zz_fixture_TestHelmTemplate_helmtest_mgmt_resources.yaml Updated generated fixture output for Prometheus chart changes.
observability/prometheus/testdata/zz_fixture_TestHelmTemplate_helmtest_mgmt_resources_unset.yaml Updated generated fixture output for Prometheus chart changes.
dev-infrastructure/zz_fixture_TestHelmTemplate_dev_westus3_svc_1_arohcp_monitor.yaml Updated generated fixture output for Prometheus chart changes.
dev-infrastructure/zz_fixture_TestHelmTemplate_dev_westus3_mgmt_1_arohcp_monitor.yaml Updated generated fixture output for Prometheus chart changes.

Comment thread config/config.msft.clouds-overlay.yaml Outdated
Follow-on to the shards/anti-affinity change: give the INT mgmt prom-agents
real room instead of running them at the edge of a 2-node infra pool.

- infraAgentPool.minCount 1 -> 2: raises the guaranteed infra floor from 2 to
  4 nodes (poolCount 2 x minCount 2). The autoscaler ceiling (maxCount 3/pool)
  is unchanged. Cost: +2 x Standard_D4ds_v5 (~+$330/mo for INT).
- prometheusSpec.resources.limits.memory 4Gi -> 5Gi: a bit more OOM headroom
  per pod now that there is node capacity for it.
- prometheusSpec.resources.requests.memory 1.5Gi -> 2Gi: keeps all 8 pods
  (4 shards x 2 replicas) comfortably schedulable across the 4 nodes
  (2 x 2Gi + ~2Gi infra baseline = ~6Gi/node of ~11.8Gi allocatable).

INT mgmt only; svc/stg/prod unchanged.

AROSLSRE-1555, AROSLSRE-1553
Copilot AI review requested due to automatic review settings July 21, 2026 22:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread config/config.msft.clouds-overlay.yaml
@weherdh

Copy link
Copy Markdown
Collaborator

/lgtm

infraAgentPool lives under mgmt.aks (aksConfig), not directly under mgmt.
As mgmt.infraAgentPool it was an unknown field (aksConfig has
additionalProperties: false) and the minCount bump would not apply. Move it
under mgmt.aks to match the schema.
Copilot AI review requested due to automatic review settings July 21, 2026 22:50
@openshift-ci openshift-ci Bot removed the lgtm label Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@weherdh

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jul 21, 2026
@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: raelga, weherdh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6116cc5 into Azure:main Jul 22, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants