Description
You can call this operation to add an OBServer node for the specified OceanBase cluster.
Call description
Prerequisites
You have the permissions to manage the specified OceanBase cluster.
For more information about the permissions, see Overview.
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
POST /api/v2/ob/clusters/{id}/servers
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the target OceanBase cluster. |
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| zoneName | String | Yes | foo | The name of the zone. |
| servers | Array | Yes | [1,2] | The list of host IDs. |
| packageOperatingSystem | String | No | xxx | The operating system of the software package. If you do not specify this parameter, cluster settings are used by default. |
| startupParameters | Object | No | - | The startup parameters of the OBServer node. These parameters overwrite startup parameters of the cluster. |
| ├─name | String | No | - | The name of the parameter. |
| ├─value | String | No | - | The value of the parameter. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task return structure. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /api/v2/ob/clusters/1/servers
Body:
{
"zoneName": "zone2",
"servers": [
1
]
}
Sample response
{
"data": {
"cluster": {
"id": 21,
"name": "ob_upgrade",
"obClusterId": 22
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, service_type=OB_CLUSTER, rpm_name=oceanbase-2.2.75-20210108170301.el7.x86_64.rpm, service_name=ob_upgrade:22, service_version=2.2.75, host.1.zone=zone1, ob_cluster_id=22}, listMap={root_server_ips=[xxx.xxx.xxx.xxx], server_ids=[7], host_ids=[1], zone_names=[zone1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 107720,
"name": "Add OB server",
"startTime": "2021-03-02T11:06:34.345+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Wait node",
"downstreams": [
129369
],
"id": 129356,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129365
]
},
{
"description": "Start observer process with param",
"downstreams": [
129370
],
"id": 129357,
"name": "Start observer process with param",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129367
]
},
{
"description": "Wait node",
"downstreams": [
129364
],
"id": 129358,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129374
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 129359,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129368
]
},
{
"description": "Restart observer process",
"downstreams": [
129363
],
"id": 129360,
"name": "Restart observer process",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129361
]
},
{
"description": "Wait observer active",
"downstreams": [
129360
],
"id": 129361,
"name": "Wait observer active",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129373
]
},
{
"description": "Update zone status",
"downstreams": [
129368
],
"id": 129362,
"name": "Update zone status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129366
]
},
{
"description": "Wait observer active",
"downstreams": [
129374
],
"id": 129363,
"name": "Wait observer active",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129360
]
},
{
"description": "Update observer status",
"downstreams": [
129366
],
"id": 129364,
"name": "Update observer status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129358
]
},
{
"description": "Pre check for install OB",
"downstreams": [
129356
],
"id": 129365,
"name": "Pre check for install OB",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129376
]
},
{
"description": "Wait node",
"downstreams": [
129362
],
"id": 129366,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129364
]
},
{
"description": "Wait node",
"downstreams": [
129357
],
"id": 129367,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129371
]
},
{
"description": "Sync cluster info",
"downstreams": [
129359
],
"id": 129368,
"name": "Sync cluster info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129362
]
},
{
"description": "Install rpm",
"downstreams": [
129375
],
"id": 129369,
"name": "Install rpm",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129356
]
},
{
"description": "Wait node",
"downstreams": [
129373
],
"id": 129370,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129357
]
},
{
"description": "Make dir for ob",
"downstreams": [
129367
],
"id": 129371,
"name": "Make dir for ob",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129375
]
},
{
"description": "Prepare add observer",
"downstreams": [
129376
],
"id": 129372,
"name": "Prepare add observer",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Add observer",
"downstreams": [
129361
],
"id": 129373,
"name": "Add observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129370
]
},
{
"description": "Start ocp agent service",
"downstreams": [
129358
],
"id": 129374,
"name": "Start ocp agent service",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129363
]
},
{
"description": "Wait node",
"downstreams": [
129371
],
"id": 129375,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129369
]
},
{
"description": "Reserve host",
"downstreams": [
129365
],
"id": 129376,
"name": "Reserve host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129372
]
}
]
},
"duration": 209,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T11:06:34.429+08:00",
"traceId": "24d6311f6909408f"
}