Skip to content
Controllers

Controllers

A controller is how qfence acts on something it does not run itself: a server’s BMC, a hypervisor, a firewall, a container platform or an application. Each controller declares its capabilities, such as power.off, vm.stop, vip.own or unit.restart. An availability plan binds those capabilities, site by site, to what the plan needs done: fence a site, promote it, judge whether it is healthy and ready. Controllers and bindings explains how the parts fit; the design is ADR 0010.

There are two kinds of controller, and a guide for each type.

Infrastructure controllers

They act on what an application runs on: its host’s power, its VM, its container, its network. Their fences are what prove a site has stopped. Five types are built into the orchestrator:

TypeTalks toFences at level
RedfishA server’s BMC, over Redfishcompute
IPMIA server’s BMC, through ipmitoolcompute
Proxmox VEProxmox VE’s API: VMs, nodes and replicationcompute, network
FortiGateFortiOS’s REST API: policies, interfaces, VIPs and routesnetwork
DockerA Docker Engine or a swarm managercompute, network

Application controllers

They act on the application itself, through its own interface: check its health and readiness, restart it, fence it at the application level and promote it (ADR 0005). An application-level fence never proves on its own that a site has stopped: a plan still needs a compute or network fence at every site. Three types are built in:

  • systemd: a systemd unit on a host the orchestrator reaches over SSH.
  • PostgreSQL: a primary and its streaming standbys, over SQL.
  • Keycloak: whether Keycloak can sign users in, over HTTPS.

For any other application, write your own: a service in any language that answers qfence’s external controller protocol.

Every type’s fields

Each guide shows a working configuration and leaves out what it does not need. The controller types reference lists every field of every type, generated from the manifests compiled into the orchestrator. GET /api/v1/controllers/types serves the same manifests from a running orchestrator.