Bug 2158277 - [odf 4.10] - overprovisionControl- Added "ocs-" prefix to cluster resource quota name
Summary: [odf 4.10] - overprovisionControl- Added "ocs-" prefix to cluster resource qu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: ocs-operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ODF 4.10.12
Assignee: Malay Kumar parida
QA Contact: Parag Kamble
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-04 22:13 UTC by Oded
Modified: 2023-08-09 17:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-26 17:13:29 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage ocs-operator pull 1958 0 None open Bug 2158277: [release-4.10] fix cluster resource quota names containing double ocs prefix 2023-03-28 06:14:52 UTC
Red Hat Product Errata RHBA-2023:2032 0 None None None 2023-04-26 17:13:35 UTC

Description Oded 2023-01-04 22:13:44 UTC
Description of problem (please be detailed as possible and provide log
snippests):
When we create an overprovisionControl based on ocs-storagecluster-ceph-rbd and ocs-storagecluster-ceph-fs storage class, clusterresourcequota name is  ocs-ocs-storagecluster-ceph-rbd-quota-sc-test.
The expected name is <SC-NAME>-<quotaName>


Version of all relevant components (if applicable):
OCP Version:4.10.0-0.nightly-2022-12-25-031753
ODF version: 4.10.10-1
Provider: Vmware

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


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


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


Can this issue reproducible?


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 with “openshift-quota” label
$ oc new-project ocs-quota-sc-test
$ oc label Namespace ocs-quota-sc-test openshift-quota=quota-sc-test

2.Add 'overprovisionControl' section to storagecluster yaml file:
$ 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

$ oc get storagecluster -n openshift-storage -o yaml | grep overprovisionControl -A 7
    overprovisionControl:
    - capacity: 8Gi
      quotaName: quota-sc-test
      selector:
        labels:
          matchLabels:
            openshift-quota: quota-sc-test
      storageClassName: ocs-storagecluster-ceph-rbd

3.Check clusterresourcequota name
$ oc get clusterresourcequota
NAME                                            AGE
ocs-ocs-storagecluster-ceph-rbd-quota-sc-test   3m1s

$ oc describe  clusterresourcequota ocs-ocs-storagecluster-ceph-rbd-quota-sc-test 
Name:		ocs-ocs-storagecluster-ceph-rbd-quota-sc-test
Created:	3 minutes ago
Labels:		<none>
Annotations:	<none>
Namespace Selector: ["ocs-quota-sc-test"]
Label Selector: openshift-quota=quota-sc-test
AnnotationSelector: map[]
Resource									Used	Hard
--------									----	----
ocs-storagecluster-ceph-rbd.storageclass.storage.k8s.io/requests.storage	0	8Gi



Same Process on ODF4.12:
$  oc get storagecluster -n openshift-storage -o yaml | grep overprovisionControl -A 7
    overprovisionControl:
    - capacity: 8Gi
      quotaName: quota-sc-test
      selector:
        labels:
          matchLabels:
            openshift-quota: quota-sc-test
      storageClassName: ocs-storagecluster-ceph-rbd

$ oc get clusterresourcequota
NAME                                        AGE
ocs-storagecluster-ceph-rbd-quota-sc-test   77s



Actual results:

$ oc get clusterresourcequota
NAME                                            AGE
ocs-ocs-storagecluster-ceph-rbd-quota-sc-test   3m1s

Expected results:
$ oc get clusterresourcequota
NAME                                        AGE
ocs-storagecluster-ceph-rbd-quota-sc-test   77s

Additional info:

Comment 3 Oded 2023-01-05 12:51:23 UTC
Are we planning to fix this in ODF4.10?

I opened a new pr to fix the automation test on ODF4.10
https://github.com/red-hat-storage/ocs-ci/pull/6887/files

Comment 7 Malay Kumar parida 2023-03-09 07:22:36 UTC
Hi Oded, This has been fixed in 4.11 
PR-https://github.com/red-hat-storage/ocs-operator/pull/1614
BZ-https://bugzilla.redhat.com/show_bug.cgi?id=2016503

We can use this current BZ to backport the fix to 4.10

Comment 18 errata-xmlrpc 2023-04-26 17:13:29 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 (Red Hat OpenShift Data Foundation 4.10.12 Bug Fix Update), 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/RHBA-2023:2032


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