Relocating Subscription-based application between managed clusters

Relocate an application to its preferred location when all managed clusters are available.

Before you begin

  • If your setup has active and passive RHACM hub clusters, see Using Advanced Cluster Management Hub recovery.
  • When primary cluster is in a state other than Ready, check the actual status of the cluster as it might take some time to update. Relocate can only be performed when both primary and preferred clusters are up and running.
    1. Navigate to RHACM console > Infrastructure > Clusters > Cluster list tab.
    2. Check the status of both the managed clusters individually before performing a relocate operation.

Procedure

  1. Disable fencing on the Hub cluster.
    1. Edit the DRCluster resource for this cluster, replacing <drcluster_name> with your unique name.
      oc edit drcluster <drcluster_name>
      apiVersion: ramendr.openshift.io/v1alpha1
      kind: DRCluster
      metadata:
      [...]
      spec:
        cidrs:
        [...]
        ## Modify this line
        clusterFence: Unfenced
        [...]
      [...]
      Example output:
      drcluster.ramendr.openshift.io/ocp4perf1 edited
    2. Gracefully restart OpenShift Container Platform nodes that were Fenced.
      A restart is required to resume the I/O operations after unfencing to avoid any further recovery orchestration failures. Restart all nodes of the cluster by following the steps in the Nodes > Working with nodes > Understanding node rebooting > Rebooting a node gracefully Red Hat OpenShift Container Platform product documentation.
      Note: Make sure that all the nodes are initially cordoned and drained before you restart and perform uncordon operations on the nodes.
    3. After all Red Hat OpenShift nodes are rebooted and are in a Ready status, verify that all Pods are in a healthy state.
      Run the following command on the Primary-managed cluster (or the cluster has been Unfenced):
      oc get pods -A | egrep -v 'Running|Completed'
      Example output:
      NAMESPACE                                          NAME                                                              READY   STATUS      RESTARTS       AGE
      The output for this query is zero Pods before proceeding to the next step.
      Note: If there are Pods still in an unhealthy status because of severed storage communication, troubleshoot and resolve before continuing. Because the storage cluster is external to Red Hat OpenShift, it also must be properly recovered after a site outage for Red Hat OpenShift applications to be healthy.

      Alternatively, you can use the Red Hat OpenShift Web Console dashboards and Overview tab to assess the health of applications and the external Fusion Data Foundation storage cluster. The detailed Fusion Data Foundation dashboard is found by going to Storage > Data Foundation.

    4. Verify that the Unfenced cluster is in a healthy state.
      Validate the fencing status in the Hub cluster for the Primary-managed cluster, replacing <drcluster_name> with your unique name.
      oc get drcluster.ramendr.openshift.io <drcluster_name> -o jsonpath='{.status.phase}{"\n"}'
      Example output: Unfenced
  2. On the Hub cluster, navigate to Applications.
  3. Click the Actions menu at the end of application row to view the list of available actions.
  4. Click Relocate application.
  5. When the Relocate application modal is shown, select Policy and Target cluster to which the associated application migrates to.
  6. Click the Select subscription group dropdown to verify the default selection or modify this setting.
    By default, the subscription group that replicates the application resources is selected.
  7. Check the status of the Relocation readiness.
    • If the status is Ready with a green tick, it indicates that the target cluster is ready for failover to start. Proceed to step 8.
    • If the status is Unknown or Not ready, then wait until the status changes to Ready.
  8. Click Initiate.
    The busybox application is now relocating over to the Primary-managed cluster.
  9. Close the modal window and track the status using the Data policy column on the Applications page.
  10. Verify that the activity status shows as Relocated for the application.
    1. Go to Applications > Overview.
    2. In the Data policy column, click the policy link for the application you applied the policy to.
    3. On the Data Policies modal page, click the View more details link.