Relocate disaster recovery protected discovered application

Before you begin

  • Ensure that the application namespace is created in both managed clusters (for example, busybox-discovered).

About this task

This section guides you on how to failover a discovered application which is disaster recovery protected.

Procedure

  1. In the RHACM console, navigate to Disaster Recovery > Protected applications tab.
  2. At the end of the application row, click on the Actions menu and choose to initiate Relocate.
  3. In the Relocate application modal window, review the status of the application and the target cluster.
  4. Click Initiate.
  5. Check the progression status of Relocate until the result is WaitOnUserToCleanup. The DRPC name can be identified by the unique Name configured in prior steps (for example, busybox-rbd).
    oc get drpc {drpc_name} -n openshift-dr-ops -o jsonpath='{.status.progression}{"\n"}'
    WaitOnUserToCleanUp
  6. Remove the busybox application from the Secondary managed cluster before Relocate to the Primary managed cluster is completed
    1. Navigate to the cloned repository for busybox and run the following commands on the Secondary managed cluster where you relocated from. Use the same directory that was used to create the application (for example, odr-regional-rbd).
      cd ~/ocm-ramen-samples/
      git branch
      * main
      
      oc delete -k workloads/deployment/odr-regional-rbd -n busybox-discovered
      persistentvolumeclaim "busybox-pvc" deleted
      deployment.apps "busybox" deleted
  7. After deleting the application, navigate to the Protected applications tab and verify that the busybox resources are both in Healthy status.
  8. Verify that the busybox application is running on the Secondary managed cluster.
    oc get pods,pvc -n busybox-discovered
    NAME                           READY   STATUS    RESTARTS   AGE
    pod/busybox-796fccbb95-qmxjf   1/1     Running   0          2m46s
    
    
    NAME                                STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  VOLUMEATTRIBUTESCLASS   AGE
    persistentvolumeclaim/busybox-pvc   Bound    pvc-b20e4129-902d-47c7-b962-040ad64130c4   1Gi        RWO            ocs-storagecluster-ceph-rbd   <unset>                 2m57s
    
    
    NAME                                                             AGE     VOLUMEREPLICATIONCLASS                  PVCNAME       DESIREDSTATE   CURRENTSTATE
    volumereplication.replication.storage.openshift.io/busybox-pvc   2m45s   rbd-volumereplicationclass-1625360775   busybox-pvc   primary        Primary