Skip to content

STOR-3063: Add GCP regional PD e2e test for cross-zone data sync#31416

Open
radeore wants to merge 1 commit into
openshift:mainfrom
radeore:gce-regionpv
Open

STOR-3063: Add GCP regional PD e2e test for cross-zone data sync#31416
radeore wants to merge 1 commit into
openshift:mainfrom
radeore:gce-regionpv

Conversation

@radeore

@radeore radeore commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an origin e2e that provisions a GCP regional PD (pd-standard + replication-type=regional-pd), writes data on a worker in one zone, and verifies the same data is readable from another PV affinity zone.
  • Soft-skips the cross-zone leg when fewer than two worker zones are available or the control plane uses a hyperdisk-oriented instance family that may not attach pd-standard.
  • Migrates coverage from openshift-tests-private Critical-37490 into origin so it runs with built-in storage tests (no TEST_CSI_DRIVER_FILES).

Test plan

  • On a multi-AZ GCP cluster: /openshift-tests run-test '[sig-storage][Jira:"Storage"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]'

Test run logs:

Ran 1 of 1 Specs in 37.996 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
  {
    "name": "[sig-storage][Jira:\"Storage\"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]",
    "lifecycle": "blocking",
    "duration": 37996,
    "startTime": "2026-07-22 19:55:04.139736 UTC",
    "endTime": "2026-07-22 19:55:42.135869 UTC",
    "result": "passed",

Summary by CodeRabbit

  • Tests
    • Added an end-to-end coverage test for regional persistent disk behavior on Google Cloud.
    • Creates a regional persistent disk storage class, provisions and mounts a volume, and verifies data persistence.
    • Confirms the regional volume reports an expected two-zone topology and supports reattachment across zones after releasing the original mount.
    • Automatically skips when the environment, topology, or scheduling prerequisites aren’t met (for example, non-GCE clusters or insufficient zones/workers).

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 22, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 22, 2026

Copy link
Copy Markdown

@radeore: This pull request references STOR-3063 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 sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Adds an origin e2e that provisions a GCP regional PD (pd-standard + replication-type=regional-pd), writes data on a worker in one zone, and verifies the same data is readable from another PV affinity zone.
  • Soft-skips the cross-zone leg when fewer than two worker zones are available or the control plane uses a hyperdisk-oriented instance family that may not attach pd-standard.
  • Migrates coverage from openshift-tests-private Critical-37490 into origin so it runs with built-in storage tests (no TEST_CSI_DRIVER_FILES).

Test plan

  • On a multi-AZ GCP cluster: /openshift-tests run-test '[sig-storage][Jira:"Storage"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]'

Test run logs:

Ran 1 of 1 Specs in 37.996 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-storage][Jira:\"Storage\"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]",
   "lifecycle": "blocking",
   "duration": 37996,
   "startTime": "2026-07-22 19:55:04.139736 UTC",
   "endTime": "2026-07-22 19:55:42.135869 UTC",
   "result": "passed",

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

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Walkthrough

Adds a Ginkgo end-to-end test for GCE regional persistent disks. It validates prerequisites, provisions and mounts a regional disk, checks PV topology affinity, and verifies data access after remounting the volume in another zone.

Changes

GCE regional persistent disk validation

Layer / File(s) Summary
Regional disk provisioning and cross-zone validation
test/extended/storage/gce_pd_regional.go
Adds environment gating, regional-pd StorageClass and PVC creation, zone-pinned pod read/write checks, PV topology validation, and cross-zone remount verification.
Scheduling and topology helper logic
test/extended/storage/gce_pd_regional.go
Adds helpers for pod creation, schedulable worker discovery, hyperdisk-family detection, and PV topology-zone extraction.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GinkgoSuite
  participant KubernetesAPI
  participant FirstRegionalPod
  participant BoundPV
  participant SecondRegionalPod
  GinkgoSuite->>KubernetesAPI: Create regional-pd StorageClass and PVC
  GinkgoSuite->>KubernetesAPI: Create first zone-pinned pod
  FirstRegionalPod->>KubernetesAPI: Write and read test content
  GinkgoSuite->>KubernetesAPI: Fetch bound PV
  BoundPV-->>GinkgoSuite: Return two-zone node affinity
  GinkgoSuite->>KubernetesAPI: Delete first pod and create second zone-pinned pod
  SecondRegionalPod->>KubernetesAPI: Read persisted test content
Loading

Suggested reviewers: jsafrane, dobsonj


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 3 warnings)

