Bug 2132073 - Overprovision Level Policy Control doesn't display storageclass in clusterresourcequota
Summary: Overprovision Level Policy Control doesn't display storageclass in clusterres...
Keywords:
Status: NEW
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: ocs-operator
Version: 4.11
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Malay Kumar parida
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-04 14:49 UTC by Aditi
Modified: 2023-08-09 17:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Aditi 2022-10-04 14:49:30 UTC
Description of problem (please be detailed as possible and provide log
snippests):

storageclass wasn't displayed in clusterresourcequota under resource and following error was displayed:

>
09:27:17 - MainThread - tests.manage.pv_services.test_overprovision_level_policy_control - ERROR  - expected string:8Gi not in Name:        sc-test-blk-quota-sc-test
Created:        Less than a second ago
Labels:         <none>
Annotations:    <none>
Namespace Selector: []
Label Selector: openshift-quota=quota-sc-test
AnnotationSelector: map[]
Resource        Used    Hard
--------        ----    ----

FAILED


Version of all relevant components (if applicable):
ODF 4.11

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1.Create project ocs-quota-sc-test with “openshift-quota” label
2. Use existing storageclass - ocs-storagecluster-ceph-rbd
3.Add “overprovisionControl” section to storagecluster yaml file as follows:

 oc -n openshift-storage patch storagecluster ocs-storagecluster -n openshift-storage -p '{"spec": {"overprovisionControl": [{"capacity": "8Gi","storageClassName":"ocs-storagecluster-ceph-rbd", "quotaName": "quota-sc-test", "selector": {"labels": {"matchLabels": {"openshift-quota":"quota-sc-test"}}}}]}}' --type merge

4.Verify storagecluster on Ready state
5.Check clusterresourcequota output

[root@rdr-adu411-1d46-lon06-bastion-0 ~]# oc describe clusterresourcequota ocs-storagecluster-ceph-rbd-quota-sc-test
Name:           ocs-storagecluster-ceph-rbd-quota-sc-test
Created:        16 minutes ago
Labels:         <none>
Annotations:    <none>
Namespace Selector: []
Label Selector: openshift-quota=quota-sc-test
AnnotationSelector: map[]
Resource        Used    Hard
--------        ----    ----
[root@rdr-adu411-1d46-lon06-bastion-0 ~]#


Actual results:
storageclass ocs-storagecluster-ceph-rbd is not displayed under Resource in clusterresourcequota. However it is present under the spec section:

[root@rdr-adu411-1d46-lon06-bastion-0 ~]# oc get clusterresourcequota ocs-storagecluster-ceph-rbd-quota-sc-test -o yaml
apiVersion: quota.openshift.io/v1
kind: ClusterResourceQuota
metadata:
  creationTimestamp: "2022-10-04T13:33:32Z"
  generation: 1
  name: ocs-storagecluster-ceph-rbd-quota-sc-test
  resourceVersion: "6863107"
  uid: 3683c55d-5860-43f1-85a1-65b5973a4b01
spec:
  quota:
    hard:
      ocs-storagecluster-ceph-rbd.storageclass.storage.k8s.io/requests.storage: 8Gi
  selector:
    annotations: null
    labels:
      matchLabels:
        openshift-quota: quota-sc-test




Expected results:
storageclass ocs-storagecluster-ceph-rbd should be displayed under Resource in clusterresourcequota.


Additional info:


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