Bug 2158521

Summary: LVMS "topolvm.io" storageProfile is missing accessModes and volumeMode
Product: Container Native Virtualization (CNV) Reporter: Jenia Peimer <jpeimer>
Component: StorageAssignee: Jenia Peimer <jpeimer>
Status: CLOSED ERRATA QA Contact: Harel Meir <hmeir>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.12.0CC: alitke, apinnick, yadu
Target Milestone: ---   
Target Release: 4.12.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.12.1-8 Doc Type: Known Issue
Doc Text:
* The `TopoLVM` provisioner name string has changed in {VirtProductName} 4.12. As a result, the automatic import of operating system images might fail with the following error message: `DataVolume.storage spec is missing accessMode and volumeMode, cannot get access mode from StorageProfile`. ** As a workaround, update the `claimPropertySets` array of the storage profile: . Patch the `storageProfile` object as in the following example: + ---- $ oc patch storageprofile <storage_profile> --type=merge -p '{"spec": {"claimPropertySets": [{"accessModes": ["ReadWriteOnce"], "volumeMode": "Block"}, {"accessModes": ["ReadWriteOnce"], "volumeMode": "Filesystem"}]}}' ---- . Delete the affected data volumes in the `openshift-virtualization-os-images` namespace. They will be recreated with the access mode and volume mode from the updated storage profile.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 20:06:27 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 Jenia Peimer 2023-01-05 16:03:21 UTC
Description of problem:
Since 4.12 TopoLVM (LVMS) D/S provisioner was renamed from "topolvm.cybozu.com" to "topolvm.io". For the old provisioner, we fixed this bug: https://bugzilla.redhat.com/show_bug.cgi?id=2143268

Version-Release number of selected component (if applicable):
4.12, 4.13

How reproducible:
Always

Steps to Reproduce:
1. oc get storageprofile lvms-vg1 -oyaml

Actual results:
spec: {}
status:
  provisioner: topolvm.io
  storageClass: lvms-vg1

Expected results:
$ oc get storageprofile lvms-vg1 -oyaml
....
spec: {}
status:
  claimPropertySets:
  - accessModes:
    - ReadWriteOnce
    volumeMode: Block
  - accessModes:
    - ReadWriteOnce
    volumeMode: Filesystem
  - accessModes:
    - ReadWriteOncePod
    volumeMode: Block
  - accessModes:
    - ReadWriteOncePod
    volumeMode: Filesystem
  provisioner: topolvm.io
  storageClass: lvms-vg1


Additional info: 

This will impact the boot-source images feature when lvms-vg1 is the default storage class:

   $ oc describe dv -n openshift-virtualization-os-images centos-stream8-2f16c067b974
     ...
     Warning  ErrClaimNotValid  4m35s (x17 over 10m)  datavolume-controller  DataVolume.storage spec is missing accessMode and volumeMode, cannot get access mode from StorageProfile lvms-vg1


W/A: 
1. Patch the storageProfile manually: 

   oc patch storageprofile lvms-vg1 --type=merge -p '{"spec": {"claimPropertySets": [{"accessModes": ["ReadWriteOnce"], "volumeMode": "Block"}, {"accessModes": ["ReadWriteOnce"], "volumeMode": "Filesystem"}]}}'

2. Delete the DVs in openshift-virtualization-os-images namespace, they will be recreated and will grab the accessMode and volumeMode from the updated storageprofile.

Comment 1 Harel Meir 2023-02-05 13:37:55 UTC
Verified(output check and vm creation)

Comment 7 errata-xmlrpc 2023-02-28 20:06:27 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 (OpenShift Virtualization 4.12.1 Images), 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/RHEA-2023:1023