Description
You can call this operation to perform a precheck before you take over an OceanBase cluster. This operation is optional. To ensure smooth takeover, we recommend that you call the operation before the takeover.
Call description
Prerequisites
You have the permission to take over the specified OceanBase cluster.
For more information about the permissions, see Overview.
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
POST /api/v2/ob/clusters/takeOverPreCheck
Request parameters
Body parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| rootSysPassword | String | Yes | ****** | The password of the root@sys user. |
| address | String | Yes | xxx.xxx.xxx.xxx | The address used to connect to the cluster. |
| port | Integer | Yes | 2881 | The port used to connect to the cluster. |
| connectionMode | String | No | direct | The connection mode. Valid values: direct and proxy. Default value: direct. |
| clusterName | String | No | ob01 | The name of the cluster. If the connectionMode parameter is set to proxy, this parameter is required. |
| obClusterId | Integer | No | 1001 | The ID of the cluster in OceanBase Database. If the connectionMode parameter is set to proxy and the cluster to be taken over is a standby cluster, this parameter is required. |
| vpcName | String | No | xxx | The name of the virtual private cloud (VPC). |
| vpcId | Long | No | 1L | The ID of the VPC. |
| proxyroPassword | String | No | ****** | The password of the proxyro@sys user. |
| saveToCredential | Boolean | No | true | Specifies whether to save the password to the password box. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see Takeover precheck result. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed 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 responded to the request. |
Takeover precheck result
| Parameter | Type | Description |
|---|---|---|
| clusterName | String | The name of the cluster. |
| clusterType | String | The type of the cluster. Valid values: |
| configUrl | String | The ConfigUrl of the cluster. |
| obClusterId | Long | The ID of the cluster in OceanBase Database. |
| obVersion | String | The version of the cluster. |
| result | Object | For more information, see Precheck result details. |
| servers | Object | For more information, see OBServer node information. |
| vpcId | Long | The ID of the VPC to which the cluster belongs. |
| vpcName | String | The name of the VPC to which the cluster belongs. |
| primaryObClusterId | Long | The ID of the primary cluster corresponding to the current cluster in OceanBase Database. |
| arbitrationServiceId | Long | The ID of the arbitration service. |
| conflictServiceNames | Array | The array of conflicting service names. |
Precheck result details
| Parameter | Type | Description |
|---|---|---|
| valid | Boolean | Indicates whether the precheck was passed. |
| messages | String | The list of error messages. |
| withRootserver | Boolean | Indicates whether RootService is deployed on the OBServer node. | | zone | Object | The information about the zone to which the OBServer node belongs. For more information, see Zone information. |
V4.3.5
Host information
| Parameter | Type | Description | |
|---|---|---|---|
| alias | String | The alias of the host. | |
| architecture | String | The hardware architecture. | |
| checkSystemInfoRiskyCount | Integer | The number of risks in the installation check task. | |
| checkSystemInfoStatus | String | The installation check status. | |
| checkSystemInfoTaskId | Long | The ID of the installation check task. | |
| createTime | String | The time when the host was created. | |
| description | String | The description of the host. | |
| hostAgentId | Long | The ID of OCP Agent. | |
| hostAgentStatus | String | The status of OCP Agent. | |
| hostAgentVersion | String | The version of OCP Agent. | |
| hostTags | String | The tags for the host. | |
| id | Long | The ID of the host. | |
| idcDescription | String | The description of the IDC. | |
| idcId | Long | The ID of the IDC. | |
| idcName | String | The name of the IDC. | |
| innerIpAddress | String | The IP address of the host. | |
| ioPerformance | String | The I/O performance of the host. | |
| kind | String | The host category. Valid values: |
|
| name | String | The name of the host. | |
| operatingSystem | String | The operating system. | |
| operatingSystemRelease | String | The release name of the operating system. | |
| operatingTaskInstanceId | Long | The ID of the operating task. | |
| publishPorts | String | The port mapping. | |
| regionDescription | String | The description of the region. | |
| regionId | Long | The ID of the region. | |
| regionName | String | The name of the region. | |
| serialNumber | String | The serial number. | |
| services | Object | The ServiceSummary array, which is a summary of the deployed services. | |
| ——name | String | The service name. | |
| —— softwarePackageId | Long | The ID of the software package. | |
| —— type | String | The service type. | |
| —— version | String | The service version. | |
| sshPort | Integer | The SSH port number. | |
| status | String | The host status. | |
| statusAnalysis | String | The exception status analysis. | |
| tags | String | The tags for the host. | |
| typeDescription | String | The description of the host type. | |
| typeId | Long | The ID of the host type. | |
| typeName | String | The name of the host type. | |
| updateTime | String | The time when the host was last modified. | |
| vpcId | Long | The ID of the VPC to which the host belongs. | |
| vpcName | String | The name of the VPC to which the host belongs. | |
| checkSystemInfoProductTypes | Array | The product types detected in the installation check. |
| Parameter | Type | Description |
|---|---|---|
| idcName | String | The name of the IDC to which the zone belongs. |
| regionName | String | The name of the region to which the zone belongs. |
| zoneName | Boolean | The name of the zone to which the host belongs. |
Examples
Sample request
POST /api/v2/ob/clusters/takeOverPreCheck
Body:
{
"rootSysPassword":"xxxxx",
"address":"xxxxx",
"port":2888
}
Sample response
{
"data": {
"clusterName": "ob4320",
"clusterType": "PRIMARY",
"configUrl": "http://xxx.xxx.xxx.xxx:10550/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=ocpmaster&ObRegion=ob4320",
"obClusterId": 1658110562,
"obVersion": "4.3.2.0",
"primaryObClusterId": 1003,
"result": {
"messages": [],
"valid": true
},
"servers": [
{
"dataDir": "/home/admin/oceanbase/store/ob4320",
"host": {
"alias": null,
"architecture": "x86_64",
"checkSystemInfoRiskyCount": 0,
"checkSystemInfoStatus": null,
"checkSystemInfoTaskId": null,
"checkSystemInfoProductTypes": null,
"createTime": "2024-09-12T19:06:21+08:00",
"description": null,
"hostAgentId": 3000010,
"hostAgentStatus": "AVAILABLE",
"hostAgentVersion": "4.3.2-20240906151652",
"hostTags": null,
"id": 4000015,
"idcDescription": null,
"idcId": 1,
"idcName": "BJ",
"innerIpAddress": "xxx.xxx.xxx.xxx",
"ioPerformance": [],
"kind": "DEDICATED_PHYSICAL_MACHINE",
"name": "sqaob011124009057.sa128",
"operatingSystem": "4.9.151-015.ali3000.alios7.x86_64",
"operatingSystemRelease": "alios7",
"operatingTaskInstanceId": null,
"publishPorts": null,
"regionDescription": null,
"regionId": 1,
"regionName": "OCP_META_REGION",
"serialNumber": null,
"services": [
{
"id": "integer[int64]",
"name": "obproxy4310",
"softwarePackageId": 3000021,
"type": "OB_PROXY",
"version": "4.3.1.0-402024062810"
}
],
"sshPort": 22,
"status": "ONLINE",
"statusAnalysis": null,
"tags": null,
"typeDescription": null,
"typeId": 1,
"typeName": "test",
"updateTime": "2024-09-20T11:13:05+08:00",
"vpcId": 1,
"vpcName": "system-default"
},
"ip": "xxx.xxx.xxx.xxx",
"pid": 8408,
"port": 2882,
"result": {
"messages": [],
"valid": true
},
"sqlPort": 2881,
"status": "ACTIVE",
"withRootserver": true,
"zone": {
"idcName": "BJ",
"regionName": "OCP_META_REGION",
"zoneName": "zone1"
}
}
],
"vpcId": 1,
"vpcName": "string",
"arbitrationServiceId": 1002,
"conflictServiceNames": null,
"proxyroPassword": "******"
},
"duration": 402,
"server": "74f95ea2f4",
"status": 200,
"successful": true,
"timestamp": "2024-10-10T17:14:26.45+08:00",
"traceId": "7025326d03a3ce88"
}