TRT-2788: add scheduling Prometheus monitors for build-farm clusters and add missing clusters - #82717
TRT-2788: add scheduling Prometheus monitors for build-farm clusters and add missing clusters#82717smg247 wants to merge 4 commits into
Conversation
Add per-cluster Prometheus monitors querying each build cluster's own thanos-querier for pending pod counts and ci-scheduling-webhook health. These detect scheduling degradation that existing blackbox/prowjob/canary probes miss (e.g. the 2026-07-29 build09 incident with ~253 SchedulingGated pods and no SHIP Status outage). New queries per build cluster: - Pending pods in ci-op-* namespaces >50 for 10m (Degraded) - ci-scheduling-admission-webhook replicas available (Degraded) Also uncomments build02 which is no longer blocked in _clusters.yaml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@smg247: This pull request references TRT-2788 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe build-farm monitor generator now covers build01 through build13. It creates cluster-local Prometheus checks for autoscaler and scheduling health. SHIP Status activates Build02, Build12, and Build13 dashboard components. ChangesBuild-farm monitoring
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant BuildMonitorGenerator
participant ComponentMonitorConfig
participant DashboardConfig
BuildMonitorGenerator->>ComponentMonitorConfig: Generate build01-build13 Prometheus monitors
ComponentMonitorConfig->>DashboardConfig: Provide monitored build components
DashboardConfig-->>DashboardConfig: Activate Build02, Build12, and Build13
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
hack/generate-build-farm-monitor-config.py (1)
91-92: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAlign the webhook
failure_querymetric with the healthquerymetric.The health
queryon Line 91 evaluateskube_deployment_status_replicas_available, butfailure_queryon Line 92 evaluateskube_deployment_status_replicas(desired/current replicas, not available replicas). If the check degrades because available replicas dropped to 0 while the deployment still reports 1 desired replica, the failure query surfaces a "1", which does not explain why the check failed. Usekube_deployment_status_replicas_availablein the failure query so debugging output reflects the actual metric driving the alert.This fix applies to the generator, so it propagates to all 13 generated webhook check pairs in
core-services/ship-status/component-monitor-config.yaml.♻️ Proposed fix
- query: "kube_deployment_status_replicas_available{{namespace=\\"ci-scheduling-webhook\\",deployment=\\"ci-scheduling-admission-webhook\\"}} > 0 or absent(kube_deployment_status_replicas_available{{namespace=\\"ci-scheduling-webhook\\",deployment=\\"ci-scheduling-admission-webhook\\"}})" - failure_query: "kube_deployment_status_replicas{{namespace=\\"ci-scheduling-webhook\\",deployment=\\"ci-scheduling-admission-webhook\\"}}" + failure_query: "kube_deployment_status_replicas_available{{namespace=\\"ci-scheduling-webhook\\",deployment=\\"ci-scheduling-admission-webhook\\"}}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@hack/generate-build-farm-monitor-config.py` around lines 91 - 92, Update the webhook failure_query metric in the generator’s configuration template to use kube_deployment_status_replicas_available, matching the health query’s metric while preserving its existing namespace and deployment selectors. Ensure this generator change propagates the aligned metric to all generated webhook check pairs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@hack/generate-build-farm-monitor-config.py`:
- Around line 91-92: Update the webhook failure_query metric in the generator’s
configuration template to use kube_deployment_status_replicas_available,
matching the health query’s metric while preserving its existing namespace and
deployment selectors. Ensure this generator change propagates the aligned metric
to all generated webhook check pairs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 9bbd4fef-bedc-4a74-a9f4-5f09ed5dae3e
📒 Files selected for processing (3)
core-services/ship-status/component-monitor-config.yamlcore-services/ship-status/dashboard-config.yamlhack/generate-build-farm-monitor-config.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
We will need to work on improving the reasoning with outage/alert. Starting with these basic alerts help us zone in the actual problem area. |
|
/hold |
Replace the blunt pending-pods-count query with four targeted probes that detect specific root causes of scheduling degradation: - cluster-autoscaler deployment health - failed scale-ups (cluster_autoscaler_failed_scale_ups_total) - unschedulable pods from autoscaler perspective - ci-scheduling-webhook deployment health (unchanged) Dropped max-node-capacity probe: cluster_autoscaler_max_nodes_count requires maxNodesTotal in ClusterAutoscaler spec, which is not set. All queries verified via component-monitor dry-run against build01, build03, build05, build08, build09, build10, build11. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@smg247: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepsm007, smg247 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adding 4 new
Degradedprometheus queries for all build-farm clusters:cluster_autoscaler_failed_scale_ups_totalincrease over 30m (detects cloud API errors, expander failures)cluster_autoscaler_unschedulable_pods_count <= 20over 15m (detects slow provisioning, taint mismatches, general scheduling failures)Also added the missing
build12andbuild13, and putbuild02back since it is up again.Summary by CodeRabbit
DegradedPrometheus monitors for cluster-autoscaler health, failed scale-ups, unschedulable pods, and scheduling webhook availability across build-farm clusters.build02and addedbuild12andbuild13to the build-farm configuration.build01throughbuild13.