How do I identify the NSP cluster DR roles?

Purpose

Perform this procedure to identify which NSP clusters in a DR deployment have the primary and standby roles.

Note: You require root user privileges on the NSP cluster host in each data center.

Note: If root access for remote operations is disabled in the NSP configuration, remote operations such as SSH and SCP as the root user are not permitted within an NSP cluster. Steps that describe such an operation as the root user must be performed as the designated non-root user with sudoer privileges.

For simplicity, such steps describe only root-user access.

Note: A leading # character in a command line represents the root user prompt, and is not to be included in a typed command.

Steps
 

Log in as the root user on the NSP cluster host.


Enter the following:

kubectl get pods -A | grep 'asm\|role' ↵

The following pods are listed:

  • nsp-role-manager-pod_ID

  • nspos-asm-app-pod_ID


Verify that each pod is in the Running state.


Record each pod_ID value for use in subsequent procedures.


To display the current cluster role, enter the following:

kubectl exec -n $(kubectl get pods -A | awk '/nsp-role-manager/ {print $1;exit}') -it $(kubectl get pods -A | awk '/nsp-role-manager/ {print $2;exit}') -c role-manager -- /opt/nsp/os/rolemgr/bin/rmgrctl status ↵

If the cluster has the primary role, the following is displayed:

Site:   cluster_name

Status: active

Since:  timestamp

If the cluster has the standby role, the following is displayed:

Site:   cluster_name

Status: standby

Since:  timestamp


To display both cluster roles, enter the following:

Note: The local cluster status is listed first.

kubectl exec -n $(kubectl get pods -A | awk '/nsp-role-manager/ {print $1;exit}') -it $(kubectl get pods -A | awk '/nsp-role-manager/ {print $2;exit}') -c role-manager -- /opt/nsp/os/rolemgr/bin/rmgrctl statusAll ↵

Status information like the following is displayed; the output example indicates that the local cluster, which is listed first, is the primary cluster.

Site:   cluster_name

Status: active

Since:  timestamp

Site:   cluster_name

Status: standby

Since:  timestamp

End of steps