Allow override of default NooBaa backing store in ODF 4.13 - Dev Preview

Solution Verified - Updated

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:

  1. Enable the manualDefaultBackingStore flag 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.

  2. Create a new backing store to replace the noobaa-default-backing-store.

  3. Delete all the buckets associated with noobaa-default-backing-store and for the first.bucket, either update the policy or delete it.

  4. Update the default resource of the administrator account, as well as any other accounts, to use the new backing store.

  5. Finally, delete the noobaa-default-backing-store.

  6. Reconcile the noobaa-default-bucket-class by creating a new backingstore with the noobaa-default-backing-store name, or editing the noobaa-default-bucket-class with 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

  1. Check if noobaa-default-backing-store is present:
$ oc get backingstore 
NAME                           TYPE      PHASE      AGE
noobaa-default-backing-store   pv-pool   Creating   102s
  1. 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-backingstore as a flag while creating the Noobaa system.
    Note: Use noobaa system delete command 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.

  1. Delete all the instances/buckets associated to noobaa-default-backing-store and update the accounts using it as resource. This may need to include the first.bucket. To delete the first.bucket, run the noobaa bucket delete first.bucket command.

Important: Use the Noobaa CLI to create a new backing store and update accounts.

  1. 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
  1. Update the admin account to use new-default-backing-store as 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.

  1. 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.

  1. In the event the new default backingstore does not have the noobaa-default-backing-store name, the noobaa-default-bucket-class will enter and remain in a Rejected state and cannot be deleted as it will reconcile and automatically populate the backingstore spec with the noobaa-default-backing-store name. To bring the bucketclass to a ready state, a new backingstore can be created with the noobaa-default-backing-store name, or patch the noobaa-default-bucket-class with the new default backingstore name:
$ oc patch bucketclass noobaa-default-bucket-class -n openshift-storage --type merge -p '{"spec":{"placementPolicy":{"tiers":[{"backingStores":["<backingstore-name>"]}]}}}'
SBR
Components
Category
Tags

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.