Bug 2054778 - PVC created with filesystem volume mode in some cases, instead of block volume mode
Summary: PVC created with filesystem volume mode in some cases, instead of block volum...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.10.1
Assignee: Bartosz Rybacki
QA Contact: dalia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-15 16:57 UTC by dalia
Modified: 2022-05-18 20:27 UTC (History)
5 users (show)

Fixed In Version: CNV v4.10.1-5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-18 20:26:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 2177 0 None Merged Bugfix for ceph rbd archive upload 2022-03-13 11:30:20 UTC
Github kubevirt containerized-data-importer pull 2190 0 None Merged [release-v1.43] Bugfix for ceph rbd archive upload 2022-03-22 10:58:54 UTC
Red Hat Product Errata RHSA-2022:4668 0 None None None 2022-05-18 20:27:18 UTC

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


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