欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/
功能说明
该接口用于删除指定 OceanBase 集群的 Zone。
调用说明
接口约束
- 调用者需具备对目标 OceanBase 集群的管理权限。
关于调用者的权限,详情可参见 安全概述。
- 调用者需要通过 OCP 应用服务鉴权。
请求路径
DELETE /api/v2/ob/clusters/{id}/zones/{zoneName}
path:
参数 | 类型 | 必选 | 示例值 | 描述 |
|---|---|---|---|---|
id | Integer | 是 | 1 | 需删除 Zone 的 OceanBase 集群 ID。 |
zoneName | String | 是 | 1 | 需删除的 Zone 名。 |
返回结果
基础数据结构
参数 | 类型 | 说明 |
|---|---|---|
data | Object | 异步任务信息,详情参见 任务信息。 |
successful | Boolean | 请求是否成功。 |
timestamp | Datetime | 服务端完成请求的时间戳。 |
duration | Integer | 服务端处理请求的时间(毫秒)。 |
status | Integer | 符合 HTTP Status 规范的编码。 |
traceId | String | 请求的 Trace ID,用于排查问题。 |
server | String | 响应请求的应用服务的地址。 |
示例
请求示例
DELETE /api/v2/ob/clusters/1/zones/zone2
返回示例
{
"data": {
"cluster": {
"id": 21,
"name": "ob_upgrade",
"obClusterId": 22
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, service_type=OB_CLUSTER, service_name=ob_upgrade:22, former_cluster_status=RUNNING, zone_name=zone2, target_cluster_status=RUNNING, service_version=2.2.75, ob_cluster_id=22}, listMap={server_ids=[8], host_ids=[1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 108033,
"name": "Delete OB Zone",
"startTime": "2021-03-02T11:34:39.009+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Sync cluster info",
"downstreams": [
129783
],
"id": 129774,
"name": "Sync cluster info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129781
]
},
{
"description": "Unreserve host",
"downstreams": [
129781
],
"id": 129775,
"name": "Unreserve host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129784
]
},
{
"description": "Prepare delete OB Zone",
"downstreams": [
129786
],
"id": 129776,
"name": "Prepare delete OB Zone",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Stop Zone",
"downstreams": [
129782
],
"id": 129777,
"name": "Stop Zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129786
]
},
{
"description": "Wait observer delete",
"downstreams": [
129779
],
"id": 129778,
"name": "Wait observer delete",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129782
]
},
{
"description": "Stop ocp agent service",
"downstreams": [
129785
],
"id": 129779,
"name": "Stop ocp agent service",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129778
]
},
{
"description": "Clean observer host",
"downstreams": [
129784
],
"id": 129780,
"name": "Clean observer host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129785
]
},
{
"description": "Delete Zone meta info",
"downstreams": [
129774
],
"id": 129781,
"name": "Delete Zone meta info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129775
]
},
{
"description": "Delete observer",
"downstreams": [
129778
],
"id": 129782,
"name": "Delete observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129777
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 129783,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129774
]
},
{
"description": "Delete Zone",
"downstreams": [
129775
],
"id": 129784,
"name": "Delete Zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129780
]
},
{
"description": "Wait node",
"downstreams": [
129780
],
"id": 129785,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129779
]
},
{
"description": "Prepare delete observer",
"downstreams": [
129777
],
"id": 129786,
"name": "Prepare delete observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129776
]
}
]
},
"duration": 127,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T11:34:39.067+08:00",
"traceId": "80c3cf69ae8042dc"
}
欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/




