Description
You can call this operation to upgrade an OceanBase cluster.
Call description
Prerequisites
You have the permission to upgrade the OceanBase cluster.
For more information about the permissions, see Roles overview and Users Overview.
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/upgrade
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OceanBase cluster to be upgraded. |
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| rpmFileName | String | Yes | oceanbase-2.2.76-20210219154519.el7.x86_64.rpm | The name of the RPM package. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An 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/22/upgrade
body:
{
"rpmFileName": "oceanbase-2.2.75-20210108170301.el7.x86_64.rpm"
}
Sample response
{
"data": {
"cluster": {
"id": 22,
"name": "terran",
"obClusterId": 1
},
"context": "Context(parallelIdx=-1, stringMap={cluster_version=2.2.73-20201211175814, cluster_name=terran, cluster_id=22, target_cluster_status=RUNNING, primary_cluster_id=22}, listMap={binary_upgrade_versions=[2.2.75-20210108170301], cluster_ids=[22], upgrade_versions=[2.2.74, 2.2.75-20210108170301]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 108368,
"name": "Submit upgrade OB cluster dag",
"startTime": "2021-03-02T12:04:48.487+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 130229,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
130230
]
},
{
"description": "Wait dag success",
"downstreams": [
130229
],
"id": 130230,
"name": "Wait dag success",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
130233
]
},
{
"description": "Start node",
"downstreams": [
130232
],
"id": 130231,
"name": "Start node",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Prepare upgrade cluster",
"downstreams": [
130233
],
"id": 130232,
"name": "Prepare upgrade cluster",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
130231
]
},
{
"description": "Submit cluster upgrade task",
"downstreams": [
130230
],
"id": 130233,
"name": "Submit cluster upgrade task",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
130232
]
}
]
},
"duration": 176,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T12:04:48.524+08:00",
"traceId": "b2a365d384444f76"
}