Stop an OBServer

2023-08-15 02:30:55  Updated

Description

You can call this operation to stop an OBServer in an OceanBase cluster.

Call description

Prerequisites

  • You have the permissions to manage the OceanBase cluster.

    For more information about the permissions, see Security overview.

  • You have passed the authentication for the OCP application service.

Request path

POST /api/v2/ob/clusters/{id}/servers/{serverId}/stop

Path parameters

Parameter Type Required Example value Description
id Integer Yes 1 The ID of the OceanBase cluster.
serverId Integer Yes 1 The ID of the OBServer.

Request parameters

Parameter Type Required Example value Description
force Boolean No false Specifies whether to force stop the OBServer.

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/servers/2/stop

Sample response

{
  "data": {
    "cluster": {
      "id": 20,
      "name": "ob_upgrade",
      "obClusterId": 20
    },
    "context": "Context(parallelIdx=-1, stringMap={cluster_id=20, former_cluster_status=RUNNING, target_zone_status=RUNNING, former_zone_status=RUNNING, zone_name=zone2, target_cluster_status=RUNNING, server_id=3}, listMap={server_ids=[3]})",
    "creator": {
      "id": 100,
      "name": "admin"
    },
    "id": 111102,
    "name": "Stop OB server",
    "startTime": "2021-03-02T16:11:11.327+08:00",
    "status": "RUNNING",
    "tasks": [
      {
        "description": "Wait observer stop",
        "downstreams": [
          133821
        ],
        "id": 133815,
        "name": "Wait observer stop",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133816
        ]
      },
      {
        "description": "Stop observer process",
        "downstreams": [
          133815
        ],
        "id": 133816,
        "name": "Stop observer process",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133818
        ]
      },
      {
        "description": "Update OB cluster status",
        "downstreams": [
          
        ],
        "id": 133817,
        "name": "Update OB cluster status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133819
        ]
      },
      {
        "description": "Stop server",
        "downstreams": [
          133816
        ],
        "id": 133818,
        "name": "Stop server",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133820
        ]
      },
      {
        "description": "Sync cluster info",
        "downstreams": [
          133817
        ],
        "id": 133819,
        "name": "Sync cluster info",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133822
        ]
      },
      {
        "description": "Prepare stop observer",
        "downstreams": [
          133818
        ],
        "id": 133820,
        "name": "Prepare stop observer",
        "operation": "EXECUTE",
        "status": "RUNNING",
        "upstreams": [
          
        ]
      },
      {
        "description": "Update observer status",
        "downstreams": [
          133822
        ],
        "id": 133821,
        "name": "Update observer status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133815
        ]
      },
      {
        "description": "Update zone status",
        "downstreams": [
          133819
        ],
        "id": 133822,
        "name": "Update zone status",
        "operation": "EXECUTE",
        "status": "PENDING",
        "upstreams": [
          133821
        ]
      }
    ]
  },
  "duration": 140,
  "server": "192.168.0.1",
  "status": 200,
  "successful": true,
  "timestamp": "2021-03-02T16:11:11.373+08:00",
  "traceId": "139d82c5f88f42f4"
}

Contact Us