HA Promote

Overview

You can use the HA Promote API to promote the secondary BIG-IQ in an HA configuration to be the primary. The former primary becomes the new secondary. You can use this API only from the primary BIG-IQ to make the secondary BIG-IQ as the new primary. Use the HA Failover State API to get the current HA failover state of the BIG-IQ high-availability (HA) configuration. Use the HA Add Peer API to add a BIG-IQ to the BIG-IQ HA configuration. Use the HA Remove Standby API to remove the standby mode from all BIG-IQs in the HA configuration. Use the HA Reset API to reset a primary or secondary BIG IQ in a HA configuration to the standalone mode.

A BIG-IQ high availability (HA) configuration can ensure the continuous management of your BIG-IPs, by a standby BIG-IQ, in the event your primary BIG-IQ goes down. BIG-IQ offers the options of either manual failover mode or auto failover mode. When using the manual failover mode, manual intervention is required to promote the secondary BIG-IQ to become the primary BIG-IQ managing your BIG-IPs. To use manual failover mode, you require two BIG-IQs to act as the primary and secondary and both must be in the same network segment and have the same configuration. When using the auto failover mode, if the primary BIG-IQ goes down, a quorum DCD decides automatically to promote the secondary BIG-IQ to become the primary BIG-IQ. To use the auto failover mode, you require two BIG-IQs to act as primary and secondary BIG-IQs and a data collection device (DCD) to act as the quorum device.

REST Endpoint: /mgmt/shared/ha/promote-task

Requests

POST /mgmt/shared/ha/promote-task

To promote a secondary BIG-IQ in a HA configuration to be the primary and make the old primary the new secondary, you can send a POST request to the promote-task endpoint with an empty body.

Request Parameters

None

The body of the POST request can be empty.

Query Parameters

None

Response

The JSON in the response can contain the following parameters.

HTTP/1.1 200 OK

Name Type Description
id string The uuid identifier of the task.
identityReferences object References to users provided as links.
     link string URL to user
ownerMachineId string The machine GUID identifier.
phase2 boolean If false, the first stage is still running.
selfLink string Reference link to the task.
status string Status of the task. Initially, this value can be “STARTED” and eventually updates to “FINISHED”. When there is an error encountered in the task, the status changes to “FAILED”.

Permissions

Role Allow
admin Yes

GET /mgmt/shared/ha/promote-task

To check the task’s status, you can send a GET request to the promote-task endpoint.

Request Parameters

None

Query Parameters

None

Response

The JSON in the body of the response can contain the following parameters.

HTTP/1.1 200 OK

Name Type Description
id string The uuid identifier of the task.
identityReferences object References to users provided as links.
     link string URL of user
ownerMachineId string The machine GUID identifier.
phase2 boolean If true, the second stage has started.
progress string Explanation of the step field.
selfLink string Reference link to the task.
status string Status of the task. Initially, this value can be “STARTED” and eventually updates to “FINISHED”. When there is an error encountered in the task, the status changes to “FAILED”.
step string The value of step indicates the action performed by the task. See the the Step Values section for an explanation of the values.
userReference object Reference to the user that initiated the action.
     link string A URL to the user which started the task.

Step Values

The step parameter indicates the action performed by the task. step can have the following values.

Value Meaning
DONE Done
GET_PEER_DEVICE Getting the peer BIG-IQ details
REBUILD_AUTO_FAILOVER_CLUSTER Rebuilding auto failover configuration
RUN_PROMOTE_SCRIPT Promoting the peer
STAGE_2_STARTING Starting on new primary.
STARTING Starting
STARTING_PEER Starting peer
STOPPING_PEER Stopping peer
SWAPPING_IDS Setting proper primary and secondary IDs
WAIT_FOR_PEER_RESTJAVAD_UP Waiting for peer BIG-IQ to restart
WAIT_FOR_PEER_RESTJAVAD_UP_AGAIN Waiting for peer BIG-IQ to restart again

Permissions

Role Allow
admin Yes

Examples

POST to promote BIG-IQ

The following example shows how to promote a secondary BIG-IQ to primary and convert the old primary to a secondary.

POST https://192.0.2.0/mgmt/shared/ha/promote-task

The JSON in the body of the POST request can empty.

{}

Response

The JSON in the response to the POST can look similar to the following example.

HTTP/1.1 200 OK

{
    "phase2": false,
    "id": "de32af96-78d8-4e87-8f00-7d88341df5cf",
    "status": "STARTED",
    "identityReferences": [],
    "ownerMachineId": "a72bf801-d555-45f8-b2c2-d90eea73e141",
    "taskWorkerGeneration": 1,
    "generation": 1,
    "lastUpdateMicros": 1562180712686094,
    "kind": "shared:ha:promote-task:promotetaskitemstate",
    "selfLink": "https://localhost/mgmt/shared/ha/promote-task/de32af96-78d8-4e87-8f00-7d88341df5cf"
}

GET to retrieve task’s status

The following example polls for the status of the task.

GET https://192.0.2.0/mgmt/shared/ha/promote-task

Response

The JSON in the response to the GET can look similar to the following example.

HTTP/1.1 200 OK

{
  "items": [
    {
      "endDateTime": "2019-07-03T12:07:01.280-0700",
      "generation": 8,
      "id": "de32af96-78d8-4e87-8f00-7d88341df5cf",
      "identityReferences": [],
      "kind": "shared:ha:promote-task:promotetaskitemstate",
      "lastUpdateMicros": 1562180821330253,
      "ownerMachineId": "1ceb4f18-8cb3-40bb-b5af-10ca093cfaac",
      "phase2": true,
      "progress": "Done",
      "selfLink": "https://localhost/mgmt/shared/ha/promote-task/de32af96-78d8-4e87-8f00-7d88341df5cf",
      "startDateTime": "2019-07-03T12:06:13.739-0700",
      "status": "FINISHED",
      "step": "DONE"
    }
  ],
  "generation": 2,
  "kind": "shared:ha:promote-task:promotetaskcollectionstate",
  "lastUpdateMicros": 1562180801706686,
  "selfLink": "https://localhost/mgmt/shared/ha/promote-task"
}