Use this application-based failover method when a managed cluster becomes unavailable,
due to any reason.
Procedure
- Enable fencing on the Hub cluster.
These steps are done on the DRCluster resource for the Primary-managed cluster if failover is to
Secondary-managed cluster.
- Open CLI terminal and edit the DRCluster resource, where
<drcluster_name> is your unique name.
CAUTION:
Once
the managed cluster is fenced, all communication from applications to the Fusion Data Foundation external storage cluster fails and some Pods
will be in an unhealthy state (for example, CreateContainerError,
CrashLoopBackOff) on the cluster that is now
fenced.
oc edit drcluster <drcluster_name>
apiVersion: ramendr.openshift.io/v1alpha1
kind: DRCluster
metadata:
[...]
spec:
## Add this line
clusterFence: Fenced
cidrs:
[...]
[...]
Example output:
drcluster.ramendr.openshift.io/ocp4perf1 edited
- Verify the fencing status on the Hub cluster for the Primary-managed cluster,
replacing <drcluster_name> is your unique
identifier.
oc get drcluster.ramendr.openshift.io <drcluster_name> -o jsonpath='{.status.phase}{"\n"}'
Example output:
Fenced
- 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 Failover application.
- When the Failover application modal is shown, verify the
details that are presented are correct and check the status of the Failover
readiness. If the status is Ready with a green tick, it indicates
that the target cluster is ready for failover to start.
- Click Initiate.
The busybox application
is now failing over to the Secondary-managed 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 FailedOver 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 Policies modal page, verify that you can see one or
more policy names and the relocation status that is associated with the policy in use with the
application.