Display and Manage Cluster States Remotely
Follow this procedure to use an off-engine command-line interface to retrieve cluster state information, switch the state of two peer clusters, shut down a cluster, and recover servers or pods that have been excluded from the Cluster Manager Protocol during a failed fencing operation.
Before you begin
- Either install the matrixxsw-engine RPM on the remote server or pod or copy the
${MTX_BIN_DIR}/cluster_mgr_cli.py and cluster_mgr_cli.py scripts from an engine server or pod to a directory on the remote server or
pod. The remote pod must be able to communicate with MATRIXX Engine. (The
cluster_mgr_cli.py script does not require
mtx
user permissions to run.) - Find the Traffic Routing Agent cluster management CLI communications port for the target engine. The Traffic Routing Agent function depends on your implementation. For details on the Traffic Routing Agent functions, see the discussion about MATRIXX core components in MATRIXX Installation and Upgrade.
For more information about the MATRIXX environment variables, see the discussion about installation directories, navigation shortcuts, and environment variables in MATRIXX Installation and Upgrade.
About this task
In the following steps, replace target with the VIP and port that you used for the answer to this create_config.info question: Engine n:Cluster nWhat is the cluster management virtual service address used on this cluster?
Procedure
- Log in to the remote server or pod and navigate to the directory containing the cluster_mgr_cli.py script.
-
Open a terminal and enter any of the following commands, based on the task you want. Replace target with the Traffic Routing Agent virtual IP address (VIP) for the cluster, in the format
ipaddress:cli_port
.The script returns 0 on success.
- To retrieve cluster information:
- To print a cluster's state:
cluster_mgr_cli.py -t target get cluster_state
- To print the schema version of a cluster:
cluster_mgr_cli.py -t target get schema_version
- To print a cluster's state:
- To recover servers or pods excluded from the Cluster Manager Protocol:
- Enter the following command to retrieve the IP address of each block-listed server or pod.
cluster_mgr_cli.py -t target get excluded_blades
- Enter the following command to remove the pods from the block list.
cluster_mgr_cli.py -t target clear excluded_nodes
- Enter the following command to retrieve the IP address of each block-listed server or pod.
- To retrieve cluster information: