Bug 2054778

Summary: PVC created with filesystem volume mode in some cases, instead of block volume mode
Product: Container Native Virtualization (CNV) Reporter: dalia <dafrank>
Component: StorageAssignee: Bartosz Rybacki <brybacki>
Status: CLOSED ERRATA QA Contact: dalia <dafrank>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: alitke, brybacki, cnv-qe-bugs, mrashish, yadu
Target Milestone: ---   
Target Release: 4.10.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.10.1-5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-18 20:26:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dalia 2022-02-15 16:57:52 UTC
Description of problem:
When import packed archive DV, with storage API, specifying only the storage class (without access/volume mode), which storage profile includes block and RWX, the PVC created with filesystem instead of block access mode.



Version-Release number of selected component (if applicable):
4.10

How reproducible:
100%

Steps to Reproduce:
1. Create DV:

---
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: unpack-compressed-dv
spec:
  source:
    http:
      url: http://.....raw.xz
  storage:
    resources:
      requests:
        storage: 200Mi
    storageClassName: ocs-storagecluster-ceph-rbd
  contentType: archive


Actual results:
DV and PVC are pending because PVC created with Filesystem volume mode (instead of block) and RWX access mode.

Expected results:
PVC should be bound and import should fail with the error message:
Unable to process data: Unable to transfer source data to target directory: unable to untar files from endpoint: exit status 2

Additional info:


DV spec:
  spec:
    contentType: archive
    source:
      http:
        url: http://....raw.xz
    storage:
      resources:
        requests:
          storage: 200Mi
      storageClassName: ocs-storagecluster-ceph-rbd


PVC spec:
  spec:
    accessModes:
    - ReadWriteMany
    resources:
      requests:
        storage: "221920847"
    storageClassName: ocs-storagecluster-ceph-rbd
    volumeMode: Filesystem


ocs-storagecluster-ceph-rbd storage profile:
spec: {}
status:
  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Block
  provisioner: openshift-storage.rbd.csi.ceph.com
  storageClass: ocs-storagecluster-ceph-rbd


PVC error message:
failed to provision volume with StorageClass "ocs-storagecluster-ceph-rbd": rpc error: code = InvalidArgument desc = multi node access modes are only supported on rbd `block` type volumes

Comment 1 Adam Litke 2022-02-16 14:48:25 UTC
So in the DV I can see you are using contentType: archive.  When unpacking archives onto storage we always require a Filesystem mode PV since a tar file can only be extracted onto a filesystem.  There is an issue though.  For ceph-rbd, RWX/Filesystem is not supported so if we choose to select a Filesystem mode with this storage class it must use RWO.  Bartosz, can you check that the list of acceptable pvc profiles for the ceph-rbd provisioner is correct?

Comment 2 Adam Litke 2022-03-11 12:10:49 UTC
Moving back to POST until #2190 merges.

Comment 3 Maya Rashish 2022-03-22 12:31:46 UTC
ON_QA for there being a build containing the fix

Comment 4 dalia 2022-04-03 10:53:24 UTC
verified on 4.10.1

Comment 10 errata-xmlrpc 2022-05-18 20:26:57 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 Virtualization 4.10.1 Images security and bug fix 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:4668