Use this application-based failover method when a managed cluster becomes unavailable,
due to any reason.
Procedure
- Enable fencing on the Hub 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
- Verify that the IPs that belong to the OpenShift Container Platform cluster nodes are
now in the blocklist.
ceph osd blocklist ls
Example output
cidr:10.1.161.1:0/32 2028-10-30T22:30:03.585634+0000
cidr:10.1.161.14:0/32 2028-10-30T22:30:02.483561+0000
cidr:10.1.161.51:0/32 2028-10-30T22:30:01.272267+0000
cidr:10.1.161.63:0/32 2028-10-30T22:30:05.099655+0000
cidr:10.1.161.129:0/32 2028-10-30T22:29:58.335390+0000
cidr:10.1.161.130:0/32 2028-10-30T22:29:59.861518+0000
- 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.
- After the Failover application popup is shown, select
Policy and Target cluster to which the associated
application will failover in a disaster.
- Click the Select subscription group dropdown to verify the default
selection or modify this setting.
By default, the subscription group that replicates for
the application resources is selected.
- 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. Proceed to step 8.
- If the status is Unknown or Not ready, then wait until the
status changes to Ready.
- 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 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 Policy popover page, click the View more
details link.