Skip to content

cnv/virt-cluster-validate: Install dependency operators and Azure RWX storage - #82726

Open
tiraboschi wants to merge 1 commit into
openshift:mainfrom
tiraboschi:cnv_vcv_depcoverage
Open

cnv/virt-cluster-validate: Install dependency operators and Azure RWX storage#82726
tiraboschi wants to merge 1 commit into
openshift:mainfrom
tiraboschi:cnv_vcv_depcoverage

Conversation

@tiraboschi

@tiraboschi tiraboschi commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Pre-install nmstate, OADP, NHC, and SNR operators via the install-operators step-registry ref on both e2e-azure and e2e-gcp lanes. This reduces test skips (OADP/backup) and warnings (node remediation) that previously fired because these operators were absent.

On Azure, create an azurefile-csi-nfs StorageClass annotated as the default virt class (storageclass.kubevirt.io/is-default-virt-class), enabling the live-migration check that was previously skipped due to RWO-only storage.

Also surface junit-results.xml in CI artifacts for Spyglass rendering.

GCP RWX storage is left for a follow-up: it requires the gcp-filestore-csi-driver-operator subscription, a ClusterCSIDriver object, and a storage-destroy-csi-gcp-filestore post step for cleanup.

Summary by CodeRabbit

  • Configures both Azure and GCP validation workflows to install the kubernetes-nmstate-operator, redhat-oadp-operator, node-healthcheck-operator, and self-node-remediation operators via the OPERATORS environment variable.
  • Adds Azure-specific setup-rwx-storage step that creates an azurefile-csi-nfs StorageClass and marks it as the default virtualization class to enable live-migration validation checks.
  • Enables the host-network validation check in both Azure and GCP workflows by removing 11-host-network from the SKIP_CHECKS list.
  • Enables the live-migration validation check in the Azure workflow by removing 70-live-migration from the SKIP_CHECKS list; the GCP workflow continues to skip this check pending RWX storage setup in a follow-up change.
  • Archives junit-results.xml to CI artifacts in both workflows for Spyglass rendering.

@openshift-ci
openshift-ci Bot requested review from fabiand and oshoval July 31, 2026 13:13
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Azure and GCP validation workflows now install prerequisite operators from a v4.22 catalog. Azure provisions Azure Files NFS storage and enables host-network and live-migration checks. GCP enables host-network checks. Both workflows archive JUnit results.

Changes

Cloud validation workflows

Layer / File(s) Summary
Operator catalog and installation
ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml
Azure and GCP configure and install NMState, OADP, Node Health Check, and Self Node Remediation from v4.22 CatalogSources.
Azure storage and validation coverage
ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml
Azure creates azurefile-csi-nfs, sets it as the default virtualization class, enables host-network and live-migration validation, and copies JUnit results.
GCP validation coverage and results
ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml
GCP enables host-network validation, retains the live-migration exclusion, and copies JUnit results.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: ok-to-test

Suggested reviewers: fabiand, oshoval

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: installing dependency operators and configuring Azure RWX storage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only CI YAML; the diff contains no Ginkgo It, Describe, Context, or When declarations and no test-title strings.
Test Structure And Quality ✅ Passed The commit changes only one CI YAML file; it adds no Ginkgo test code, so the listed It, fixture, timeout, and assertion checks are not applicable.
Microshift Test Compatibility ✅ Passed The PR changes only one CI YAML workflow and adds no Ginkgo It/Describe/Context/When tests, so the MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only a CI YAML configuration; it adds no Ginkgo e2e tests or test bodies that could introduce SNO-incompatible assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI operator configuration (test workflows and CatalogSource/StorageClass definitions), not deployment manifests or operator code with scheduling constraints. No topology-aware sche...
Ote Binary Stdout Contract ✅ Passed The commit changes only one YAML CI configuration file; added echo commands are shell-step output, and no OTE binary or suite setup code changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR modifies only CI operator configuration (YAML), not test source code. No Ginkgo e2e tests are added; the check applies only to test additions and does not apply here.
No-Weak-Crypto ✅ Passed The PR changes only one YAML workflow; added lines contain no MD5, SHA-1, DES, RC4, Blowfish, ECB, crypto implementation, or secret-comparison logic.
Container-Privileges ✅ Passed The YAML configuration file contains no container privilege escalation settings. The inline Kubernetes manifests (CatalogSource and StorageClass) define no container security contexts, privileged f...
No-Sensitive-Data-In-Logs ✅ Passed The PR adds only fixed catalog and storage status messages; the diff contains no passwords, tokens, API keys, PII, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In
`@ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml`:
- Around line 39-45: Remove the skip_checking property from every operator entry
in the OPERATORS definitions at
ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml
lines 39-45 and lines 153-159, including the Azure and GCP operator entries, so
installation failures stop validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 223d21c4-bf74-45b4-a12c-e5ededdb00b4

📥 Commits

Reviewing files that changed from the base of the PR and between b601ca3 and 6e2d012.

📒 Files selected for processing (1)
  • ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml

@tiraboschi
tiraboschi force-pushed the cnv_vcv_depcoverage branch from 6e2d012 to b607717 Compare July 31, 2026 13:26
@tiraboschi

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@tiraboschi: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

… storage

