Description
The Pre-check for failover feature checks the current status of primary and standby clusters to determine whether OceanBase cluster failover can be performed normally.
Call instructions
Interface constraints
None.
Request path
POST /api/v2/ob/clusters/{id}/failoverPreCheck
Request parameters
path:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The cluster ID. |
Return result
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | The pre-check result of failover. For more information, see the following table. |
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server finishes the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code that conforms to the HTTP Status specification. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responds to the request. |
Pre-check result of failover
Parameter |
Type |
Description |
|---|---|---|
| clusterId | Long | The ID of the cluster in OCP. |
| clusterName | String | The name of the cluster. |
| result | Object | The details of the check result. For more information, see the following table. |
Check result details
Parameter |
Type |
Description |
|---|---|---|
| valid | Boolean | Indicates whether the check is passed. |
| messages | List |
The error message list. |
Examples
Request example
POST /api/v2/ob/clusters/1/failoverPreCheck
Return example
{
{
"data": {
"result": {
"messages": [],
"valid": true
}
},
"duration": 147,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2022-09-05T13:39:18.207+08:00",
"traceId": "b2979c141cb04651"
}
