← Back to Pull requests

storagecapabilities: add OpenEBS Replicated PV Mayastor #4286

Merged
krishnaGajabi merged 2 files (54 lines) on Sep 27, 2026 11:31 UTC
View on GitHub
krishnaGajabi krishnaGajabi commented on Sep 21, 2026 11:49 UTC
Author

What this PR does / why we need it:

Adds storage profile defaults for OpenEBS Replicated PV Mayastor (io.openebs.csi-mayastor). It had
no entry, so its StorageClasses got an empty StorageProfile and UnrecognizedProvisioner.

"io.openebs.csi-mayastor":           {{rwo, block}, {rwo, file}},
"io.openebs.csi-mayastor/rwx-block": {{rwx, block}, {rwo, block}, {rwo, file}},

Which issue(s) this PR fixes:
NONE

Special notes for your reviewer:

Mayastor accepts RWX only for Block volumes, and only when the StorageClass sets rwxBlock
(OpenEBS v4.5.0+, added for KubeVirt live migration); otherwise CreateVolume rejects the access
mode (controller.rs,
context.rs).
So the capabilities are keyed off that parameter via storageClassToProvisionerKeyMapper, as
driver.longhorn.io/migratable already does.

No clone strategy advised: the driver reports no CLONE_VOLUME but does support snapshots, which is
what the existing default already picks when a VolumeSnapshotClass is present.

Release note:
``release-note
Add StorageProfile defaults for the OpenEBS Replicated PV Mayastor provisioner, including RWX block volumes for StorageClasses with rwxBlock enabled
``

Diff: 54 lines (+54 / -0) across 2 files Reviewer: Acedus Review duration: 8621m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.28) × (1 − Review Confidence (0.86)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.28 · 54 lines diff across 2 files
0.28
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.81 · 5 substantive comment(s)
0.81
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
86%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.240
Real PR Conversation Timeline
13 items
kubevirt-prow[bot] kubevirt-prow[bot] commented on Sep 21, 2026 11:49 UTC
Bot

Hi @krishnaGajabi. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

<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.
</details>

awels awels commented on Sep 21, 2026 12:57 UTC
Contributor

/test all

coveralls coveralls commented on Sep 21, 2026 13:12 UTC
Contributor

![Coverage Status](https://coveralls.io/builds/81893725)

coverage: 49.8% (-0.01%) from 49.812% — krishnaGajabi:openebs-mayastor-storageprofile into kubevirt:main

awels awels commented on Sep 21, 2026 19:06 UTC
Contributor

/test pull-containerized-data-importer-e2e-nfs

Acedus Acedus commented on code on Sep 22, 2026 06:22 UTC
Code Review
pkg/storagecapabilities/storagecapabilities.go:1
@@ -153,6 +153,10 @@ var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{
 	"csi.san.synology.com/smb":   {{rwx, file}, {rwo, file}},
 	// DirectPV
 	"directpv-min-io": {{rwo, file}},
+	// OpenEBS Replicated PV Mayastor
+	// RWX is block-only and opt-in per StorageClass via rwxBlock (OpenEBS v4.5.0+)

nit: I don't think there's need to duplicate this comment.

Acedus Acedus approved these changes on Sep 22, 2026 06:23 UTC
Approved Reviewer

Thanks @krishnaGajabi.

krishnaGajabi krishnaGajabi commented on code on Sep 22, 2026 08:16 UTC
Code Review
pkg/storagecapabilities/storagecapabilities.go:1
@@ -153,6 +153,10 @@ var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{
 	"csi.san.synology.com/smb":   {{rwx, file}, {rwo, file}},
 	// DirectPV
 	"directpv-min-io": {{rwo, file}},
+	// OpenEBS Replicated PV Mayastor
+	// RWX is block-only and opt-in per StorageClass via rwxBlock (OpenEBS v4.5.0+)

Dropped the duplicate, Thanks @Acedus !!

Acedus Acedus approved these changes on Sep 22, 2026 08:56 UTC
Approved Reviewer

Approved these changes.

akalenyu akalenyu commented on Sep 24, 2026 08:59 UTC
Reviewer

looks good thanks! I think it's just worth to sanity check some of these old discussions around the repo about mayastor. The most interesting one was about a missing CSIDriver resource: https://github.com/kubevirt/containerized-data-importer/pull/3585#discussion_r1908375618

I just want to make sure it really starts clicking after the profile addition, if my memory serves me right, there were a couple of more issues with it.

krishnaGajabi krishnaGajabi commented on Sep 26, 2026 15:04 UTC
Author

looks good thanks! I think it's just worth to sanity check some of these old discussions around the repo about mayastor. The most interesting one was about a missing CSIDriver resource: #3585 (comment)

> I just want to make sure it really starts clicking after the profile addition, if my memory serves me right, there were a couple of more issues with it.

Mayastor still doesn't ship a CSIDriver object. Confirmed on my 2.11.1 cluster:
kubectl get csidriver io.openebs.csi-mayastor returns NotFound, and there's no such template in
the chart. The other OpenEBS engines (LVM, ZFS, rawfile) all have one.

What that means for CDI:

  • DataVolumes fall back to the legacy path instead of using populators, since the populator check

  • looks for a CSIDriver matching the storage class provisioner.
  • External population (doc/external-dv-population.md) is rejected for the same reason, unless the

  • source is a snapshot.
  • Cloning is fine — it reads the driver from the bound PV, not from the CSIDriver object.
  • So this PR doesn't depend on any of that. It just fills in the access modes and volume modes, and
    makes RWX block classes usable. But you're right that it isn't the whole story — populators stay
    off until Mayastor ships a CSIDriver.

    That's an upstream fix and I'll take care of it, I'm an OpenEBS contributor.

    akalenyu akalenyu commented on Sep 27, 2026 11:30 UTC
    Contributor

    /approve

    kubevirt-prow[bot] kubevirt-prow[bot] commented on Sep 27, 2026 11:30 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/kubevirt/containerized-data-importer/pull/4286#issuecomment-5855432582" title="Approved">akalenyu</a>

    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:

  • ~~OWNERS~~ [akalenyu]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    Reviewers
    Assignees
    krishnaGajabi krishnaGajabi
    Labels
    risk: low confidence: 86.2% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 28.4% (LOW) · Higher = larger blast radius
    28.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 86.2% · Lower = rushed or shallow review
    86.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.9% · Safe to merge
    3.9%