-
Notifications
You must be signed in to change notification settings - Fork 153
feat: add cluster upgrade partial and complete SLO observability #5752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
machi1990
wants to merge
4
commits into
Azure:main
Choose a base branch
from
machi1990:control-plane-upgrade-slo-alert
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e15883c
feat: add cluster version selection-to-active SLO rules and alerts
machi1990 b115629
feat: add a recording rule about cluster upgrade eligibility
machi1990 91f3aed
refactor: move the recording rules to the dedicated folder
machi1990 e8f39db
refactor: use per-resource stuck alerts for cluster upgrade SLOs
machi1990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
observability/alerts/userJourneyClusterUpgradeMonitor-prometheusRule.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: PrometheusRule | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: kube-prometheus | ||
| app.kubernetes.io/part-of: kube-prometheus | ||
| prometheus: k8s | ||
| role: alert-rules | ||
| name: user-journey-cluster-upgrade-alerts | ||
| namespace: monitoring | ||
| spec: | ||
| groups: | ||
| # Per-upgrade stuck alerts for cluster upgrade SLOs. Sev 4 (info). | ||
| # At current upgrade volumes, alert directly on duration instead of fleet burn-rate. | ||
| # | ||
| # In absence of https://issues.redhat.com/browse/ARO-22686 (reporting of control plane | ||
| # version history for versions lower than 4.22), cluster upgrade completeness is directly | ||
| # impacted by data plane state — e.g. no worker nodes means the upgrade will not reach | ||
| # completed; missing console component in external auth prevents CVO from marking the | ||
| # upgrade complete. The complete alert may therefore fire due to missing data plane | ||
| # configuration rather than control plane failure. The runbook accommodates this. | ||
| - name: rp-user-journey-cluster-upgrade-monitor-rules | ||
|
|
||
| rules: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alerts should probably define a |
||
| - alert: userJourneyClusterUpgradeStuckInDesired | ||
| expr: | | ||
| hosted_control_plane_upgrade:duration_in_desired:seconds > 1200 | ||
| for: 5m | ||
| labels: | ||
| severity: info | ||
| slo: cluster-upgrade-reach-partial | ||
| annotations: | ||
| summary: "[HCPUpgradeStuckInDesired] {{ $labels.resource_id }}" | ||
| description: | | ||
| Cluster upgrade target version {{ $labels.version }} has been in desired for over 20 minutes without reaching partial. Partial is when the target version becomes active (recognized as active) on the HCP cluster; the upgrade is in progress but not yet complete. Investigate backend_cluster_version_info on the affected cluster. | ||
| Service Cluster: {{ $labels.cluster }} | ||
| runbook_url: https://aka.ms/arohcp-runbook-cluster-upgrade | ||
| correlationId: "userJourneyClusterUpgradeStuckInDesired/{{ $labels.resource_id }}/{{ $labels.version }}" | ||
|
Comment on lines
+36
to
+37
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The redirection is there and there is WIP PR being worked on |
||
| - alert: userJourneyClusterUpgradeStuckInProgress | ||
|
Comment on lines
+34
to
+38
|
||
| expr: | | ||
| hosted_control_plane_upgrade:duration_in_progress:seconds > 1800 | ||
| for: 5m | ||
| labels: | ||
| severity: info | ||
| slo: cluster-upgrade-complete | ||
| annotations: | ||
| summary: "[HCPUpgradeStuckInProgress] {{ $labels.resource_id }}" | ||
| description: | | ||
| Cluster upgrade target version {{ $labels.version }} has been in progress for over 30 minutes without reaching completed. Completed is when the target version upgrade has finished and is reported as complete on the HCP cluster. Investigate backend_cluster_version_info on the affected cluster. | ||
| Service Cluster: {{ $labels.cluster }} | ||
| runbook_url: https://aka.ms/arohcp-runbook-cluster-upgrade | ||
| correlationId: "userJourneyClusterUpgradeStuckInProgress/{{ $labels.resource_id }}/{{ $labels.version }}" | ||
|
Comment on lines
+50
to
+51
Comment on lines
+48
to
+51
|
||
128 changes: 128 additions & 0 deletions
128
observability/alerts/userJourneyClusterUpgradeMonitor-prometheusRule_test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| rule_files: | ||
| - userJourneyClusterUpgrade-recordingRule.yaml | ||
| - userJourneyClusterUpgradeMonitor-prometheusRule.yaml | ||
| evaluation_interval: 1m | ||
| tests: | ||
| # ======================================== | ||
| # Reach partial: successful — no alert | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.19", state="completed"}' | ||
| values: "1+0x40" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.20", state="desired"}' | ||
| values: "1x10 0x25" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.20", state="partial"}' | ||
| values: "0x10 1x25" | ||
| alert_rule_test: | ||
| - eval_time: 25m | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| exp_alerts: [] | ||
| - eval_time: 40m | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| exp_alerts: [] | ||
| # ======================================== | ||
| # Reach partial: stuck in desired >20m — alert fires at SLO breach | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/2/rg/c2", subscription_id="sub-2", cluster_uuid="uuid-2", version="4.19.20", state="completed"}' | ||
| values: "1+0x50" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/2/rg/c2", subscription_id="sub-2", cluster_uuid="uuid-2", version="4.19.21", state="desired"}' | ||
| values: "1+0x50" | ||
| alert_rule_test: | ||
| - eval_time: 20m | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| exp_alerts: [] | ||
| - eval_time: 30m | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| exp_alerts: | ||
| - exp_labels: | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| cluster: "svc-1" | ||
| cluster_uuid: "uuid-2" | ||
| resource_id: "/sub/2/rg/c2" | ||
| subscription_id: "sub-2" | ||
| version: "4.19.21" | ||
| state: "desired" | ||
| severity: info | ||
| slo: cluster-upgrade-reach-partial | ||
| exp_annotations: | ||
| summary: "[HCPUpgradeStuckInDesired] /sub/2/rg/c2" | ||
| description: | | ||
| Cluster upgrade target version 4.19.21 has been in desired for over 20 minutes without reaching partial. Partial is when the target version becomes active (recognized as active) on the HCP cluster; the upgrade is in progress but not yet complete. Investigate backend_cluster_version_info on the affected cluster. | ||
| Service Cluster: svc-1 | ||
| runbook_url: "https://aka.ms/arohcp-runbook-cluster-upgrade" | ||
| correlationId: "userJourneyClusterUpgradeStuckInDesired//sub/2/rg/c2/4.19.21" | ||
| # ======================================== | ||
| # Reach partial: install only — not upgrade eligible, no alert | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/3/rg/c4", subscription_id="sub-3", cluster_uuid="uuid-4", version="4.19.20", state="desired"}' | ||
| values: "1+0x50" | ||
| alert_rule_test: | ||
| - eval_time: 50m | ||
| alertname: userJourneyClusterUpgradeStuckInDesired | ||
| exp_alerts: [] | ||
| # ======================================== | ||
| # Upgrade complete: successful — no alert | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.19", state="completed"}' | ||
| values: "1+0x40" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.20", state="desired"}' | ||
| values: "1x10 0x25" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/1/rg/c1", subscription_id="sub-1", cluster_uuid="uuid-1", version="4.19.20", state="completed"}' | ||
| values: "0x10 1x25" | ||
| alert_rule_test: | ||
| - eval_time: 40m | ||
| alertname: userJourneyClusterUpgradeStuckInProgress | ||
| exp_alerts: [] | ||
| # ======================================== | ||
| # Upgrade complete: stuck in progress >30m — alert fires at SLO breach | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/2/rg/c2", subscription_id="sub-2", cluster_uuid="uuid-2", version="4.19.20", state="completed"}' | ||
| values: "1+0x50" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/2/rg/c2", subscription_id="sub-2", cluster_uuid="uuid-2", version="4.19.21", state="desired"}' | ||
| values: "1x10 0x50" | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/2/rg/c2", subscription_id="sub-2", cluster_uuid="uuid-2", version="4.19.21", state="partial"}' | ||
| values: "0x10 1x50" | ||
| alert_rule_test: | ||
| - eval_time: 30m | ||
| alertname: userJourneyClusterUpgradeStuckInProgress | ||
| exp_alerts: [] | ||
| - eval_time: 40m | ||
| alertname: userJourneyClusterUpgradeStuckInProgress | ||
| exp_alerts: | ||
| - exp_labels: | ||
| alertname: userJourneyClusterUpgradeStuckInProgress | ||
| cluster: "svc-1" | ||
| cluster_uuid: "uuid-2" | ||
| resource_id: "/sub/2/rg/c2" | ||
| subscription_id: "sub-2" | ||
| version: "4.19.21" | ||
| state: "partial" | ||
| severity: info | ||
| slo: cluster-upgrade-complete | ||
| exp_annotations: | ||
| summary: "[HCPUpgradeStuckInProgress] /sub/2/rg/c2" | ||
| description: | | ||
| Cluster upgrade target version 4.19.21 has been in progress for over 30 minutes without reaching completed. Completed is when the target version upgrade has finished and is reported as complete on the HCP cluster. Investigate backend_cluster_version_info on the affected cluster. | ||
| Service Cluster: svc-1 | ||
| runbook_url: "https://aka.ms/arohcp-runbook-cluster-upgrade" | ||
| correlationId: "userJourneyClusterUpgradeStuckInProgress//sub/2/rg/c2/4.19.21" | ||
| # ======================================== | ||
| # Upgrade complete: install only — not upgrade eligible, no alert | ||
| # ======================================== | ||
| - interval: 1m | ||
| input_series: | ||
| - series: 'backend_cluster_version_info{cluster="svc-1", resource_id="/sub/3/rg/c4", subscription_id="sub-3", cluster_uuid="uuid-4", version="4.19.20", state="desired"}' | ||
| values: "1+0x50" | ||
| alert_rule_test: | ||
| - eval_time: 50m | ||
| alertname: userJourneyClusterUpgradeStuckInProgress | ||
| exp_alerts: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure if this is the correct lane to use. https://github.com/swiencki/architecture/blob/16fbc2fb1ffa04b61d21ae6f61f7a6b1845c1825/offerings/aro/decisions/adr-001-aro-hcp-alerting-recommendation-for-sre.md#routing-lanes-in-aro-hcp
Discussing with @swiencki to confirm this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simon has confirmed that's a good lane