Perform a takeover precheck on an OceanBase cluster

2025-03-07 02:16:15  Updated

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 perform a precheck before you take over an OceanBase cluster.

Call description

Prerequisites

  • You have the permissions to take over the specified OceanBase cluster.

    For more information about the permissions, see Overview and 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 If the connectionMode parameter is set to proxy, this parameter is required.
obClusterId Integer No 1001 If the connectionMode parameter is set to proxy and the cluster to be taken over is a standby cluster, this parameter is required.

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:
  • PRIMARY: indicates a primary cluster.
  • STANDBY: indicates a standby cluster.
  • configUrl String The ConfigUrl of the cluster.
    obClusterId Long The ID of the cluster.
    obVersion String The version of the cluster.
    result Object For more information, see Details of the precheck result.
    servers Object For more information, see OBServer information.
    vpcId Long The ID of the virtual private cloud (VPC) to which the cluster belongs.

    Details of the precheck result

    Parameter Type Description
    valid Boolean Indicates whether the precheck was passed.
    messages String The list of error messages.

    OBServer information

    Parameter Type Description
    dataDir String The directory for storing SSTables and other data on the OBServer node.
    host Object The information about the host of the OBServer node. For more information, see Host information.
    valid Boolean Indicates whether the precheck was passed.
    ip String The IP address of the OBServer node.
    pid Integer The PID of the observer process.
    port Integer The remote procedure call (RPC) port number of the OBServer node.
    result Object The precheck result.
    valid Boolean Indicates whether the precheck was passed.
    messages String The list of error messages.
    sqlPort Integer The SQL port number of the OBServer node.
    status String The status of the OBServer node.
    withRootserver Boolean Indicates whether the 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.

    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 the OceanBase Cloud Platform (OCP) Agent service.
    hostAgentStatus String The status of the OCP Agent service.
    hostAgentVersion String The version of the OCP Agent service.
    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:
  • DEDICATED_PHYSICAL_MACHINE: indicates a physical machine.
  • DEDICATED_CONTAINER: indicates a container.
  • DEDICATED_ECS: indicates a ECS.
  • name String The host name.
    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.

    Zone information

    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",
            "result": {
                "messages": [],
                "valid": true
            },
            "servers": [
                {
                    "dataDir": "/home/admin/oceanbase/store/ob4320",
                    "host": {
                        "alias": null,
                        "architecture": "x86_64",
                        "checkSystemInfoRiskyCount": 0,
                        "checkSystemInfoStatus": null,
                        "checkSystemInfoTaskId": 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": [
                            {
                                "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
        },
        "duration": 402,
        "server": "74f95ea2f4",
        "status": 200,
        "successful": true,
        "timestamp": "2024-10-10T17:14:26.45+08:00",
        "traceId": "7025326d03a3ce88"
    }
    

    Contact Us