Pre-install nmstate, OADP, NHC, and SNR operators via the install-operators
step-registry ref on both e2e-azure and e2e-gcp lanes. This reduces test
skips (OADP/backup) and warnings (node remediation) that previously fired
because these operators were absent.

Since OCP 5.0 nightlies may not have all operators in the default
redhat-operators catalog, a custom CatalogSource is created from the
v4.22 redhat-operator-index (the last released OCP version).

On Azure, create an azurefile-csi-nfs StorageClass annotated as the default
virt class (storageclass.kubevirt.io/is-default-virt-class), enabling the
live-migration check that was previously skipped due to RWO-only storage.

Also surface junit-results.xml in CI artifacts for Spyglass rendering.

GCP RWX storage is left for a follow-up: it requires the
gcp-filestore-csi-driver-operator subscription, a ClusterCSIDriver object,
and a storage-destroy-csi-gcp-filestore post step for cleanup.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@tiraboschi
tiraboschi force-pushed the cnv_vcv_depcoverage branch from b607717 to 33f621c Compare July 31, 2026 15:14
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@tiraboschi: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-cnv-virt-cluster-validate-main-e2e-azure openshift-cnv/virt-cluster-validate presubmit Ci-operator config changed
pull-ci-openshift-cnv-virt-cluster-validate-main-e2e-gcp openshift-cnv/virt-cluster-validate presubmit Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In
`@ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml`:
- Line 115: Remove the trailing `|| true` from the storage-class clearing
command so failures from `oc get` or `oc patch` propagate and stop validation.
Update the command around the `oc get storageclass` pipeline while preserving
the existing patch operation and annotation target.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 8f12653f-2324-4458-9308-4965de11272b

📥 Commits

Reviewing files that changed from the base of the PR and between b607717 and 33f621c.

📒 Files selected for processing (1)
  • ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml

cli: latest
commands: |
set -euo pipefail
oc get storageclass -o name | xargs -I{} oc patch {} -p '{"metadata":{"annotations":{"storageclass.kubevirt.io/is-default-virt-class":"false"}}}' --type=merge 2>/dev/null || true

@coderabbitai coderabbitai Bot Jul 31, 2026

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not ignore failures while clearing default virtualization classes.

|| true suppresses failures from both oc get and oc patch. If a patch fails, an existing class can remain the default virtualization class while azurefile-csi-nfs is also marked default. The live-migration validation can then select an unintended RWO class.

Proposed fix
-        oc get storageclass -o name | xargs -I{} oc patch {} -p '{"metadata":{"annotations":{"storageclass.kubevirt.io/is-default-virt-class":"false"}}}' --type=merge 2>/dev/null || true
+        oc get storageclass -o name | while IFS= read -r storage_class; do
+          oc patch "${storage_class}" \
+            -p '{"metadata":{"annotations":{"storageclass.kubevirt.io/is-default-virt-class":"false"}}}' \
+            --type=merge
+        done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
oc get storageclass -o name | xargs -I{} oc patch {} -p '{"metadata":{"annotations":{"storageclass.kubevirt.io/is-default-virt-class":"false"}}}' --type=merge 2>/dev/null || true
oc get storageclass -o name | while IFS= read -r storage_class; do
oc patch "${storage_class}" \
-p '{"metadata":{"annotations":{"storageclass.kubevirt.io/is-default-virt-class":"false"}}}' \
--type=merge
done
🤖 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
`@ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml`
at line 115, Remove the trailing `|| true` from the storage-class clearing
command so failures from `oc get` or `oc patch` propagate and stop validation.
Update the command around the `oc get storageclass` pipeline while preserving
the existing patch operation and annotation target.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The || true is intentional here: this is a best-effort cleanup that clears the is-default-virt-class annotation from any existing StorageClasses before creating the new one. If no StorageClasses have this annotation yet (a possible case on a fresh CI cluster), oc patch would otherwise fail with a no-op error. The script already has set -euo pipefail, so the critical commands after this line (the oc create) will still fail the step if something is actually wrong. Removing || true would cause spurious failures on clean clusters.

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.

@tiraboschi, thanks for the clarification.

The absence of storageclass.kubevirt.io/is-default-virt-class does not cause this merge patch to fail. oc patch --type=merge adds the annotation when it is absent.

The concern is instead that || true also hides a failed oc get storageclass or a failed patch of an existing StorageClass. In that case, an existing class can remain the default virtualization class together with azurefile-csi-nfs.

The cleanup can remain best effort if multiple default virtualization classes are safe for the validation. Otherwise, the command should ignore only the expected empty-input case and propagate API and patch failures. I will keep the finding open.


✏️ Learnings added
Learnt from: tiraboschi
Repo: openshift/release PR: 82726
File: ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml:115-115
Timestamp: 2026-07-31T15:22:59.275Z
Learning: In `ci-operator/config/openshift-cnv/virt-cluster-validate/openshift-cnv-virt-cluster-validate-main.yaml`, the `setup-rwx-storage` step intentionally performs best-effort cleanup of the `storageclass.kubevirt.io/is-default-virt-class` annotation before it creates the `azurefile-csi-nfs` StorageClass.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@tiraboschi

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@tiraboschi: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@tiraboschi: The following test 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/rehearse/openshift-cnv/virt-cluster-validate/main/e2e-azure 33f621c link unknown /pj-rehearse pull-ci-openshift-cnv-virt-cluster-validate-main-e2e-azure

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

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant