Uploaded image for project: 'Data Foundation Bugs'
  1. Data Foundation Bugs
  2. DFBUGS-2481

Can't disable "is-default-virt-class" annotation in ocs-storagecluster-ceph-rbd-virtualization storage class

XMLWordPrintable

    • False
    • False
    • Committed
    • ?
    • ?
    • 4.19.0-87.konflux
    • Committed
    • Hide
      Feature, enhancement: Adds support to marks RBD virtualization as default storage class in creation flow.
      Reason: Operator added an option in https://issues.redhat.com/browse/DFBUGS-2342
      Result: This allowed the operator changes to be surfaced in the UI
      Show
      Feature, enhancement: Adds support to marks RBD virtualization as default storage class in creation flow. Reason: Operator added an option in https://issues.redhat.com/browse/DFBUGS-2342 Result: This allowed the operator changes to be surfaced in the UI
    • Feature
    • Proposed
    • None

       

      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. 

              badhikar@redhat.com Bipul Adhikari
              jpeimer@redhat.com Jenia Peimer
              Bipul Adhikari
              Avdhoot Sagare Avdhoot Sagare
              Votes:
              0 Vote for this issue
              Watchers:
              28 Start watching this issue

                Created:
                Updated:
                Resolved: