Apply Data policy to sample ApplicationSet-based application

Before you begin

Ensure that both managed clusters referenced in the DRPolicy are reachable. If not, the application will not be DR protected untill both clusters are online.

Procedure

  1. On the Hub cluster, navigate to All Clusters > Applications.
  2. Click the Actions menu at the end of DRPolicy that you want to use to view the list of available actions.
  3. Click Manage data policy > Assign Data Policy.
  4. Select Policy and click Next.
  5. Select an Application resource and then use PVC label selector to select PCV label for the selected resource.
    Note: You can select more than one PVC label for the selected application resources.
  6. After adding all the application resources, click Next.
  7. Review the Policy configuration details and click Assign. The newly assigned Data policy is displayed on the Manage data policy modal list view.
  8. Verify that you can view the assigned policy details on the Applications page.
    1. On the Applications page, navigate to the Data policy column and click the policy link to expand the view.
    2. Verify that you can see the number of policies assigned along with failover and relocate status.
  9. Optional: Verify RADOS block device (RBD) volumereplication and volumereplicationgroup on the primary cluster.
    oc get volumereplications.replication.storage.openshift.io

    Example output:

    NAME             AGE     VOLUMEREPLICATIONCLASS                  PVCNAME          DESIREDSTATE   CURRENTSTATE
    busybox-pvc      2d16h   rbd-volumereplicationclass-1625360775   busybox-pvc      primary        Primary
    oc get volumereplicationgroups.ramendr.openshift.io

    Example output:

    NAME           DESIREDSTATE   CURRENTSTATE
    busybox-drpc   primary        Primary
  10. Optional: Verify CephFS volsync replicationsource has been set up successfully in the primary cluster and VolSync ReplicationDestination has been set up in the failover cluster.
    oc get replicationsource -n busybox-sample

    Example output:

    NAME             SOURCE           LAST SYNC              DURATION          NEXT SYNC
    busybox-pvc      busybox-pvc      2022-12-20T08:46:07Z   1m7.794661104s    2022-12-20T08:50:00Z
    oc get replicationdestination -n busybox-sample

    Example output:

    NAME             LAST SYNC              DURATION          NEXT SYNC
    busybox-pvc      2022-12-20T08:46:32Z   4m39.52261108s