Endurance

Pulse HA

Updated

PulseHA decides which appliance is active. It watches the peer and moves the Floating IPs when the active node stops answering.

PulseHA

Get PulseHA Config

GET /pulseha

curl
curl -X GET "https://appliance.example.com/api/v1/pulseha" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/pulseha';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/pulseha", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Get the PulseHA configuration
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/pulseha
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA config",
  "data": {
    "sipId": "352-e54-567-a5d",
    "port": 9083,
    "capacity": 0
  }
}

Update PulseHA Configuration Refused while a transaction is open. Commit or roll back the transaction first.

PUT /pulseha

This change is staged. Send PUT /services/apply to apply it.

Body parameters
sipId string Required
port integer Required
curl
curl -X PUT "https://appliance.example.com/api/v1/pulseha" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "sipId": "<sipId>",
  "port": 0
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/pulseha';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'sipId' => '<sipId>',
    'port' => 0,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "sipId": "<sipId>",
    "port": 0
}

response = requests.put("https://appliance.example.com/api/v1/pulseha", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "sipId": "<sipId>",
  "port": 0
}),
});

const data = await response.json();
Bruno
meta {
  name: Update the PulseHA configuration
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/pulseha
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "sipId": "<sipId>",
    "port": 0
  }
}
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA config"
}

Repair the Floating IPs PulseHA is not looking after

Re-run the PulseHA group sync for the Floating IPs: create any group that is missing, add every enabled Floating IP its group does not list, and have PulseHA reread its groups so an address no node holds is brought up. The PulseHA status reports such drift as fipDrift; this is its repair. Nothing lb_api owns is changed, so there is nothing to apply afterwards. The response carries the drift that remains, read again after the repair; an empty list means every enabled Floating IP is in its group and held by a node.

PUT /pulseha/fips/repair

This change is staged. Send PUT /services/apply to apply it.

curl
curl -X PUT "https://appliance.example.com/api/v1/pulseha/fips/repair" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/pulseha/fips/repair';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.put("https://appliance.example.com/api/v1/pulseha/fips/repair", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha/fips/repair', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Repair the Floating IPs PulseHA is not looking after
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/pulseha/fips/repair
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Floating IPs resynchronised with PulseHA",
  "data": {
    "fipDrift": [
      {
        "group": "eth0",
        "ip": "10.10.91.212/24",
        "reason": "not-held",
        "message": "Floating IP 10.10.91.212/24 is in PulseHA group 'eth0' but no node holds it"
      }
    ]
  }
}

Global settings

Get PulseHA Global Configuration

GET /pulseha/globals

curl
curl -X GET "https://appliance.example.com/api/v1/pulseha/globals" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/pulseha/globals';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/pulseha/globals", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha/globals', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Get the PulseHA global settings
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/pulseha/globals
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA Globals config",
  "data": {
    "hcInterval": "1000",
    "foInterval": "2000",
    "foLimit": 5000,
    "logLevel": "info"
  }
}

Update PulseHA Global Configuration Refused while a transaction is open. Commit or roll back the transaction first.

PUT /pulseha/globals

This change is staged. Send PUT /services/apply to apply it.

Body parameters
hcInterval string Required

How long the health check scheduler waits between rounds. A whole number of milliseconds, or a single time carrying a unit (ms or s) such as 5s, between 1000 and 10000 milliseconds. The value is echoed back exactly as it was sent.

foInterval string Required

How long the fail over scheduler waits between rounds. Same form and bounds as hcInterval, and must not exceed two thirds of foLimit.

foLimit integer Required
logLevel string Required
autoFailback boolean Required
curl
curl -X PUT "https://appliance.example.com/api/v1/pulseha/globals" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "hcInterval": "<hcInterval>",
  "foInterval": "<foInterval>",
  "foLimit": 0,
  "logLevel": "<logLevel>",
  "autoFailback": true
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/pulseha/globals';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'hcInterval' => '<hcInterval>',
    'foInterval' => '<foInterval>',
    'foLimit' => 0,
    'logLevel' => '<logLevel>',
    'autoFailback' => true,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "hcInterval": "<hcInterval>",
    "foInterval": "<foInterval>",
    "foLimit": 0,
    "logLevel": "<logLevel>",
    "autoFailback": true
}

response = requests.put("https://appliance.example.com/api/v1/pulseha/globals", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha/globals', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "hcInterval": "<hcInterval>",
  "foInterval": "<foInterval>",
  "foLimit": 0,
  "logLevel": "<logLevel>",
  "autoFailback": true
}),
});

const data = await response.json();
Bruno
meta {
  name: Update the PulseHA global settings
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/pulseha/globals
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "hcInterval": "<hcInterval>",
    "foInterval": "<foInterval>",
    "foLimit": 0,
    "logLevel": "<logLevel>",
    "autoFailback": true
  }
}
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA Globals config"
}

Get the PulseHA configuration of a node

Get a Cluster Node’s PulseHA Config

GET /{applianceId}/pulseha

Path parameters
applianceId string Required
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/pulseha" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/pulseha';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/pulseha", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/pulseha', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Get the PulseHA configuration of a node
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/pulseha
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA config",
  "data": {
    "sipId": "352-e54-567-a5d",
    "port": 9083,
    "capacity": 4
  }
}

Set the capacity of a node

Set a Cluster Node’s Node Capacity — the most floating IPs it may host. 0 means unlimited. Lowering a cap below what the node already holds does not move anything: the node simply stops being given new floating IPs. Refused while a transaction is open. Commit or roll back the transaction first.

PUT /{applianceId}/pulseha/capacity

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required

.Body parameters

capacity integer Required
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "capacity": 0
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'capacity' => 0,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "capacity": 0
}

response = requests.put("https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "capacity": 0
}),
});

const data = await response.json();
Bruno
meta {
  name: Set the capacity of a node
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/pulseha/capacity
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "capacity": 0
  }
}
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA node capacity"
}