機能説明
このAPIは、OceanBaseクラスタにゾーンを追加するために使用されます。
呼び出し説明
インターフェース制約
呼び出し元は、対象のOceanBaseクラスタに対する管理権限を持っている必要があります。
呼び出し元の権限について詳細は、ユーザーと権限の概要を参照してください。
呼び出し元は、OCPアプリケーションサービスの認証を通過している必要があります。
リクエストパス
POST /api/v2/ob/clusters/{id}/zones
path:
パラメータ |
型 |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| id | Integer | はい | 1 | 対象クラスタのID。 |
リクエストパラメータ
パラメータ |
型 |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| name | String | はい | foo | ゾーン名。 |
| idcName | String | はい | idc1 | データセンター名。 |
| servers | Array | はい | [1,2] | ホストIDのリスト。 |
| architecture | String | いいえ | x86_64 | CPUアーキテクチャ。 |
| packageOperatingSystem | String | いいえ | xx | クラスタソフトウェアパッケージのOS。未入力の場合、デフォルトでクラスタ設定が使用されます。 |
| startupParameters Object | Object | いいえ | - | 起動パラメータ。 |
| ├─name | String | いいえ | - | パラメータ名。 |
| ├─value | String | いいえ | - | パラメータ値。 |
| addReplicaParams | Array | いいえ | - | テナントレプリカ設定関連パラメータ。 |
| ├─zoneName | String | はい | zone1 | ゾーン名。 |
| ├─replicaType | Enum | はい | FULL | レプリカタイプ。 |
| ├─resourcePool | Object | はい | - | リソースプール情報。 |
| ├─unitSpecName | String | はい | S1 | ユニット仕様名。 |
| ├─unitCount | Long | はい | 1L | Unit数。 |
| ├─tenantId | Long | はい | 1L | テナントID。 |
| ├─tenantName | String | いいえ | tenant1 | テナント名。 |
実行結果
基本データ構造
パラメータ |
型 |
説明 |
|---|---|---|
| data | Object | 非同期タスク情報。詳細については、タスク情報を参照してください。 |
| successful | Boolean | リクエストが成功したかどうかを示します。 |
| timestamp | Datetime | サーバーがリクエストを完了したタイムスタンプです。 |
| duration | Integer | サーバーがリクエストを処理した時間(ミリ秒)。 |
| status | Integer | HTTPステータスコードです。 |
| traceId | String | リクエストのトレースIDであり、問題の調査に使用されます。 |
| server | String | リクエストに応答したアプリケーションサービスのアドレスです。 |
例
リクエスト例
POST /api/v2/ob/clusters/1/zones
body:
{
"name": "zone2",
"idcName": "hz2",
"servers": [
1
]
}
実行結果例
{
"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, rpm_name=oceanbase-2.2.75-20210108170301.el7.x86_64.rpm, service_name=ob_upgrade:22, service_version=2.2.75, host.1.zone=zone2, ob_cluster_id=22, zone2.idc=hz2, zone2.region=hangzhou}, listMap={root_server_ips=[xxx.xxx.xxx.xxx], server_ids=[6], host_ids=[1], zone_names=[zone2]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 107618,
"name": "Add OB Zone",
"startTime": "2021-03-02T10:57:45.471+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Pre check for install OB",
"downstreams": [
129213
],
"id": 129202,
"name": "Pre check for install OB",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129220
]
},
{
"description": "Start Zone",
"downstreams": [
129215
],
"id": 129203,
"name": "Start Zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129210
]
},
{
"description": "Add Zone",
"downstreams": [
129210
],
"id": 129204,
"name": "Add Zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129213
]
},
{
"description": "Wait node",
"downstreams": [
129211
],
"id": 129205,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129216
]
},
{
"description": "Wait observer active",
"downstreams": [
129221
],
"id": 129206,
"name": "Wait observer active",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129211
]
},
{
"description": "Make dir for ob",
"downstreams": [
129208
],
"id": 129207,
"name": "Make dir for ob",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129212
]
},
{
"description": "Wait node",
"downstreams": [
129216
],
"id": 129208,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129207
]
},
{
"description": "Prepare add Zone",
"downstreams": [
129220
],
"id": 129209,
"name": "Prepare add Zone",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Wait node",
"downstreams": [
129203
],
"id": 129210,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129204
]
},
{
"description": "Add observer",
"downstreams": [
129206
],
"id": 129211,
"name": "Add observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129205
]
},
{
"description": "Wait node",
"downstreams": [
129207
],
"id": 129212,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129219
]
},
{
"description": "Wait node",
"downstreams": [
129204
],
"id": 129213,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129202
]
},
{
"description": "Wait observer active",
"downstreams": [
129218
],
"id": 129214,
"name": "Wait observer active",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129221
]
},
{
"description": "Set Zone idc info",
"downstreams": [
129219
],
"id": 129215,
"name": "Set Zone idc info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129203
]
},
{
"description": "Start observer process with param",
"downstreams": [
129205
],
"id": 129216,
"name": "Start observer process with param",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129208
]
},
{
"description": "Wait node",
"downstreams": [
129226
],
"id": 129217,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129218
]
},
{
"description": "Start ocp agent service",
"downstreams": [
129217
],
"id": 129218,
"name": "Start ocp agent service",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129214
]
},
{
"description": "Install rpm",
"downstreams": [
129212
],
"id": 129219,
"name": "Install rpm",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129215
]
},
{
"description": "Reserve host",
"downstreams": [
129202
],
"id": 129220,
"name": "Reserve host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129209
]
},
{
"description": "Restart observer process",
"downstreams": [
129214
],
"id": 129221,
"name": "Restart observer process",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129206
]
},
{
"description": "Wait node",
"downstreams": [
129223
],
"id": 129222,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129226
]
},
{
"description": "Update Zone status",
"downstreams": [
129224
],
"id": 129223,
"name": "Update Zone status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129222
]
},
{
"description": "Sync cluster info",
"downstreams": [
129225
],
"id": 129224,
"name": "Sync cluster info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129223
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 129225,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129224
]
},
{
"description": "Update observer status",
"downstreams": [
129222
],
"id": 129226,
"name": "Update observer status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129217
]
}
]
},
"duration": 217,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T10:57:45.572+08:00",
"traceId": "1d3f515c734942a3"
}