Allow override of default NooBaa backing store in ODF 4.13 - Dev Preview
Issue
In case you do not want to use the default configuration of backingstore and would like to replace it with a customized backingstore, you need to override the default backingstore and remove it.
Resolution
A developer preview feature is subject to Developer preview support limitations. Developer preview features are not intended to be run in production environments. The clusters deployed with the developer preview features are considered to be development clusters and are not supported through the Red Hat Customer Portal case management system. Development Preview features are meant for customers who are willing to evaluate new products or releases of products in an early stage of product development. If you need assistance with developer preview features, reach out to the ocs-devpreview@redhat.com mailing list and a member of the Red Hat Development Team will assist you as quickly as possible based on availability and work schedules. To know more about the support scope refer to the This content is not included.KCS
Note: This feature is GA'd from ODF 4.14 and to use this feature for any version above ODF 4.14 refer its corresponding documents.
You can override the default backing store and remove it by using the manualDefaultBackingStore flag. This flag prevents the automatic reconciliation of the default backing store by the operator. The default value for this flag is false.
To update this flag, you can utilize the NooBaa CR or execute CLI commands. This provides flexibility to customize your backing store configuration and tailor it to your specific needs. By leveraging this feature, you can further optimize your system and enhance its performance.
To override the noobaa-default-backing-store, follow these steps:
-
Enable the
manualDefaultBackingStoreflag by setting it to true. This will disable the automatic reconciliation of the default backing store, but it will still be referenced by the default-bucket-class. -
Create a new backing store to replace the
noobaa-default-backing-store. -
Delete all the buckets associated with
noobaa-default-backing-storeand for thefirst.bucket, either update the policy or delete it. -
Update the default resource of the administrator account, as well as any other accounts, to use the new backing store.
-
Finally, delete the noobaa-default-backing-store.
-
Reconcile the
noobaa-default-bucket-classby creating a new backingstore with thenoobaa-default-backing-storename, or editing thenoobaa-default-bucket-classwith the new default backingstore name.
It is important to note that deleting buckets associated with the default backing store and updating the default resource for administrator accounts will ensure that the new configuration is used throughout your system.
Diagnostic Steps
Prerequisites
- Install the OpenShift Data Foundation Operator
Procedure
- Check if
noobaa-default-backing-storeis present:
$ oc get backingstore
NAME TYPE PHASE AGE
noobaa-default-backing-store pv-pool Creating 102s
- Enable manualDefaultBackingStore by using one of the following methods:
- Patch the Noobaa CR to enable
manualDefaultBackingStore
$ oc patch noobaa/noobaa --type json --patch='[{"op":"add","path":"/spec/manualDefaultBackingStore","value":true}]'
- Using noobaa CLI - Pass
--manual-default-backingstoreas a flag while creating the Noobaa system.
Note: Usenoobaa system deletecommand to delete the noobaa system if it's already created.
$ noobaa system create --manual-default-backingstore=true
INFO[0000] ✅ Already Exists: Namespace "default"
INFO[0000] ✅ Created: NooBaa "noobaa"
This disables the automatic reconciliation of the default backing store, but it is still referenced by the default-bucket-class.
- Delete all the instances/buckets associated to
noobaa-default-backing-storeand update the accounts using it as resource. This may need to include thefirst.bucket. To delete thefirst.bucket, run thenoobaa bucket delete first.bucketcommand.
Important: Use the Noobaa CLI to create a new backing store and update accounts.
- Create
new-default-backing-store(any) to override the default backing store
$ noobaa backingstore create pv-pool new-default-backing-store --num-volumes 1 --pv-size-gb 16
- Update the admin account to use
new-default-backing-storeas default resource
$ noobaa account update admin@noobaa.io --new_default_resource=new-default-backing-store
Updating the default resource for admin accounts ensures that the new configuration is used throughout your system.
- Delete the
noobaa-default-backing-store
$ oc delete backingstore noobaa-default-backing-store -n test | oc patch -n test backingstore/noobaa-default-backing-store --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
You must enable the manualDefaultBackingStore flag before proceeding with the other steps. Additionally, it is crucial to update all accounts that use the default resource and delete all instances/buckets associated with the default backing store to ensure a smooth transition.
- In the event the new default backingstore does not have the
noobaa-default-backing-storename, thenoobaa-default-bucket-classwill enter and remain in aRejectedstate and cannot be deleted as it will reconcile and automatically populate the backingstore spec with thenoobaa-default-backing-storename. To bring the bucketclass to areadystate, a new backingstore can be created with thenoobaa-default-backing-storename, or patch thenoobaa-default-bucket-classwith the new default backingstore name:
$ oc patch bucketclass noobaa-default-bucket-class -n openshift-storage --type merge -p '{"spec":{"placementPolicy":{"tiers":[{"backingStores":["<backingstore-name>"]}]}}}'
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.