-
Bug
-
Resolution: Done-Errata
-
Normal
-
odf-4.19
Description of problem - Provide a detailed description of the issue encountered, including logs/command-output snippets and screenshots if the issue is observed in the UI:
ocs-storagecluster-ceph-rbd-virtualization storage class gets created automatically if OCP Virt is installed, and this storage class has the storageclass.kubevirt.io/is-default-virt-class annotation set to "true"
$ oc get sc ocs-storagecluster-ceph-rbd-virtualization -oyaml metadata: annotations: storageclass.kubevirt.io/is-default-virt-class: "true"
But the users may want to set it to "false" manually
In 4.19, it always gets reconciled back to "true"
The version of all relevant components (OCP, ODF, RHCS, ACM whichever is applicable):
odf-operator.v4.19.0-47.stable
Does this issue impact your ability to continue to work with the product?
Yes
Is there any workaround available to the best of your knowledge?
Not that I'm aware of
Can this issue be reproduced? If so, please provide the hit rate
Yes, install OCS, install OCP Virtualization
If this is a regression, please provide more details to justify this:
Yes, in 4.18 annotation is not reconciled
Steps to Reproduce:
1. install OCS, install OCP Virtualization
2. Patch the annotation to be "false", see it gets back:
$ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' "ocs-storagecluster-ceph-rbd-virtualization" $ oc patch storageclass ocs-storagecluster-ceph-rbd-virtualization -p '{"metadata": {"annotations": {"storageclass.kubevirt.io/is-default-virt-class": "false"}}}' storageclass.storage.k8s.io/ocs-storagecluster-ceph-rbd-virtualization patched $ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' $ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' $ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' $ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' $ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name' "ocs-storagecluster-ceph-rbd-virtualization"
Actual results:
The annotation value is back to "true"
Expected results:
The annotation value stays "false" if it was changed to "false"
Logs collected and log location:
Additional info:
Not being able to disable the annotation causes OCP Virt workloads always to use the OCS storage class, even if it's not desirable for a particular use case or setup.