Quota support for OBC provided by RGW - Developer Preview

Updated

Starting OpenShift Data Foundation 4.9, it is now possible to set quota options for object bucket claims (OBC) to avoid resource starvation and increase the usage of the storage provided via bucket. The quota can be set during the OBC creation using the options maxObjects and maxSize in the custom resource definition (CRD). Also, users can update these options after the OBC creation.

Note: Developer preview releases are meant for customers who are willing to evaluate new products or releases of products in an early stage of product development.

This is a live document only to be referenced for feature evaluation. This is unsupported for the production clusters. If you find any mistakes or missing instructions or need any assistance, please add an Issue or write to us @ ocs-devpreview@redhat.com.

Setting quota options by using oc command (No UI support, specific to OBCs from RGW, not for MCG)

You can set Quota options on OBC by using the maxObjects and maxSize options in the CRD.

For example:

apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim  
metadata:  
  name: <obc name>  
  namespace: <namespace>  
spec:  
  bucketName:  <name of the backend bucket>  
  storageClassName: <name of storage class>  
  additionalConfig:   
    maxObjects: "1000" # sets limit on no of objects this obc can hold  
    maxSize: "2G" # sets max limit for the size of data this obc can hold   

You can specify the quota during the creation of the OBC. Also, it can be updated it later.

Refer This content is not included.BZ 2015382.

As a prerequisite for collecting the OBC related metrics by using OpenShift Container Storage exporter, create prometheus-user and provide appropriate permissions after the storage cluster creation.

  1. Create cephobjectstoreuser using the following YAML :
apiVersion: ceph.rook.io/v1
kind: CephObjectStoreUser
metadata:
  name: prometheus-user
  namespace: openshift-storage
spec:
  store: <objectstore-name>
  1. Add appropriate permission.
radosgw-admin caps add --uid=prometheus-user --caps="users=*" (from toolbox pod)

Procedure to configure Toolbox Pod is mentioned in this article

Prometheus alerts

You can see the following Prometheus alerts:

  • ObcQuotaBytesAlert : crossed 80% of storage for size
  • ObcQuotaObjectsAlert: crossed 80% limit for number of objects
  • ObcQuotaBytesExhausedAlert : size exhausted
  • ObcQuotaObjectsExhausedAlert: number of object limit exceeded

NOTE. Alertmanager may report false messages like this

ObjectBucketClaim has crossed 80% of the size limit set by the quota(bytes) and will become read-only on reaching the quota limit. Increase the quota in th...

This is a known issue that has been fixed in the following ODF versions via the following bugs:

  • Bug 2188032 - [GSS][ODF 4.10] ObjectBucketClaim has crossed % of the size limit - ocs-prometheus-rules / odf-obc-quota-alert.rules configured with labels.objectbucketclaim
    --> Fixed in ODF 4.15.0

  • Bug 2247963 - [Backport-4.14][GSS][ODF 4.10] ObjectBucketClaim has crossed % of the size limit - ocs-prometheus-rules / odf-obc-quota-alert.rules configured with labels.objectbucketclaim
    This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=2247963
    --> Fixed in ODF 4.14.4

  • Bug 2243003 - [Backport-4.13][GSS][ODF 4.10] ObjectBucketClaim has crossed % of the size limit - ocs-prometheus-rules / odf-obc-quota-alert.rules configured with labels.objectbucketclaim
    --> Fixed in ODF 4.13.7

  • Bug 2239766 - [Backport-4.12][GSS][ODF 4.10] ObjectBucketClaim has crossed % of the size limit - ocs-prometheus-rules / odf-obc-quota-alert.rules configured with labels.objectbucketclaim
    --> Fixed in ODF 4.12.11

Documented on Red hat Product Errata - Red Hat OpenShift Data Foundation 4.14.4 Bug Fix Update

SBR
Article Type