Migrating from a Quay Standalone Multicloud Object Gateway (MCG) to an ODF StorageCluster ODF MCG - NooBaa
Environment
- Red Hat OpenShift Container Platform (RHOCP) v4.x
- Red Hat OpenShift Data Foundation (RHODF) v4.18 and below
Issue
It has been previously shown in the Quay Documentation to deploy a NooBaa MCG stack using a NooBaa CR yaml instead of a storagecluster.yaml or going through the ODF UI to create the standalone MCG. This is no longer supported and has been shown to cause issues during the ODF v4.18 - ODF v4.19 upgrade, as demonstrated in the Standalone MCG Deployed via Quay docs fails ODF upgrade to 4.19 solution.
If this configuration is discovered and can be easily identified with an empty storagecluster.yaml in the openshift-storage namespace, it will be required to migrate this configuration before the upgrade to ODF v4.19.
RELATED ARTICLES:
Standalone MCG Deployed via Quay Documentation Fails ODF v4.19 Upgrade
Resolution
-
Take a complete backup of NooBaa using the Perform a One-Time Backup of the noobaa-db-pg-0 Database for the Multicloud Object Gateway (NooBaa) for ODF v4.18 and Below solution and leave the NooBaa services scaled down.
-
Run the following command and note that the same PVC storageclass MUST match the storageclass when creating the StorageCluster CR:
Example shows gp3-csi storageclass:
$ oc get pvc -n openshift-storage | grep noobaa
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
db-noobaa-db-pg-0 Bound pvc-00d96c61-4bf5-4302-a5c4-739a493bbd3f 50Gi RWO gp3-csi 2m22s
- Apply a storagecluster.yaml, and ensure the
dbStorageClassNameis preserved from the previous deployment shown in step 2:
Example uses gp3-csi storageclass:
a. Create the storagecluster.yaml:
apiVersion: ocs.openshift.io/v1
kind: StorageCluster
metadata:
name: ocs-storagecluster
namespace: openshift-storage
spec:
multiCloudGateway:
dbStorageClassName: gp3-csi #<------ CHANGE TO REFLECT PVC STORAGECLASS NAME (STEP 2)
reconcileStrategy: standalone
b. Apply the storagecluster.yaml:
$ oc apply -f storagecluster.yaml
- The pods will take some time to restart. Once all NooBaa pods are running, validate that the following two outputs reflect a phase
Ready:
$ oc get noobaa -n openshift-storage
$ oc get backingstore -A
NOTE: If on v4.19, this will take time as the new Cluster HA resource will begin copying the PVC from the db-noobaa-db-pg-0 PVC to the two new PVCs for the primary/secondary db.
Diagnostic Steps
Empty storagecluster.yaml. It should be populated to be a supported configuration:
$ oc get storagecluster -n openshift-storage -o yaml
apiVersion: v1
items: []
kind: List
metadata:
resourceVersion: ""
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.