Skip to content

fix: add OCS virtualization SC to AWS global_config for gating#5456

Open
lukas-bednar wants to merge 2 commits into
RedHatQE:cnv-4.19from
lukas-bednar:fix/aws-global-config-ocs-sc
Open

fix: add OCS virtualization SC to AWS global_config for gating#5456
lukas-bednar wants to merge 2 commits into
RedHatQE:cnv-4.19from
lukas-bednar:fix/aws-global-config-ocs-sc

Conversation

@lukas-bednar

Copy link
Copy Markdown

Summary

  • Add ocs-storagecluster-ceph-rbd-virtualization (CEPH_RBD_VIRTUALIZATION) to tests/global_config_aws.py on the cnv-4.19 branch
  • Backport of openshift-virtualization-tests Add OCS to AWS global config #3309 for OCS-based AWS gating clusters

Problem

After contra/cnv MR !8802 migrated tier0 gating to AWS IPI, Cluster Health Check fails pytest collection:

ValueError: storage_class_matrix is missing in config file

Health check runs with --tc-file=tests/global_config_aws.py --storage-class-matrix=ocs-storagecluster-ceph-rbd-virtualization, but cnv-4.19 AWS config only had Portworx/Trident/IO2 entries.

Example: verify-cnv-4.19.z-build #697 — deploy AWS OK, health check exit 2 (44 collection errors).

Not caused by set-default-storage-class (skipped for 4.19 verify jobs).

Jira

Test plan

  • Merge to cnv-4.19 and publish openshift-virtualization-tests:cnv-4.19 image
  • Re-run verify-cnv-4.19.z-build on AWS — Cluster Health Check should collect tests (exit 0)
  • Cherry-pick same change to cnv-4.20 before/at 4.99 AWS migration

Made with Cursor

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Custom Commands

  • /test-plan - Triggers CodeRabbit to analyze the PR's changed files and post a test execution plan
  • /rerun-smoke - Adds `retest-smoke` label on the PR to trigger smoke tests exectuion

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • RoniKishner
  • dshchedr
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@lukas-bednar

Copy link
Copy Markdown
Author

Investigation findings (CNV-91960 / AWS gating health check)

Hi maintainers — we traced a verify-cnv-4.19.z-build failure on AWS after the RHOS→AWS gating migration and would appreciate guidance on the right fix before we proceed further.

Context

Symptom: Cluster Health Check pytest collection fails with:

storage_class_matrix is missing in config file

Root cause (as we understand it): Gating passes --storage-class-matrix=ocs-storagecluster-ceph-rbd-virtualization (RHOS-era default). On AWS, global_config_aws.py has no OCS entry, so the CLI filter reduces the matrix to empty. On cnv-4.19, pytest_utils.get_matrix_params then raises ValueError → 44 collection errors, exit code 2.

This PR (#5456) approach

Adds OCS to global_config_aws.py with default=True and adjusts migration storage-class variables — a backport of main #3309. This unblocks collection, but feels invasive for a health-check-only path on AWS clusters that do not run OCS.

cnv-4.20 behavior (no OCS in global_config_aws.py)

We checked 4.20 for comparison:

Questions for maintainers

  1. Is adding OCS to global_config_aws.py (fix: add OCS virtualization SC to AWS global_config for gating #5456 / Add OCS to AWS global config #3309 style) the intended fix for gating health check on AWS?
  2. Or should cnv-4.19 get a pytest_utils-only backport (4.20 parity, ~15 lines, no AWS config semantics change)?
  3. When should an OCS entry be added for real AWS OCS tier parametrization vs. health-check-only collection?

We are not asking to close this PR — we want alignment on the preferred direction before investing in one path.

Temporary mitigation (gating)

Until resolved, contra/cnv !8870 reverts 4.19 T0 gating to rhos-ipi.

Thanks for any guidance.

@rnetser

rnetser commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

this change was reverted in #3341
the code here does not align with what we have in main

@lukas-bednar

Copy link
Copy Markdown
Author

Updated per @jeniapeimer's feedback:

  • tests/global_config_aws.py now matches main exactly
  • Commit amended with Signed-off-by

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4d628aa8-4fd8-4673-9488-339c01b1420d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tier0 verify jobs on AWS IPI use tests/global_config_aws.py for storage class matrix. Replace cnv-4.19 copy with exact main branch version per maintainer feedback from @jeniapeimer (align with RedHatQE#3341 / post-RedHatQE#3309 main state).

Signed-off-by: Lukas Bednar <lbednar@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lukas-bednar lukas-bednar force-pushed the fix/aws-global-config-ocs-sc branch from 2336e98 to 521d104 Compare July 2, 2026 16:06
@lukas-bednar

Copy link
Copy Markdown
Author

Updated per @jeniapeimer's feedback:

  • tests/global_config_aws.py is now an exact copy from main (byte-identical to current main HEAD)
  • Squashed to a single commit with Signed-off-by: Lukas Bednar <lbednar@redhat.com>
  • Removed the prior custom OCS/default/migration-variable edits and the pre-commit.ci import reorder commit

This aligns with @rnetser's note that the earlier approach diverged from main after #3341. Please re-review when convenient.

Comment on lines +54 to +55
storage_class_a = StorageClassNames.IO2_CSI
storage_class_b = StorageClassNames.IO2_CSI

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.

Oops, saying we need the exact copy was too far-fetched; this should stay:

Suggested change
storage_class_a = StorageClassNames.IO2_CSI
storage_class_b = StorageClassNames.IO2_CSI
storage_class_for_storage_migration_a = StorageClassNames.IO2_CSI
storage_class_for_storage_migration_b = StorageClassNames.IO2_CSI

Comment on lines +5 to +7
from utilities.constants.storage import StorageClassNames

from utilities.constants import Images, StorageClassNames
from utilities.constants import Images

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.

These imports also need to stay as they were

Suggested change
from utilities.constants.storage import StorageClassNames
from utilities.constants import Images, StorageClassNames
from utilities.constants import Images
from utilities.constants import Images, StorageClassNames


for _dir in dir():
if not config: # noqa: F821
if not config:

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.

And this needs to be reverted to please the pre-commit

continue

config[_dir] = locals()[_dir] # noqa: F821
config[_dir] = locals()[_dir]

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.

and this

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.

7 participants