Description
You can call this operation to switch the specified standby cluster to the primary cluster.
Call description
Limitations
None.
Request path
POST /api/v2/ob/clusters/{id:[\\d]+}/failover
Request parameters
None.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task return structure. |
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server completes 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 responds to the request. |
Sample response
{
"data": {
"clusterId": 6,
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 171603,
"name": "Failover OB cluster",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2022-09-05T13:39:18.441+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Wait node",
"downstreams": [
202627
],
"id": 202625,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"timeout": 30,
"upstreams": [
202621
]
},
{
"description": "Remove standby cluster",
"downstreams": [
202624
],
"id": 202622,
"name": "Remove standby cluster",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": true,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
202620
]
},
{
"description": "Sync all cluster info",
"downstreams": [
202622
],
"id": 202620,
"name": "Sync all cluster info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"timeout": 60,
"upstreams": [
202627
]
},
{
"description": "Failover to Primary",
"downstreams": [
202621
],
"id": 202628,
"name": "Failover to Primary",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": true,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
202626
]
},
{
"description": "Mc lock ob clusters",
"downstreams": [
202626
],
"id": 202623,
"name": "Mc lock ob clusters",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 8,
"status": "READY",
"timeout": 60,
"upstreams": []
},
{
"description": "Update OB cluster status",
"downstreams": [
202625
],
"id": 202621,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"timeout": 30,
"upstreams": [
202628
]
},
{
"description": "Failover to Primary Check",
"downstreams": [
202628
],
"id": 202626,
"name": "Failover to Primary Check",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": true,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
202623
]
},
{
"description": "Mc ob failover update mc ob cluster",
"downstreams": [
202620
],
"id": 202627,
"name": "Mc ob failover update mc ob cluster",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"timeout": 60,
"upstreams": [
202625
]
},
{
"description": "Mc unlock ob clusters",
"downstreams": [],
"id": 202624,
"name": "Mc unlock ob clusters",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"timeout": 60,
"upstreams": [
202622
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 148,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2022-09-05T13:39:18.451+08:00",
"traceId": "b0f5f8868349493c"
}