Bug 2036479 - [API] No accessMode defined on StorageProfile for nfs StorageClass
Summary: [API] No accessMode defined on StorageProfile for nfs StorageClass
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.9.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Adam Litke
QA Contact: Ying Cui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-02 13:12 UTC by Maayan Hadasi
Modified: 2022-01-05 17:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-05 17:26:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
plan.yaml (4.46 KB, text/plain)
2022-01-02 13:13 UTC, Maayan Hadasi
no flags Details
cdi-deployment.log (390.53 KB, text/plain)
2022-01-02 13:14 UTC, Maayan Hadasi
no flags Details

Description Maayan Hadasi 2022-01-02 13:12:53 UTC
Description of problem:
MTV migration does not start when using NFS as the target storage class (tested with cold migration).
The importer pod is not created and no PVC is bound

$ oc get dv
NAME                                                              PHASE   PROGRESS   RESTARTS   AGE
mtv-api-tests-22-02-01-15-05-48-508-plan-7b27230c-9b41-4ddmtwzf                                 41s

Error in cdi-deployment log:
{"level":"error","ts":1641128925.8659854,"logger":"controller-runtime.manager.controller.datavolume-controller","msg":"Reconciler error","name":"mtv-api-tests-22-02-01-15-05-48-508-plan-7b27230c-9b41-4ddmtwzf","namespace":"mtv-api-tests","error":"no accessMode defined on StorageProfile for nfs StorageClass"


Version-Release number of selected component (if applicable):
MTV 2.3.0-2 / iib:152391
CNV 4.9.1-58 / iib:144466


How reproducible:
100%


Attachments:
plan.yaml
cdi-deployment.log


Steps to Reproduce:
1.
2.
3.


Actual results:


Expected results:


Additional info:
The issue is not reproduced with MTV 2.2.0 GA

Comment 1 Maayan Hadasi 2022-01-02 13:13:53 UTC
Created attachment 1848572 [details]
plan.yaml

Comment 2 Maayan Hadasi 2022-01-02 13:14:19 UTC
Created attachment 1848573 [details]
cdi-deployment.log

Comment 3 Fabien Dupont 2022-01-03 09:35:15 UTC
StorageProfile is a CNV feature. In MTV 2.2, we don't specify volume and access mode to let CDI handle this.

Comment 4 Adam Litke 2022-01-05 17:26:08 UTC
This is working as designed.  CDI can only recommend accessMode and volumeMode settings for storage classes that have a recognized provisioner.  Your NFS storage class has "provisioner: kubernetes.io/no-provisioner" which means that CDI cannot differentiate this storage class from another that contains statically provisioned block volumes for example.  To work around the problem you can update the spec of the 'nfs' storage profile object to provide the necessary defaults.  

For example 

  claimPropertySets:
  - accessModes:
    - ReadWriteMany
    volumeMode: Filesystem

See https://github.com/kubevirt/containerized-data-importer/blob/main/doc/storageprofile.md for additional information.


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