Description
You can call this operation to create an arbitration service by specifying a host and the service version.
Call description
Prerequisites
You have the ARBITRATION:CREATE permission.
Request path
POST /api/v2/arbitration/services
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| hostId | Long | Yes | 1002 | The ID of the host where the arbitration service will be created. |
| rpmName | String | Yes | oceanbase-4.1.0.0-100000682023020119.el7.x86_64.rpm | The name of the RPM package for the arbitration service. |
| installPath | String | Yes | /home/admin/oceanbase |
The installation directory of the arbitration service. |
| runPath | String | No | /home/admin/oceanbase |
The operation directory of the arbitration service. |
| runUser | String | Yes | admin | The user who runs the arbitration service. |
| svrPort | Integer | Yes | 2886 | The port of the arbitration service. |
| description | String | No | arbitration_service_1 | The description of the arbitration service. |
| clogSymbolicLinkPath | String | No | /data/log1/clog |
The directory connected by using a soft link for storing the clogs of the arbitration members of the tenants that are associated with the arbitration service. |
| startupParameters | Object | No | - | For information, see the Startup parameters of an arbitration service section in this topic. |
| clientToken | String | No | aBCDefGHIjk | The token for idempotent requests. The token must be 8 to 64 characters in length and globally unique. |
Startup parameters of an arbitration service
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the parameter. |
| value | String | 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/arbitration/services
{
"hostId": 1002,
"rpmName": "oceanbase-4.1.0.0-100000682023020119.el7.x86_64.rpm",
"installPath": "/home/admin/oceanbase",
"svrPort": 2882,
"runUser": "admin",
"startupParameters":[
{
"name": "devname",
"value": "bond0"
}
],
"description":"arbitration_service_1"
}
Sample response
{
"data": {
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"hostId": 1,
"id": 4232,
"name": "Create arbitration service",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2024-12-23T22:53:31.278+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Install arbitration rpm",
"downstreams": [
4906
],
"id": 4904,
"name": "Install arbitration rpm",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"taskId": 4232,
"timeout": 1800,
"upstreams": [
4905
]
},
{
"description": "Make dir for arbitration",
"downstreams": [
4901
],
"id": 4906,
"name": "Make dir for arbitration",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 4232,
"timeout": 600,
"upstreams": [
4904
]
},
{
"description": "Update arbitration service status",
"downstreams": [],
"id": 4902,
"name": "Update arbitration service status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 4232,
"timeout": 60,
"upstreams": [
4901
]
},
{
"description": "Start arbitration service",
"downstreams": [
4902
],
"id": 4901,
"name": "Start arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 4232,
"timeout": 1800,
"upstreams": [
4906
]
},
{
"description": "Reserve arbitration host",
"downstreams": [
4904
],
"id": 4905,
"name": "Reserve arbitration host",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 4232,
"timeout": 1800,
"upstreams": [
4903
]
},
{
"description": "Prepare create arbitration service",
"downstreams": [
4905
],
"id": 4903,
"name": "Prepare create arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "READY",
"taskId": 4232,
"timeout": 60,
"upstreams": []
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 71,
"server": "6d952bd732",
"status": 200,
"successful": true,
"timestamp": "2024-12-23T22:53:31.294+08:00",
"traceId": "5521b99cf94875f7"
}