Bug 2024545
| Summary: | Overprovision Level Policy Control doesn't support custom storageclass | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat OpenShift Data Foundation | Reporter: | Shay Rozen <srozen> | ||||
| Component: | ocs-operator | Assignee: | Shachar Sharon <ssharon> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Oded <oviner> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.9 | CC: | ebenahar, hnallurv, ikave, madam, muagarwa, nberry, ocs-bugs, odf-bz-bot, shilpsha, sostapov, ssharon | ||||
| Target Milestone: | --- | Keywords: | AutomationBackLog | ||||
| Target Release: | ODF 4.10.0 | Flags: | muagarwa:
needinfo?
(ssharon) shilpsha: needinfo? (ssharon) |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 4.10.0-151 | Doc Type: | Bug Fix | ||||
| Doc Text: |
.Define OverprovisionControl for custom and built-in storage-classes
Previously, it was not possible to define OverProvisionControl user-defined custom storage-classes, because it was rejected as invalid for the entire StorageCluster CRD. This was because the original solution was restricted only to built-in OpenShift Container Storage (OCS) storage-classes.
With this update, you can define OverprovisionControl for both default as well as user-defined storage-classes.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-04-13 18:50:37 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 2011326, 2056571 | ||||||
| Attachments: |
|
||||||
|
Description
Shay Rozen
2021-11-18 10:15:25 UTC
@ Moving it out to 4.10/4.9.z and added this as a known issue as discussed offline. Shachar, please add the doc text. Not required for z-stream, lets fix first in 4.10 and then take a decision. SetUp:
ODF Version:4.10.0-194
OCP Version: 4.10.0-0.nightly-2022-03-13-040322
LSO version: local-storage-operator.4.10.0-202202241648
Provider:Vmware
Test Process:
1.Create SC [sc-test]:
$ oc describe sc sc-test
Name: sc-test
IsDefaultClass: No
Annotations: <none>
Provisioner: openshift-storage.rbd.csi.ceph.com
Parameters: clusterID=openshift-storage,csi.storage.k8s.io/controller-expand-secret-name=rook-csi-rbd-provisioner,csi.storage.k8s.io/controller-expand-secret-namespace=openshift-storage,csi.storage.k8s.io/fstype=ext4,csi.storage.k8s.io/node-stage-secret-name=rook-csi-rbd-node,csi.storage.k8s.io/node-stage-secret-namespace=openshift-storage,csi.storage.k8s.io/provisioner-secret-name=rook-csi-rbd-provisioner,csi.storage.k8s.io/provisioner-secret-namespace=openshift-storage,fsName=ocs-storagecluster-cephfilesystem,imageFeatures=layering,imageFormat=2,pool=ocs-storagecluster-cephblockpool
AllowVolumeExpansion: True
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events: <none>
2.Check storagecluster status:
$ oc get storageclusters.ocs.openshift.io -n openshift-storage
NAME AGE PHASE EXTERNAL CREATED AT VERSION
ocs-storagecluster 14d Ready 2022-03-15T22:30:02Z 4.10.0
3.Added “overprovisionControl” section to storagecluster yaml file:
overprovisionControl:
- capacity: 10Gi
quotaName: quota1
selector:
labels:
matchLabels:
storagequota: storagequota1
storageClassName: sc-test
$ oc edit storageclusters.ocs.openshift.io -n openshift-storage
storagecluster.ocs.openshift.io/ocs-storagecluster edited
4.Check storagecluster status:
$ oc get storageclusters.ocs.openshift.io -n openshift-storage
NAME AGE PHASE EXTERNAL CREATED AT VERSION
ocs-storagecluster 14d Ready 2022-03-15T22:30:02Z 4.10.0
for mor details:
https://docs.google.com/document/d/1QfmqMNRBJ0byVQ0F9F4p3hYfg_saSVu1-hytyV0CDbw/edit
Pls add doc text Bug Fixed.
SetUp:
ODF Version:4.10.0-194
OCP Version: 4.10.0-0.nightly-2022-03-13-040322
LSO version: local-storage-operator.4.10.0-202202241648
Provider:Vmware
Test Process:
1.Create project with “openshift-quota” label
$ cat ns_ocs-quota-sc-test.yaml
apiVersion: v1
kind: Namespace
metadata:
name: ocs-quota-sc-test
labels:
openshift-quota: quota-sc-test
2.Create SC [sc-test]:
$ oc describe sc sc-test
Name: sc-test
IsDefaultClass: No
Annotations: <none>
Provisioner: openshift-storage.rbd.csi.ceph.com
Parameters: clusterID=openshift-storage,csi.storage.k8s.io/controller-expand-secret-name=rook-csi-rbd-provisioner,csi.storage.k8s.io/controller-expand-secret-namespace=openshift-storage,csi.storage.k8s.io/fstype=ext4,csi.storage.k8s.io/node-stage-secret-name=rook-csi-rbd-node,csi.storage.k8s.io/node-stage-secret-namespace=openshift-storage,csi.storage.k8s.io/provisioner-secret-name=rook-csi-rbd-provisioner,csi.storage.k8s.io/provisioner-secret-namespace=openshift-storage,fsName=ocs-storagecluster-cephfilesystem,imageFeatures=layering,imageFormat=2,pool=ocs-storagecluster-cephblockpool
AllowVolumeExpansion: True
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events: <none>
3.Check storagecluster status:
$ oc get storageclusters.ocs.openshift.io -n openshift-storage
NAME AGE PHASE EXTERNAL CREATED AT VERSION
ocs-storagecluster 14d Ready 2022-03-15T22:30:02Z 4.10.0
4.Added “overprovisionControl” section to storagecluster yaml file:
$ oc edit storageclusters.ocs.openshift.io -n openshift-storage
storagecluster.ocs.openshift.io/ocs-storagecluster edited
- capacity: 7Gi
storageClassName: sc-test
quotaName: quota-sc-test
selector:
labels:
matchLabels:
openshift-quota: quota-sc-test
5.Check storagecluster status:
$ oc get storageclusters.ocs.openshift.io -n openshift-storage
NAME AGE PHASE EXTERNAL CREATED AT VERSION
ocs-storagecluster 19d Ready 2022-03-15T22:30:02Z 4.10.0
6. Check quota “ocs-sc-test-quota-sc-test”
$ oc describe clusterresourcequota ocs-sc-test-quota-sc-test
Name: ocs-sc-test-quota-sc-test
Created: About a minute ago
Labels: <none>
Annotations: <none>
Namespace Selector: ["ocs-quota-sc-test"]
Label Selector: openshift-quota=quota-sc-test
AnnotationSelector: map[]
Resource Used Hard
-------- ---- ----
sc-test.storageclass.storage.k8s.io/requests.storage 0 7Gi
7.Create 3Gi pvc on project “ocs-quota-sc-test” with sc “sc-test”
$ oc describe clusterresourcequota ocs-sc-test-quota-sc-test
Name: ocs-sc-test-quota-sc-test
Created: 7 minutes ago
Labels: <none>
Annotations: <none>
Namespace Selector: ["ocs-quota-sc-test"]
Label Selector: openshift-quota=quota-sc-test
AnnotationSelector: map[]
Resource Used Hard
-------- ---- ----
sc-test.storageclass.storage.k8s.io/requests.storage 3Gi 7Gi
8.Create 5Gi pvc on project “ocs-quota-sc-test” with sc “sc-test”
Error: [expected]
persistentvolumeclaims "test2" is forbidden: exceeded quota: ocs-sc-test-quota-sc-test, requested: sc-test.storageclass.storage.k8s.io/requests.storage=5Gi, used: sc-test.storageclass.storage.k8s.io/requests.storage=3Gi, limited: sc-test.storageclass.storage.k8s.io/requests.storage=7Gi
for more info:
https://docs.google.com/document/d/1QfmqMNRBJ0byVQ0F9F4p3hYfg_saSVu1-hytyV0CDbw/edit
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 (Important: Red Hat OpenShift Data Foundation 4.10.0 enhancement, security & 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/RHSA-2022:1372 |