Restart an OceanBase cluster

2025-03-26 07:47:21  Updated

Description

You can call this operation to restart an OceanBase cluster.

Call description

Prerequisites

  • You have the permission to restart 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}/restart

Path parameters

Parameter Type Required Example value Description
id Long Yes 1 The ID of the OceanBase cluster to be restarted.

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/restart

Sample response

{
  "data": {
    "cluster": {
      "id": 21,
      "name": "ob_upgrade",
      "obClusterId": 22
    },
    "context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, ocpagent_service_name=agent, former_cluster_status=RUNNING}, listMap={21.zone1.server_ids=[5], 21.zone1.host_ids=[5], zone_names=[zone1]})",
    "creator": {
      "id": 100,
      "name": "admin"
    },
    "id": 107351,
    "name": "Restart OB cluster",
    "startTime": "2021-03-02T10:33:19.026+08:00",
    "status": "RUNNING",
    "tasks": [
      {
        "description": "Start ocp agent service",
        "downstreams": [
          128890
        ],
        "id": 128876,
        "name": "Start ocp agent service",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128884
        ]
      },
      {
        "description": "Update zone status",
        "downstreams": [
          128881
        ],
        "id": 128877,
        "name": "Update zone status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128894
        ]
      },
      {
        "description": "Prepare restart OB zone",
        "downstreams": [
          128883
        ],
        "id": 128878,
        "name": "Prepare restart OB zone",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128885
        ]
      },
      {
        "description": "Stop observer process",
        "downstreams": [
          128882
        ],
        "id": 128879,
        "name": "Stop observer process",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128886
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          128893
        ],
        "id": 128880,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128889
        ]
      },
      {
        "description": "Sync cluster info",
        "downstreams": [
          128891
        ],
        "id": 128881,
        "name": "Sync cluster info",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128877
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          128888
        ],
        "id": 128882,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128879
        ]
      },
      {
        "description": "Prepare restart observer",
        "downstreams": [
          128886
        ],
        "id": 128883,
        "name": "Prepare restart observer",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128878
        ]
      },
      {
        "description": "Wait observer accessible",
        "downstreams": [
          128876
        ],
        "id": 128884,
        "name": "Wait observer accessible",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128888
        ]
      },
      {
        "description": "Set zone context",
        "downstreams": [
          128878
        ],
        "id": 128885,
        "name": "Set zone context",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128887
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          128879
        ],
        "id": 128886,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128883
        ]
      },
      {
        "description": "Prepare restart cluster",
        "downstreams": [
          128885
        ],
        "id": 128887,
        "name": "Prepare restart cluster",
        "operation": "EXECUTE",
        "status": "RUNNING",
        "upstreams": [
          
        ]
      },
      {
        "description": "Start observer process",
        "downstreams": [
          128884
        ],
        "id": 128888,
        "name": "Start observer process",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128882
        ]
      },
      {
        "description": "Start server",
        "downstreams": [
          128880
        ],
        "id": 128889,
        "name": "Start server",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128890
        ]
      },
      {
        "description": "Wait node",
        "downstreams": [
          128889
        ],
        "id": 128890,
        "name": "Wait node",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128876
        ]
      },
      {
        "description": "Sync all tenant information",
        "downstreams": [
          128892
        ],
        "id": 128891,
        "name": "Sync all tenant information",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128881
        ]
      },
      {
        "description": "Update OB cluster status",
        "downstreams": [
          
        ],
        "id": 128892,
        "name": "Update OB cluster status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128891
        ]
      },
      {
        "description": "Update observer status",
        "downstreams": [
          128894
        ],
        "id": 128893,
        "name": "Update observer status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128880
        ]
      },
      {
        "description": "Start zone",
        "downstreams": [
          128877
        ],
        "id": 128894,
        "name": "Start zone",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          128893
        ]
      }
    ]
  },
  "duration": 128,
  "server": "a83ad33525",
  "status": 200,
  "successful": true,
  "timestamp": "2021-03-02T10:33:19.107+08:00",
  "traceId": "b68ad890fada444d"
}

Contact Us