Bug 1882983 - oVirt csi driver should refuse to provision RWX and ROX PV
Summary: oVirt csi driver should refuse to provision RWX and ROX PV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 4.10.0
Assignee: Vojtech Juranek
QA Contact: michal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-27 07:58 UTC by Qin Ping
Modified: 2022-03-12 04:34 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the oVirt csi driver allowed selecting ROX and RWX access modes when creating a PVC from a config file. In this release, an error message is displayed when trying to create a PVC with read/write many access mode, and the operation is not allowed.
Clone Of:
Environment:
Last Closed: 2022-03-12 04:34:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovirt-csi-driver pull 100 0 None open Bug 1882983: check PV access mode 2022-01-10 14:48:23 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-12 04:34:54 UTC

Description Qin Ping 2020-09-27 07:58:31 UTC
Description of Problem:
oVirt csi driver should refuse to provision RWX and ROX PV

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-09-24-162403

How Reproducible:
Always

Steps to Reproduce:
1. Create a PVC with storageclass created by oVirt csi operator
# cat pvc.yaml 
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvc-1
spec:
  storageClassName: ovirt-csi-sc
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
2. Create a deployment using this PVC
3. Set the deployment replicas=100
4. Check pods

Actual Results:
Some of Pods are in "ContainerCreating" status.
  Warning  FailedAttachVolume  82s (x3 over 88s)  attachdetach-controller  AttachVolume.Attach failed for volume "pvc-94e0ea13-0fe7-4b46-9327-33495c01dde3" : rpc error: code = Unknown desc = Fault reason is "Operation Failed". Fault detail is "[Cannot attach Virtual Disk. Related operation is currently in progress. Please try again later.]". HTTP response code is "409". HTTP response message is "409 Conflict".
  Warning  FailedAttachVolume  26s (x3 over 74s)  attachdetach-controller  AttachVolume.Attach failed for volume "pvc-94e0ea13-0fe7-4b46-9327-33495c01dde3" : rpc error: code = Unknown desc = Fault reason is "Operation Failed". Fault detail is "[Cannot attach Virtual Disk. The disk is not shareable and is already attached to a VM.]". HTTP response code is "409". HTTP response message is "409 Conflict".

Expected Results:
From the envent, seems oVirt volume should not support RWX and ROX PV, then the user create a PVC with `RWX` or `ROX` access mode, it should refuse to provision PV for it.

Comment 1 Jan Safranek 2020-09-29 11:24:33 UTC
This looks like CSI driver issue. BTW, dynamic provisioning of ROX volumes does not make much sense, since the volume is empty and read-only empty volume is not really useful. It may get useful with cloning or snapshot restore (if oVirt supports attaching a read-only volume to multiple nodes).

See here how Kubernetes PVC.Spec.AccessMode is translated into CSI capabilities: https://github.com/kubernetes-csi/external-provisioner/blob/8b0707649212d770624008edbd127f312121aff9/pkg/controller/controller.go#L395

Comment 2 Sandro Bonazzola 2020-10-22 11:23:46 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 3 Sandro Bonazzola 2020-12-03 12:58:55 UTC
need more time for this one

Comment 4 Gal Zaidman 2021-01-26 13:06:50 UTC
We can add a warning in the CSI driver logs for an unsupported accessmode

Comment 5 Gal Zaidman 2021-01-27 09:04:58 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 6 Gal Zaidman 2021-03-30 13:25:21 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Benny do you know when are you planning on taking this?

Comment 7 Benny Zlotnik 2021-04-05 07:40:23 UTC
(In reply to Gal Zaidman from comment #6)
> due to capacity constraints we will be revisiting this bug in the upcoming
> sprint
> 
> Benny do you know when are you planning on taking this?
Not currently, depends on progress with my RHV work

Comment 8 Gal Zaidman 2021-06-06 12:10:54 UTC
Do we still need this now that we have block support?

Comment 9 Benny Zlotnik 2021-06-06 12:22:18 UTC
(In reply to Gal Zaidman from comment #8)
> Do we still need this now that we have block support?

yes, we have to mark RWX volumes as "Shared" in RHV and

Comment 15 michal 2022-01-14 08:04:42 UTC
ocp: 4.10.0-0.nightly-2022-01-11-065245
1) create pvc with Access mode - ReadWriteMany
2) look on log of pod controller - 
excpected error appear: 
unsupported access mode MULTI_NODE_MULTI_WRITER, currently only RWO is supported


pvc stuck on pending state but it's different bug as Vojech said

Comment 19 Janos Bonic 2022-02-03 07:59:32 UTC
This bug has mistakenly been linked to two PRs: https://github.com/openshift/ovirt-csi-driver/pull/100 https://github.com/openshift/ovirt-csi-driver/pull/101

PR #100 was merged into 4.10, #101 was merged into 4.11. Cloning this issue to track the 4.11 bug.

Comment 20 Janos Bonic 2022-02-03 08:00:41 UTC
The bug for the failing error code is 2043035

Comment 22 errata-xmlrpc 2022-03-12 04:34:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


Note You need to log in before you can comment on or make changes to this bug.