Description
You can call this operation to upgrade an arbitration service.
Call description
Prerequisites
You have the ARBITRATION:UPDATE permission on the arbitration service.
Request path
POST /api/v2/arbitration/services/{id}/upgrade
Request parameters
path:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 4901 | The ID of the arbitration service to be upgraded. |
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| rpmName | String | Yes | oceanbase-4.1.0.0-100000682023020119.el7.x86_64.rpm | The name of the RPM package for the arbitration service of the target version. |
| clientToken | String | No | aBCDefGHIjk | The token for idempotent requests. The token must be 8 to 64 characters in length and globally unique. |
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/4190/upgrade
{
"rpmName":"oceanbase-4.3.4.0-200000022024070119.el7.x86_64.rpm"
}
Sample response
{
"data": {
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 4190,
"name": "Upgrade arbitration service",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2024-12-23T20:52:58.975+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Start arbitration service",
"downstreams": [
4843
],
"id": 4846,
"name": "Start arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 4190,
"timeout": 1800,
"upstreams": [
4845
]
},
{
"description": "Begin upgrade arbitration",
"downstreams": [
4845
],
"id": 4842,
"name": "Begin upgrade arbitration",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": true,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 4190,
"timeout": 60,
"upstreams": [
4844
]
},
{
"description": "Install arbitration rpm",
"downstreams": [
4846
],
"id": 4845,
"name": "Install arbitration rpm",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 4190,
"timeout": 1800,
"upstreams": [
4842
]
},
{
"description": "Update arbitration service status",
"downstreams": [],
"id": 4847,
"name": "Update arbitration service status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"taskId": 4190,
"timeout": 60,
"upstreams": [
4843
]
},
{
"description": "Prepare upgrade arbitration service",
"downstreams": [
4844
],
"id": 4848,
"name": "Prepare upgrade arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "READY",
"taskId": 4190,
"timeout": 60,
"upstreams": []
},
{
"description": "Update arbitration service version",
"downstreams": [
4847
],
"id": 4843,
"name": "Update arbitration service version",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": true,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"taskId": 4190,
"timeout": 120,
"upstreams": [
4846
]
},
{
"description": "Stop arbitration service",
"downstreams": [
4842
],
"id": 4844,
"name": "Stop arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 4190,
"timeout": 1800,
"upstreams": [
4848
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 68,
"server": "6d952bd732",
"status": 200,
"successful": true,
"timestamp": "2024-12-23T20:52:59.002+08:00",
"traceId": "1702357d6555e49d"
}