3.17. Hub recovery using Red Hat Advanced Cluster Management [Technology preview]
When your setup has active and passive Red Hat Advanced Cluster Management for Kubernetes (RHACM) hub clusters, and in case where the active hub is down, you can use the passive hub to failover or relocate the disaster recovery protected workloads.
Hub recovery is a Technology Preview feature and is subject to Technology Preview support limitations. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information, see Technology Preview Features Support Scope.
3.17.1. Configuring passive hub cluster 复制链接链接已复制到粘贴板!
To perform hub recovery in case the active hub is down or unreachable, follow the procedure in this section to configure the passive hub cluster and then failover or relocate the disaster recovery protected workloads.
Procedure
Ensure that RHACM operator and
MultiClusterHubis installed on the passive hub cluster. See RHACM installation guide for instructions.After the operator is successfully installed, a popover with a message that the Web console update is available appears on the user interface. Click Refresh web console from this popover for the console changes to reflect.
- Before hub recovery, configure backup and restore. See Backup and restore topics of RHACM Business continuity guide.
- Install the multicluster orchestrator (MCO) operator along with Red Hat OpenShift GitOps operator on the passive RHACM hub prior to the restore. For instructions to restore your RHACM hub, see Installing OpenShift Data Foundation Multicluster Orchestrator operator.
-
Ensure that
.spec.cleanupBeforeRestoreis set toNonefor theRestore.cluster.open-cluster-management.ioresource. For details, see Restoring passive resources while checking for backups chapter of RHACM documentation. - If SSL access across clusters was configured manually during setup, then re-configure SSL access across clusters. For instructions, see Configuring SSL access across clusters chapter.
On the passive hub, add the monitoring label for collecting the disaster recovery metrics. For alert details, see Disaster recovery alerts chapter.
$ oc label namespace openshift-operators openshift.io/cluster-monitoring='true'
3.17.2. Switching to passive hub cluster 复制链接链接已复制到粘贴板!
Use this procedure when active hub is down or unreachable.
Procedure
Restore the backups on the passive hub cluster. For information, see Restoring a hub cluster from backup.
重要Recovering a failed hub to its passive instance will only restore applications and their DR protected state to its last scheduled backup. Any application that was DR protected after the last scheduled backup would need to be protected again on the new hub.
- Verify that the Primary and Seconday managed clusters are successfully imported into the RHACM console and they are accessible. If any of the managed clusters are down or unreachable then they will not be successfully imported.
- Wait until DRPolicy validation succeeds.
Verify that the DRPolicy is created successfully. Run this command on the Hub cluster for each of the DRPolicy resources created, where <drpolicy_name> is replaced with a unique name.
$ oc get drpolicy <drpolicy_name> -o jsonpath='{.status.conditions[].reason}{"\n"}'Example output:
Succeeded- Refresh the RHACM console to make the DR monitoring dashboard tab accessible if it was enabled on the Active hub cluster.
- If only the active hub cluster is down, restore the hub by performing hub recovery, and restoring the backups on the passive hub. If the managed clusters are still accessible, no further action is required.
- If the primary managed cluster is down, along with the active hub cluster, you need to fail over the workloads from the primary managed cluster to the secondary managed cluster. For failover instructions, based on your workload type, see Subscription-based applications or ApplicationSet-based applications.
Verify that the failover is successful. When the Primary managed cluster is down, then the PROGRESSION status for the workload would be in
Cleaning Upphase until the down managed cluster is back online and successfully imported into the RHACM console.On the passive hub cluster, run the following command to check the PROGRESSION status.
$ oc get drpc -o wide -AExample output:
NAMESPACE NAME AGE PREFERREDCLUSTER FAILOVERCLUSTER DESIREDSTATE CURRENTSTATE PROGRESSION START TIME DURATION PEER READY [...] busybox cephfs-busybox-placement-1-drpc 103m cluster-1 cluster-2 Failover FailedOver Cleaning Up 2024-04-15T09:12:23Z False busybox cephfs-busybox-placement-1-drpc 102m cluster-1 Deployed Completed 2024-04-15T07:40:09Z 37.200569819s True [...]