Description
You can call this operation to stop a zone in an OceanBase cluster.
Call description
Prerequisites
You have the permissions to manage the OceanBase cluster.
For more information about the permissions, see Users and Permissions Overview.
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/zones/{zoneName}/stop
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the OceanBase cluster in which a zone needs to be stopped. |
| zoneName | String | Yes | 1 | The name of the zone to be stopped. |
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/1/zones/zone2/stop
Sample response
{
"data": {
"clusterId": 12000001,
"context": {
"listMap": {
"server_ids": [
"13000001"
]
},
"parallel": false,
"parallelIdx": -1,
"stringMap": {
"cluster_name": "protoss",
"cluster_id": "12000001",
"ocpagent_service_name": "agent",
"prohibit_rollback": "false",
"former_cluster_status": "RUNNING",
"zone_name": "zone2",
"target_cluster_status": "RUNNING"
}
},
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 89026504,
"name": "Stop OB zone",
"operation": "EXECUTE",
"startTime": "2021-09-05T22:22:20.963+08:00",
"status": "RUNNING",
"subtasks": [
{
"className": "com.alipay.ocp.service.task.business.cluster.SyncClusterInfoTask",
"description": "Sync cluster info",
"downstreams": [
89029854
],
"id": 89029852,
"name": "Sync cluster info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029851
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.StopObZoneTask",
"description": "Stop zone",
"downstreams": [
89029860
],
"id": 89029856,
"name": "Stop zone",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
89029855
]
},
{
"className": "com.alipay.ocp.service.task.business.server.PrepareStopObServerTask",
"description": "Prepare stop observer",
"downstreams": [
89029858
],
"id": 89029860,
"name": "Prepare stop observer",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"timeout": 300,
"upstreams": [
89029856
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.PrepareStopObZoneTask",
"description": "Prepare stop OB zone",
"downstreams": [
89029856
],
"id": 89029855,
"name": "Prepare stop OB zone",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 9,
"status": "READY",
"timeout": 1800,
"upstreams": [
]
},
{
"className": "com.alipay.ocp.service.task.business.WaitNode",
"description": "Wait node",
"downstreams": [
89029853
],
"id": 89029859,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029857
]
},
{
"className": "com.alipay.ocp.service.task.business.server.UpdateObServerStatusTask",
"description": "Update observer status",
"downstreams": [
89029851
],
"id": 89029853,
"name": "Update observer status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"timeout": 300,
"upstreams": [
89029859
]
},
{
"className": "com.alipay.ocp.service.task.business.WaitNode",
"description": "Wait node",
"downstreams": [
89029857
],
"id": 89029858,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029860
]
},
{
"className": "com.alipay.ocp.service.task.business.server.StopObServerProcessTask",
"description": "Stop observer process",
"downstreams": [
89029859
],
"id": 89029857,
"name": "Stop observer process",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"timeout": 1200,
"upstreams": [
89029858
]
},
{
"className": "com.alipay.ocp.service.task.business.cluster.UpdateObClusterStatusTask",
"description": "Update OB cluster status",
"downstreams": [
],
"id": 89029854,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"timeout": 30,
"upstreams": [
89029852
]
},
{
"className": "com.alipay.ocp.service.task.business.zone.UpdateObZoneStatusTask",
"description": "Update zone status",
"downstreams": [
89029852
],
"id": 89029851,
"name": "Update zone status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"timeout": 1800,
"upstreams": [
89029853
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 141,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-05T22:22:21.009+08:00",
"traceId": "71e073145dba4fc8"
}