Check name Status Explanation Resolution
Container-Privileges ❌ Error The new test creates a pod with SecurityLevel: admissionapi.LevelPrivileged, which is a privileged container setting. Drop the privileged security context unless absolutely required, or add a clear justification and minimize the privilege scope.
Test Structure And Quality ⚠️ Warning The test is cohesive and cleans up resources, but it still has several bare Expect(err).NotTo(HaveOccurred()) assertions with no step-specific diagnostics. Add contextual failure messages to the bare assertions (especially setup/PV fetch checks) so failures identify the exact step that broke.
Microshift Test Compatibility ⚠️ Warning It uses config.openshift.io capability/topology checks and requires ≥2 zones/workers, with no MicroShift skip or apigroup tag. Add a [Skipped:MicroShift] or [apigroup:config.openshift.io] tag, or guard with exutil.IsMicroShiftCluster() so MicroShift jobs skip it.
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning The test requires ≥2 zones/workers and cross-zone pod scheduling, but it has no SNO-specific guard or [Skipped:SingleReplicaTopology] label. Add a SNO skip via [Skipped:SingleReplicaTopology] or exutil.IsSingleNode()/skipOnSingleNodeTopology() before any zone-based scheduling, or limit it to non-SNO jobs.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main change: adding a GCP regional PD end-to-end test for cross-zone data sync.
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 new Ginkgo test uses a single static title; no dynamic names, timestamps, node/namespace names, or generated identifiers appear in test titles.
Topology-Aware Scheduling Compatibility ✅ Passed No unsafe topology constraints were added: the test has no anti-affinity/spread/PDB/replica logic, uses worker-node selection only, and skips External plus insufficient-zone clusters.
Ote Binary Stdout Contract ✅ Passed No process-level stdout writes found; the new suite has only g.Describe at init time and uses logging/printing only inside It blocks, with no TestMain/BeforeSuite setup.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No hardcoded IPv4/IP parsing or URL calls found; pod creation uses standard e2e image helpers, not explicit public-host connectivity.
No-Weak-Crypto ✅ Passed The added GCE regional-PD test contains no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB usage, custom crypto, or secret/token comparisons.
No-Sensitive-Data-In-Logs ✅ Passed The new test file has no secret/PII/token logging; its only output is generic test/status text and non-sensitive zone/pod assertions.
✨ 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.

@openshift-ci
openshift-ci Bot requested review from dobsonj and jsafrane July 22, 2026 20:11
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: radeore
Once this PR has been reviewed and has the lgtm label, please assign bertinatto 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@test/extended/storage/gce_pd_regional.go`:
- Around line 60-63: Update the capability check in the storage test gate to
handle the error separately: fail or assert on err consistently with the
surrounding gates, then skip only when IsCapabilityEnabled returns successfully
with isStorageEnabled false. Preserve the existing skip message for genuinely
unavailable Storage capability.
🪄 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: b51dffd9-508e-46cb-9b15-d377311a5b03

📥 Commits

Reviewing files that changed from the base of the PR and between c367745 and cb36bc3.

📒 Files selected for processing (1)
  • test/extended/storage/gce_pd_regional.go

Comment thread test/extended/storage/gce_pd_regional.go
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@radeore: 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-microshift 1be40ae link true /test e2e-aws-ovn-microshift
ci/prow/e2e-metal-ipi-ovn-ipv6 1be40ae link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-gcp-ovn 1be40ae link true /test e2e-gcp-ovn

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.

@openshift-trt

openshift-trt Bot commented Jul 23, 2026

Copy link
Copy Markdown

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: 1be40ae

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-gcp-ovn Medium - "[sig-storage][Jira:"Storage"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]" is a new test, and was only seen in one job.

New tests seen in this PR at sha: 1be40ae

  • "[sig-storage][Jira:"Storage"][Driver: pd.csi.storage.gke.io] regional PD should store data and sync across zones [Suite:openshift/conformance/parallel]" [Total: 1, Pass: 1, Fail: 0, Flake: 0]

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

Labels

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