Skip to content

OCPBUGS-77014: Add Azure OS disk metrics to cloud monitor tests#30840

Open
tjungblu wants to merge 1 commit intoopenshift:mainfrom
tjungblu:OCPBUGS-77014
Open

OCPBUGS-77014: Add Azure OS disk metrics to cloud monitor tests#30840
tjungblu wants to merge 1 commit intoopenshift:mainfrom
tjungblu:OCPBUGS-77014

Conversation

@tjungblu
Copy link
Contributor

@tjungblu tjungblu commented Mar 5, 2026

Add five OS disk metrics to fetchExtrenuousMetrics with thresholds:

  • OS Disk Used Burst BPS Credits Percentage (threshold 75%)
  • OS Disk Used Burst IO Credits Percentage (threshold 75%)
  • OS Disk IOPS Consumed Percentage (threshold 50%)
  • OS Disk Bandwidth Consumed Percentage (threshold 50%)
  • OS Disk Latency (Preview) (threshold 50ms)

Warnings are raised when metric averages exceed these thresholds during the test run.

Made-with: Cursor

Summary by CodeRabbit

  • New Features

    • Added monitoring for additional Azure VM metrics: disk burst credits usage, IOPS and bandwidth consumption percentages, disk latency, and available memory percentage.
  • Improvements

    • Alerting refined to reduce false positives and better handle missing data; supports both high- and low-threshold alerts (e.g., low memory warnings) for more accurate notifications.

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 5, 2026
@openshift-ci-robot
Copy link

@tjungblu: This pull request references Jira Issue OCPBUGS-77014, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Add five OS disk metrics to fetchExtrenuousMetrics with thresholds:

  • OS Disk Used Burst BPS Credits Percentage (threshold 75%)
  • OS Disk Used Burst IO Credits Percentage (threshold 75%)
  • OS Disk IOPS Consumed Percentage (threshold 50%)
  • OS Disk Bandwidth Consumed Percentage (threshold 50%)
  • OS Disk Latency (Preview) (threshold 50ms)

Warnings are raised when metric averages exceed these thresholds during the test run.

Made-with: Cursor

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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c8746913-1b9e-45fa-871e-7d64336b1e74

📥 Commits

Reviewing files that changed from the base of the PR and between c857927 and 544ce42.

📒 Files selected for processing (1)
  • pkg/monitortests/cloud/azure/metrics/monitortest.go

Walkthrough

Adds six VM metrics to the fetchExtrenuousMetrics map and refactors per-metric evaluation: skips metrics with nil averages, applies upper-threshold checks only when non-zero, and adds optional lower-threshold checks that emit warnings when breached.

Changes

Cohort / File(s) Summary
Azure VM Metrics + Evaluation Logic
pkg/monitortests/cloud/azure/metrics/monitortest.go
Added six metrics (OS Disk Used Burst BPS Credits Percentage, OS Disk Used Burst IO Credits Percentage, OS Disk IOPS Consumed Percentage, OS Disk Bandwidth Consumed Percentage, OS Disk Latency, Available Memory Percentage) with PT1M intervals and thresholds. Reworked evaluation: nil-check for d.Average (skip if nil), apply upper-threshold only when non-zero, introduce lower-threshold branch to emit warnings when average < lowerThreshold, and maintain alert interval generation for both cases. Control flow now separates upper and lower checks and continues when data missing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Azure OS disk metrics to cloud monitor tests, which aligns with the changeset's addition of six new disk-related metrics.
Stable And Deterministic Test Names ✅ Passed The modified file does not contain Ginkgo test definitions, making the check not applicable.
Test Structure And Quality ✅ Passed The custom check is not applicable to this production monitoring framework component, only Ginkgo-style test code. The code demonstrates good quality with proper nil-checks and meaningful error messages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tjungblu
Once this PR has been reviewed and has the lgtm label, please assign smg247 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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-ci openshift-ci bot requested review from deads2k and p0lyn0mial March 5, 2026 12:01
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/monitortests/cloud/azure/metrics/monitortest.go`:
- Around line 313-316: fetchExtrenuousMetrics currently only compares averages
against upperThreshold, causing metrics like "Available Memory Percentage"
(which only sets lowerThreshold) to be misflagged because upperThreshold
defaults to 0; update fetchExtrenuousMetrics to check both bounds: if a metric
has lowerThreshold > 0 then flag when avg < lowerThreshold, and if it has
upperThreshold > 0 then flag when avg > upperThreshold (do not treat 0 as a
valid bound unless explicitly intended); locate the comparator logic in
fetchExtrenuousMetrics and implement separate conditional checks for
lowerThreshold and upperThreshold so metrics with only one bound behave
correctly.
- Around line 309-312: The metric map contains an incorrect key "OS Disk Latency
(Preview)" which should be "OS Disk Latency"; update that map key to "OS Disk
Latency" so the lookup used by the monitoring query (the map where
interval/upperThreshold are defined) matches Azure Monitor's actual metric name
and prevents the fail-fast behavior in the metric evaluation logic; after
renaming, run/verify the metric query against Azure to confirm the metric is
found.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 91524181-ea98-45f8-9070-81769e5e458e

📥 Commits

Reviewing files that changed from the base of the PR and between 565aa49 and c857927.

📒 Files selected for processing (1)
  • pkg/monitortests/cloud/azure/metrics/monitortest.go

Add five OS disk metrics to fetchExtrenuousMetrics with thresholds:
- OS Disk Used Burst BPS Credits Percentage (threshold 75%)
- OS Disk Used Burst IO Credits Percentage (threshold 75%)
- OS Disk IOPS Consumed Percentage (threshold 50%)
- OS Disk Bandwidth Consumed Percentage (threshold 50%)
- OS Disk Latency (threshold 50ms)

Warnings are raised when metric averages exceed these thresholds
during the test run.

Made-with: Cursor
@tjungblu
Copy link
Contributor Author

tjungblu commented Mar 5, 2026

/test ?

@tjungblu
Copy link
Contributor Author

tjungblu commented Mar 5, 2026

/test e2e-azure-ovn-upgrade

@openshift-ci-robot
Copy link

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

@tjungblu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-fips 544ce42 link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-serial-2of2 544ce42 link true /test e2e-aws-ovn-serial-2of2
ci/prow/e2e-vsphere-ovn-upi 544ce42 link true /test e2e-vsphere-ovn-upi

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants