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 Hub recovery using Red Hat Advanced Cluster Management [Technology preview].
- 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.
- Navigate to tab.
- Check the status of both the managed clusters individually before performing a relocate
operation.
- Verify that applications were cleaned up from the cluster before unfencing it.
Procedure
- Disable fencing on the Hub cluster.
- Edit the DRCluster resource for this cluster, replacing
<drcluster_name> with a 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
- Gracefully reboot 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
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.
- 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
.
- 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
- Verify that the IPs that belong to the OpenShift Container Platform cluster nodes are
NOT in the blocklist.
ceph osd blocklist ls
Ensure that you do not see the IPs added during fencing.
- On the Hub cluster, navigate to Applications.
- Click the Actions menu at the end of application row to view the
list of available actions.
- Click Relocate application.
- When the Relocate application modal is shown, select
Policy and Target cluster to which the associated
application migrates to.
- Click Initiate.
All the system workloads
and their available resources are now transferred to the target cluster.
- Close the modal window and track the status using the Data policy
column on the Applications page.
- Verify that the activity status shows as Relocated for the
application.
- Go to
.
- In the Data policy column, click the
policy link for the application you applied the policy to.
- On the Data Policy popover page, verify that you can see one or
more policy names and the relocation status associated with the policy in use with the
application.