Purpose
This statement is used to maintain the status of OBServer nodes in the system and to control operations such as adding, deleting, starting, and stopping OBServer nodes.
This statement can only be executed in the sys tenant.
Syntax
alter_system_server_stmt:
ALTER SYSTEM server_action SERVER ip_port_list [zone];
server_action:
ADD
| DELETE
| CANCEL DELETE
| START
| STOP
| FORCE STOP
| ISOLATE
ip_port_list:
ip_port [, ip_port ...]
Parameters
| Parameter | Description |
|---|---|
| ip_port | The IP address and port number of the OBServer node. |
| zone | If specified, the system will perform a zone check on the OBServer node. |
| ADD | Adds an OBServer node. The ADD option adds the OBServer node to the service list. Only OBServer nodes in the service list can provide services. |
| DELETE | Deletes an OBServer node. The DELETE operation waits for the OBServer node to be cleared before removing it from the service list. This operation may cause unit migration. |
| CANCEL DELETE | Cancels the deletion of an OBServer node. |
| START | Starts an OBServer node. |
| STOP | Stops an OBServer node. The STOP option checks whether the number of replicas after stopping meets the majority requirement, waits for clog log synchronization to complete, and waits for the leader replica to switch to another node (i.e., leader re-election). |
| FORCE STOP | Forcefully stops an OBServer node. The FORCE STOP option checks whether the number of replicas after stopping meets the majority requirement and waits for the leader replica to switch to another node (i.e., leader re-election).
NoticeForcefully stopping an OBServer node is not a routine O&M operation. Since it does not wait for clog log synchronization to complete, this operation is not safe and is generally not recommended. |
| ISOLATE | Isolates a faulty OBServer node. New read and write requests will not be routed to the isolated faulty node. The ISOLATE option does not wait for the leader replica to switch to another node (i.e., leader re-election). |
Examples
Add an OBServer node xxx.xx.xxx.xx1 to the cluster.
obclient> ALTER SYSTEM ADD SERVER 'xxx.xx.xxx.xx1:xxxx' ZONE 'zone1';
