Tool Maintenance Commands
Tool Path
$(ha_install_path)/ha/module/hacom/tools
Tool Usage Description
The command and its output are as follows:
/ha/module/hacom/tools # ls -rlt total 1436 -r-x------ 1 root root 10080 Sep 4 01:00 key-tool -r-x------ 1 root root 38832 Sep 4 01:00 ha_config_tool -r-x------ 1 root root 10080 Sep 4 01:00 ha_config_query_tool -r-x------ 1 root root 47024 Sep 4 01:00 ha_conf_check_tool -r-x------ 1 root root 510472 Sep 4 01:00 ha_client_tool -r-x------ 1 root root 10080 Sep 4 01:00 update_workkey -r-x------ 1 root root 829960 Sep 4 01:00 openssl
Only the ha_client_tool among the tools displayed in the preceding command output can be used independently. Other tools must be used together with scripts. If you use them directly without corresponding scripts, internal configurations may be incorrect.
Client Command Tool
The HA provides the function of interaction between the client tool and the HA process. The client tool is ha_client_tool tool (released with the HA version) and is stored in the $(ha_install_path)/ha/module/hacom/tools directory. This tool is used to configure maintenance functions, such as HA active/standby switchover, switchover disabling and enabling, and file synchronization.
The tool's help information is as follows:
/ha/module/hacom/tools # $(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool ERR: analy option lack of among value! Analy Option failed. Build Time : Mar 19 2020 02:42:14 ************************************************************************************************************ usage: ha_client_tool --ip=[IP] --port=[PORT] --[CMD] --[PARAMS] ip and port is set by "./config_ha.sh -r [IP]:[PORT]" before, and can be got by "./config_ha.sh -a" later. ID CMD PARAMS 1. forbidswitch forbid swtich over between active and standby host. EXEC in active, and peer must be standby. --name: who decided to forbid? --time: set expiration date for forbid's effect, unit is minute. 2. cancelforbidswitch allow swtich over between active and standby host. EXEC in active, and peer must be standby. --name: who decided to resume? 3. switchover trigger switch over if standby host is equal to active. EXEC in active, and peer must be standby. --name: who decided to swtich over? 4. syncfile sync the specified file which is included in the sync list. EXEC in active, and peer must be standby. --name: which files will sync from active to standby. 5. syncallfile sync all the file which is included in the sync list. EXEC in active, and peer must be standby. 6. getsyncfilestatus show the file status which is synced before. EXEC in active, but not implement yet. 7. getsyncfileprocess show the file process which is synced before. EXEC in active, only can query 1000 records last. --name: which file's process you interested? 8. getsyncallfileprocess show allsync process which exec last time. EXEC in active. 9. gethastatus show the HA status. EXEC in any node. 10. gethastatusV2 show the HA status V2. EXEC in any node. 11. clearrmfault clear the resource's exception status in standby host. EXEC in any node. --name: which resource's exception you want to clear? 12. setloglevel set the HA running log. EXEC in any node. --tidval: which tid log you want to change? 0 is all. --loglevel: DEBUG/INFO/WARN/ERROR/NOTICE can be set. 13. restartstandbyha restart the standy ha process. EXEC in active, and peer must be standby. --name: who decided to restart? 14. disabledsync disabled syncfile function when upgrading. EXEC in active, and peer must be standby. --name: who decided to disable? 15. enabledsync enabled syncfile function after upgraded. EXEC in active, and peer must be standby. --name: who decided to enable? SSL certificate. rootca set path of root CA file, and enable ssl connection. serverca set path of server CA file, and enable with two-way authentication, use with serverkey [optional] serverkey set path of server key file, and enable with two-way authentication, use with serverca. [optional] keypass password of key file. keypassdecryptlib password decrypt library path. Return: 0. HA_COM_RPC_SUCC Congratulations! exec successfully. 1. HA_COM_RPC_FAILED Sorry, exec failed. 2. HA_COM_RPC_CONNECT_ERR Connect failed, maybe server is down or thrift failed. 3. HA_COM_RPC_PARAM_ERR Input para is invaild. 4. HA_COM_RPC_MEM_LACK_ERR System memory is not enough. 5. HA_COM_RPC_INNER_ERR HA inner error, contact with HA's staff please. 6. HA_COM_RPC_SYNCFILE_WAIT File is syncing now. 7. HA_COM_RPC_HAROLE_REFUSE HA role incorrect. 8. HA_COM_RPC_LINK_UNUSABLE There is no usable link. 9. HA_COM_RPC_SENDMSG_ERR Send msg failed between active and standby. 10. HA_COM_RPC_TIMEOUT Failed for time out. 11. HA_COM_RPC_HAMODE_REFUSE HA mode incorrect. 12. HA_COM_RPC_SWAP_FORDID HA has been forbidden switchover before. 13. HA_COM_RPC_NONSTEADY_RES HA is in nonsteady status. 14. HA_COM_RPC_LOCAL_BETTER Local resources situation is better than peer's. 15. HA_COM_RPC_SYNCCMD_FAIL Timeout when set forbid between active and standby. 16. HA_COM_RPC_NO_RESOURCE There is not single active resource exist. 17. HA_COM_RPC_STATE_REFUSE Local is not in HA(active-standby) state. Example: Control Local HA: ./ha_client_tool --forbidswitch --name=product --time=60 ./ha_client_tool --cancelforbidswitch --name=product ./ha_client_tool --switchover --name=product ./ha_client_tool --syncfile --name="/opt/omm/config/" ./ha_client_tool --syncallfile ./ha_client_tool --getsyncfilestatus ./ha_client_tool --getsyncfileprocess --name="/opt/omm/config/" ./ha_client_tool --getsyncallfileprocess ./ha_client_tool --gethastatus ./ha_client_tool --gethastatusV2 ./ha_client_tool --clearrmfault --name=floatip ./ha_client_tool --setloglevel --tidval=0 --loglevel=INFO ./ha_client_tool --restartstandbyha --name=activehaname ./ha_client_tool --disabledsync --name=product ./ha_client_tool --enabledsync --name=product SSL Connection: ./ha_client_tool [action] --rootca root_ca.crt --serverca server.crt --serverkey server.pem --keypass=pass --keypassdecryptlib=decrypt.so Control Remote HA: ./ha_client_tool --ip localhost --port 61806 [action]
Error codes
Category |
Error Code |
Description |
HA_COM_RPC_ERR_ENUM |
0 |
Command executed successfully. |
1 |
Failed to execute the command. |
|
2 |
Failed to set up the connection or start the thrift. |
|
3 |
The parameters are incorrect. |
|
4 |
The memory is insufficient. |
|
5 |
An internal HA error occurred. |
|
6 |
The file is waiting to be synchronized. |
|
7 |
The HA role is rejected. |
|
8 |
No links are available. |
|
9 |
Failed to send the packet. |
|
10 |
Timed out. |
|
11 |
The HA mode is rejected. |
|
12 |
The switchover is disabled. |
|
13 |
The switchover is not allowed because some resources are unstable. |
|
14 |
The switchover is not allowed because resources on the active node are better than those on the standby node. |
|
15 |
Failed to synchronize the command for disabling or enabling the switchover to the standby node. |
|
16 |
The primary resource does not exist. |
|
17 |
The HA arbitration status does not indicate that the active end is running properly and the standby end is running properly. |
- Disabling Active/Standby Switchovers
- Enabling Active/Standby Switchovers
- Performing Active/Standby Switchovers
- Synchronizing a File in Real Time
- Synchronizing All Files
- Enabling File Synchronization
- Disabling File Synchronization
- Querying the Synchronization Result of a File
- Querying the Synchronization Results of All Files
- Querying HA Status
- Dynamically Adjusting Log Levels
- Restarting the HA on the Standby Node
Disabling Active/Standby Switchovers
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --forbidswitch --name=product --time=60
Application Scenario
To prevent an upgrade failure caused by an active/standby switchover, disable the active/standby switchover function temporarily during the upgrade process.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby. Therefore, ensure that the communication between the active and standby nodes is normal.
- If the setting is successful, invoking the command for disabling the active/standby switchover again will fail during the period specified by time.
- After the command is executed successfully, the system creates the $(ha_install_path)/ha/local/haarb/conf/forbid.txt file, which records the start time and duration of switchover prohibition. After the file is created, switchover prohibition remains valid even after the HA is restarted. Switchover prohibition becomes invalid only when its duration expires or the command for enabling switchover is manually invoked. For details about how to enable the switchover, see Enabling Active/Standby Switchovers.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
name |
String |
Indicates the name used to record the source of an operation command in logs. In --name=product in the command line, the product is used as the name to mark the operation for backtracking. |
time |
int |
Indicates the switchover prohibition duration, in minutes. When the duration expires, the system automatically enables the active/standby switchover. |
Command Output Description
Command Output |
Description |
---|---|
execute command forbidswitch successfully |
Command executed successfully. |
ERR: execute command --forbidswitch need name and time |
Failed to execute the command. xx indicates the error code. For details, see the description of HA_COM_RPC_ERR_ENUM. |
ERR: execute command forbidswitch failed[xx] |
Enabling Active/Standby Switchovers
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --cancelforbidswitch --name=product
Application Scenario
If the system is running properly (for example, the upgrade is complete), you can run this command to enable the active/standby switchover function. After command execution, the $(ha_install_path)/ha/local/haarb/conf/forbid.txt file is automatically deleted.
Restrictions
This command can be executed only when the local end is active and the peer end is standby. Therefore, ensure that the communication between the active and standby nodes is normal.
Parameter Description
Parameter |
Type |
Description |
Remarks |
---|---|---|---|
name |
String |
Indicates the name used to record the source of an operation command in logs. In --name=product in the command line, the product is used as the name to mark the operation for backtracking. |
This parameter records the source of an operation command, which facilitates backtracking. |
Command Output Description
Command Output |
Description |
---|---|
execute command cancelforbidswitch successfully |
Command executed successfully. |
ERR: execute command --cancelforbieswitch only need name! |
Failed to execute the command. xxx is the error code. For details, see the description of HA_COM_RPC_ERR_ENUM. |
ERR: execute command cancelforbidswitch failed[xxx] |
Performing Active/Standby Switchovers
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --switchover --name=product
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --switchover --name=forceswap
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --switchover --name=haadmin
Application Scenario
This command allows you to perform active/standby switchovers for the HA. After you run this command, the system determines whether to perform an active/standby switchover based on the active/standby arbitration result. To forcibly perform an active/standby switchover, set the process name to forceswap.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby.
- If the switchover function is disabled, this command will fail to be executed. In this case, you can directly enable switchovers or change the value of --name to haadmin (not restricted by switchover prohibition).
- The HA switchover is suppressed. That is, within the specified time (the value of swapinterval configured in the haarb.xml file, 15 minutes by default), the HA allows a maximum of three switchovers.
- If the resource status of the active node is better than that of the standby node, the switchover is not allowed. If you want to perform a forced switchover, change the value of --name to forceswap. However, if you do not disable switchovers after the forced switchover, there is a high probability that the HA performs a switchover again after arbitration based on the resource status of the active and standby nodes.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
name |
String |
Indicates the name used to perform the active/standby switchover.
NOTICE:
Switchovers using forceswap and haadmin can ignore the switchover prohibition, but the system determines whether a switchover can be performed successfully. If the switchover fails, an error code is printed. |
Command Output Description
Command Output |
Description |
---|---|
execute command switchover successfully. |
The switchover command is executed successfully. |
ERR: execute command --switchover only need name! or ERR: execute command switchover failed[xxx] |
Failed to perform the switchover. xxx is the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Synchronizing a File in Real Time
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --syncfile --name="/opt/omm/config/"
Application Scenario
This command synchronizes the file name or path specified by parameter name from the active HA to the standby HA. The system also monitors and automatically synchronizes file changes in real time.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby.
- The file to be synchronized must be in the file synchronization whitelist configured in the system.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
name |
String |
Indicates the name or path of the file to be synchronized, which must be the same as that in the configuration file. No space is allowed before or after the file path. The maximum length is 1024 characters. |
Command Output Description
Command Output |
Description |
---|---|
execute command syncfile successfully. |
Command executed successfully. |
ERR: execute command --syncfile only need name! or ERR: execute command syncfile failed[xxx] |
Failed to execute the command. xxx is the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Synchronizing All Files
This command synchronizes all applicable files to the peer end.
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --syncallfile
Application Scenario
This command can synchronize all applicable files from the active HA to the standby HA. The configuration file for file synchronization is stored in the $(ha_install_path)/ha/module/hasync/plugin/conf directory.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby.
- The files to be synchronized must be in the file synchronization whitelist configured in the system.
Command Output Description
Command Output |
Description |
---|---|
execute command syncallfile successfully. |
Command executed successfully. |
ERR: execute command --syncfile do not need any para! |
Failed to execute the command. xxx is the error code. For details, see the description of HA_COM_RPC_ERR_ENUM. |
ERR: execute command syncallfile failed[[xxx] |
Enabling File Synchronization
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --enabledsync --name=product
Application Scenario
After the system is running properly (for example, after the upgrade is complete), you can run this command to manually enable the file synchronization function.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby. Therefore, ensure that the communication between the active and standby nodes is normal.
- After the command is executed successfully, the $(ha_install_path)/ha/local/hasync/conf/forbidden file synchronization prohibition identifier is deleted.
Parameter Description
Parameter |
Type |
Description |
Remarks |
---|---|---|---|
name |
String |
Indicates the name of the process that enables file synchronization. |
It records the source of an operation command, which facilitates backtracking. |
Command Output Description
Command Output |
Description |
---|---|
execute command enabledsync successfully. |
Command executed successfully. |
ERR: execute command --enabledsync only need name! |
Failed to execute the command. xxx is the error code. For details, see the description of HA_COM_RPC_ERR_ENUM. |
ERR: execute command enabledsync failed[xxx] |
Disabling File Synchronization
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --disabledsync --name=product
Application Scenario
This command is used in upgrade scenarios. To prevent file synchronization failures during the upgrade, you need to disable file synchronization temporarily.
Restrictions
- This command can be executed only when the local end is active and the peer end is standby. Therefore, ensure that the communication between the active and standby nodes is normal.
- This command creates the $(ha_install_path)/ha/local/hasync/conf/forbidden file synchronization prohibition identifier. After the identifier is created, file synchronization remains disabled even after the HA is restarted. If you want to use file synchronization, manually enable it.
Parameter Description
Parameter |
Type |
Description |
Remarks |
---|---|---|---|
name |
String |
Indicates the name of the process that disables file synchronization. |
It records the source of an operation command, which facilitates backtracking. |
Command Output Description
Command Output |
Description |
---|---|
execute command disabledsync successfully. |
Command executed successfully. |
ERR: execute command --disabledsync only need name! |
Failed to execute the command. xxx is the error code. For details, see the description of HA_COM_RPC_ERR_ENUM. |
ERR: execute command disabledsync failed[xxx] |
Querying the Synchronization Result of a File
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --getsyncfileprocess --name="/opt/omm/config/"
Application Scenario
After running the preceding synchronization command to synchronize file A, you can run this command to query the synchronization result.
Restrictions
- The command can be run only on the active node.
- The synchronization command can synchronize the task of deleting path A. If the progress of querying path A is complete, the task of deleting path A also ends.
- If the heartbeat between the active and standby nodes is interrupted, all tasks waiting for synchronization fail one by one.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
name |
String |
Indicates the name of the file or path to be queried. |
Command Output Description
Command Output |
Description |
---|---|
execute command getsyncfileprocess successfully |
Command executed successfully. |
ERR: execute command getsyncfileprocess failed or ERR: execute command getsyncfileprocess unconnect or ERR: execute command getsyncfileprocess invalid or ERR: execute command getsyncfileprocess inner-err or INFO: execute command getsyncfileprocess waiting or INFO: execute command getsyncfileprocess unknown ret=xxx |
Failed to execute the command. xxx is the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Querying the Synchronization Results of All Files
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --getsyncallfileprocess
Application Scenario
After running the preceding synchronization command to synchronize all files, you can run this command to query the synchronization results.
Restrictions
- The command can be run only on the active node.
- If the heartbeat between the active and standby nodes is interrupted, all tasks waiting for synchronization fail one by one.
Return Value
Refer to the command output description.
Command Output Description
Command Output |
Description |
---|---|
execute command getsyncallfileprocess successfully. |
Command executed successfully. |
ERR: execute command --getsyncallfileprocess not need any para! or ERR: execute command getsyncallfileprocess failed[xxx] |
Failed to execute the command. xxx indicates the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Querying HA Status
Method 1
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --gethastatus
After you run the command, the following information is displayed:
Ha mode double NodeName HostName HaVersion StartTime HA_active HA allResOK HARunPhase ha1 linux-ma-gmsp3 V100R001C01 2014-11-13 14:35:44 active normal Actived ha2 linux-m-vrmsp1 V100R001C01 2014-11-06 21:26:01 standby normal Deactived NodeName ResName ResStatus ResHAStatus ResType ha1 res_a Normal Normal Single_active ha1 res_b Normal Normal Single_active ha1 res_c Normal Normal Single_active
Application Scenario
This command is used to query the active/standby HA status.
Field Description
Name |
Description |
Value |
---|---|---|
Ha mode |
Indicates the HA installation mode. |
|
NodeName |
Indicates the HA node name. |
- |
HostName |
Indicates the host name. |
- |
HaVersion |
Indicates the HA version. |
- |
StartTime |
Indicates the HA startup time. |
- |
HA_active |
Indicates the HA role. |
|
HA allResOK |
Checks whether all resources are normal. |
|
HARunPhase |
Indicates the node running phase. |
There are 11 phases, which are described as follows:
|
ResName |
Indicates the resource name. |
- |
ResStatus |
Indicates the resource running status, that is, the return value of the resource script. |
|
ResHAStatus |
Indicates the resource HA status, which is determined by the HA based on the resource running status, HA role, and number of resource configuration exceptions. |
|
ResType |
Indicates the resource type. |
|
Command Output Description
Command Output |
Description |
---|---|
For details about the HA status, see the example in this topic. |
Command executed successfully. |
NULL ERR: execute command --gethastatus do not need any para! or ERR: execute command gethastatus failed[xxx] |
Failed to execute the command. xxx indicates the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Method 2
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --gethastatusV2
After you run the command, the following information is displayed:
NODE ROLE PHASE RESS VER START ha1(linux-ma-gmsp3) active Actived normal V100R001C01 2014-11-13 14:35:44 ha2(linux-m-vrmsp1) standby Deactived normal V100R001C01 2014-11-06 21:26:01 -------------------------------------------------------------------------------------------------------- ID RES STAT RET TYPE ha1(linux-ma-gmsp3): 1 res_a Normal Normal Single_active 2 res_b Normal Normal Single_active 3 res_c Normal Normal Single_active
Application Scenario
This command is used to query the active/standby HA status. Its display format is different from that of the gethastatus command.
Field Description
Name |
Description |
Value |
---|---|---|
NODE |
Indicates the HA node name. |
- |
ROLE |
Indicates the HA role. |
|
PHASE |
Indicates the node running phase. |
There are 11 phases, which are described as follows:
|
RESS |
Checks whether all resources are normal. |
|
VER |
Indicates the HA version. |
- |
START |
Indicates the HA startup time. |
- |
ID |
Indicates the resource ID. |
- |
RES |
Indicates the resource name. |
- |
STAT |
Indicates the resource running status, that is, the return value of the resource script. |
|
RET |
Indicates the resource HA status, which is determined by the HA based on the resource running status, HA role, and number of resource configuration exceptions. |
|
TYPE |
Indicates the resource type: |
|
Return Value
Command Output |
Description |
---|---|
For details about the HA status, see the example in this topic. |
Command executed successfully. |
NULL ERR: execute command --gethastatusV2 do not need any para! or ERR: execute command gethastatusV2 failed[xxx] |
Failed to execute the command. xxx indicates the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Dynamically Adjusting Log Levels
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --setloglevel --tidval=0 --loglevel=INFO
Application Scenario
If an execution exception occurs during device deployment, you can dynamically adjust the log level to view detailed log information, facilitating fault locating.
Restrictions
- This command can be executed on both the active and standby nodes.
- This command only sets the log levels of the local end.
- You do not need to restart the HA for the setting to take effect.
- This setting is not fixed. In other words, the log level returns to the previously one if the HA restarts next time.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
tidval |
int |
Indicates the configured thread ID. If the value of tidval is 0, the log levels of all threads that the HA contains are adjusted. |
loglevel |
String |
Indicates the log level. Valid log levels are DEBUG, INFO, WARN, ERROR, and NOTICE from lower to higher. |
Command Output Description
Command Output |
Description |
---|---|
execute command setloglevel successfully. |
Command executed successfully. |
ERR: execute command --setloglevel need vaild tidval and level! or ERR: execute command setloglevel invalid tidval[YYY] or ERR: execute command setloglevel failed[xxx] |
Failed to execute the command. YYY indicates the thread ID. xxx indicates the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
Restarting the HA on the Standby Node
Command Example
$(ha_install_path)/ha/module/hacom/lib/ld-linux-aarch64.so.1 --library-path $(ha_install_path)/ha/module/hacom/lib $(ha_install_path)/ha/module/hacom/tools/ha_client_tool --restartstandbyha --name=activehaname
Application Scenario
After the configuration file containing key HA information is modified on the active node and synchronized to the peer end, you need to restart the HA on the standby node to reload the modified configuration file. In this case, you can run this command on the active node.
Restrictions
This command can be executed only when the local end is active and the peer end is standby.
Parameter Description
Parameter |
Type |
Description |
Remarks |
---|---|---|---|
name |
String |
Indicates the ID of the process that restarts the HA on the standby node. |
It records the source of an operation command, which facilitates backtracking. |
Command Output Description
Command Output |
Description |
---|---|
execute command restartstandbyha successfully |
Command executed successfully. |
NULL ERR: execute command restartstandbyha failed[xxx] or ERR: execute command --restartstandbyha only need name! |
Failed to execute the command. xxx indicates the error code. For details, see the HA_COM_RPC_ERR_ENUM description. |
- Disabling Active/Standby Switchovers
- Enabling Active/Standby Switchovers
- Performing Active/Standby Switchovers
- Synchronizing a File in Real Time
- Synchronizing All Files
- Enabling File Synchronization
- Disabling File Synchronization
- Querying the Synchronization Result of a File
- Querying the Synchronization Results of All Files
- Querying HA Status
- Dynamically Adjusting Log Levels
- Restarting the HA on the Standby Node