Skip to content

Operations

This page is for a running cluster: change the configuration, take a node or an RGW server out of rotation, push one ober.yaml to all nodes, renew certificates, monitor and upgrade. The options of each command are in the CLI reference.

Change the configuration: apply and rollback

Edit ober.yaml (or run sudo ober config), then apply it on the running node:

sudo ober apply              # diff, check, reload, health gate
sudo ober rollback --list    # the stored states, newest last
sudo ober rollback           # go back to the state before the last apply

ober apply renders haproxy.cfg and the ExaBGP or keepalived configuration from ober.yaml, shows the diff, runs haproxy -c (and keepalived -t), reloads, and waits for 3 good /health checks in a row (--timeout, default 30 s). If a step fails, it writes the old files back and reloads again; ober.yaml keeps your edit. ober apply -f FILE (or -f - for stdin) installs a new ober.yaml first, and a failure restores the old one too.

Each successful apply stores the applied files of <install_path>/etc (not the certificates and not the blocklist) in <install_path>/var/history/<timestamp>. The 20 newest are kept. ober rollback [SNAPSHOT] restores one of them with the same checks and health gate. The lo-vip network files are not covered. In BGP mode, both commands send SIGHUP to the health process, so it reads the new VIP list.

Take a node out of rotation

sudo ober maintenance on       # BGP: withdraw all routes. keepalived: priority -100, VIPs move
sudo ober maintenance status   # what this node still announces or owns
sudo ober maintenance off

HAProxy keeps serving during maintenance, so open connections finish. ober stop does the same first: it turns maintenance on, waits until the node is out of rotation, waits up to drain_timeout seconds (default 30) for open connections to close, and then stops HAProxy.

Take an RGW server out of rotation

sudo ober backend list                     # state, check result and sessions per server
sudo ober backend drain rgw07:7480         # no new requests, running ones finish
sudo ober backend maint rgw07:7480         # out at once: no checks, no new connections
sudo ober backend ready rgw07:7480         # back in service
sudo ober backend drain rgw07:7480 --all-nodes  # the same on every node in `nodes:`

A server is named by host:port or by its HAProxy name (rgw07:7480 is rgw07_7480). The state is saved to the HAProxy server-state file after each change, so a drain survives a reload. --all-nodes runs the command on each other node over SSH (as ober push does), tries all nodes and exits 1 if one of them failed.

Cluster, metrics, certificates and upgrades

One ober.yaml for the whole cluster

Values that must differ between nodes go in ober.local.yaml next to ober.yaml on each node. Its keys override ober.yaml, and ober config saves them back there:

# etc/ober.local.yaml on node ober2
local_ip: 10.0.0.2
bgp:
  router_id: 10.0.0.2

Then ober.yaml is the same on every node. List the nodes once (nodes: [ober1, ober2, ober3]), apply on one node, and push to the others:

sudo ober apply              # this node first
sudo ober push               # ssh NODE sudo -n ober apply -f - on each other node, one at a time
sudo ober cluster status     # VIP placement and config drift over all nodes

ober push refuses an ober.yaml that sets local_ip, bgp.router_id or bgp.local_address, and stops at the first node that fails its check or health gate. That node puts its old files back. Certificates are not copied. The SSH user needs a key without a prompt and sudo -n ober on each node. SSH runs with BatchMode=yes, so the host keys must already be in root's known_hosts (or set StrictHostKeyChecking accept-new for the node addresses).

Metrics and alerts

HAProxy serves request and backend metrics on :8404/metrics. ober metrics adds what HAProxy does not know: VIP announced or VRRP MASTER, VIP present, maintenance, backend servers UP, certificate expiry, the config hash and the versions. Write it for the node_exporter textfile collector every minute, for example from root's crontab:

* * * * * /usr/local/bin/ober metrics --output /var/lib/node_exporter/textfile/ober.prom

deploy/prometheus/alerts.yml has the alert rules: a VIP on no node or MASTER on two nodes, a node healthy but not announcing, backends down, certificate under 21 days, and config or version drift between nodes. Test them with promtool test rules deploy/prometheus/alerts_test.yml.

ober sync is deprecated: the files it wrote were never read. Use bgp.neighbors or keepalived.peers, security.internal_networks or security.allowlist, and backends[].servers in ober.yaml.

Certificates

Use one issuer for the whole cluster, not one per node: behind ECMP or DNS round-robin a per-node HTTP-01 challenge can land on the wrong node. The files in deploy/lego/ run lego with the DNS-01 challenge on one node (or an admin host that can SSH to all nodes):

  • DNS-01 proves the domain with a DNS TXT record, so no node opens port 80.
  • The certificate covers s3.example.com and *.s3.example.com. The wildcard is needed for virtual-host buckets (bucket.s3.example.com). ober cert install warns without it.
  • After each new certificate, lego runs ober-lego-hook. The hook joins the certificate and key into one PEM and pipes it to ober cert install --all-nodes [--name NAME] -, which checks it and swaps it into HAProxy on every node without a reload.
sudo install -m 755 deploy/lego/ober-lego-hook /usr/local/bin/
sudo install -m 600 deploy/lego/ober-lego.env /etc/ober/lego.env    # then edit: DNS token
sudo install -m 644 deploy/lego/ober-lego.service deploy/lego/ober-lego.timer /etc/systemd/system/
sudo systemctl start ober-lego.service       # first certificate, check the journal
sudo systemctl enable --now ober-lego.timer  # checks twice a day, renews when due

The DNS API token stays in /etc/ober/lego.env (mode 600), never in ober.yaml. The unit is written for lego v5 (lego run --deploy-hook); lego v4 uses renew --renew-hook, and the hook reads the environment variables of both. The unit runs as root, so root needs an SSH key for the other nodes and sudo -n ober there (as for ober push).

If the hook fails, lego keeps the new certificate in /var/lib/lego/certificates/ and does not run the hook again until the next renewal. Run the hook by hand or use ober cert install. Expiry is visible early: ober status warns under 21 days and is critical under 7, and ober metrics exports ober_cert_remaining_seconds, which fires the OberCertExpiresSoon alert in deploy/prometheus/alerts.yml under 21 days.

Rolling upgrade

Upgrade one node at a time. sudo ober cluster upgrade runs the steps below on each node over SSH (this node last) and stops at the first failure, which leaves that node in maintenance. --command sets the package upgrade command (default: the pipx command in step 3), --nodes limits the nodes, --timeout (300 s) limits each wait, and --dry-run shows the steps. The steps by hand, on each node:

  1. sudo ober cluster status must exit 0 (OK) before you start.
  2. sudo ober maintenance on. Wait until sudo ober maintenance status shows no announced routes (BGP) or no MASTER state (keepalived), so the traffic has moved to the other nodes.
  3. As root: PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx upgrade herr-ober (or pip install -U herr-ober in the venv).
  4. sudo ober upgrade (-y installs without asking). It re-renders the systemd units and offers HAProxy and ExaBGP updates. If it says ober-http.service changed, or it installed a new ExaBGP, run sudo ober restart --hard now, while the node has no traffic.
  5. sudo ober doctor must show no failures.
  6. sudo ober maintenance off.
  7. Wait until sudo ober cluster status exits 0 again, then go to the next node.

Moving existing nodes to HAProxy 3.4: on RHEL 10, ober upgrade installs the pinned HAProxy 3.4 RPM (see "HAProxy 3.4 on RHEL 10"), so a plain sudo ober cluster upgrade moves the nodes. On Ubuntu, ober upgrade only updates the installed package and does not change the PPA. Use --command for this: - Ubuntu 26.04: sudo ober cluster upgrade --command "rm -f /etc/apt/sources.list.d/vbernat-ubuntu-haproxy-*.sources && add-apt-repository -y ppa:vbernat/haproxy-3.4 && DEBIAN_FRONTEND=noninteractive apt-get install -y haproxy" (it replaces the older HAProxy PPA; checked on 26.04). On an amd64v3 host, add Architectures: amd64 to the new PPA .sources file, as bootstrap does. - RHEL 10 with an RPM that you built yourself: copy it to each node, then sudo ober cluster upgrade --command "dnf install -y /root/haproxy-3.4.8-1.el10.<arch>.rpm" (tested in the AWS lab: 0 failed requests).

BGP mode: the health process that ExaBGP started keeps running the old code until ExaBGP restarts. A health process from an ober version without SIGHUP support dies on the SIGHUP that ober apply, ober rollback and ober push send, and ExaBGP starts it again with the new code. To avoid this while the node has traffic, run sudo ober restart --hard in step 4 also in BGP mode.

Host firewall

ober bootstrap changes no firewall unless you add --firewall. With it, bootstrap allows the SSH port(s) from sshd -T first, then 443/tcp, VRRP and BFD (3784/udp), and then enables ufw (Ubuntu) or firewalld (RHEL). When the firewall is already active, bootstrap adds only 443/tcp, VRRP and 3784/udp and keeps your SSH rules. If sshd -T fails, bootstrap stops before it changes the firewall. All rules are persistent. Port 80, BGP and the stats port are not opened. Bootstrap also raises nf_conntrack_max to 1048576, because a stateful firewall tracks every client and RGW connection.

AWS S3 or TLS backends

A backend can use HTTPS, so Herr Ober can front AWS S3 or an RGW behind TLS. Example for AWS S3 in us-west-2:

security:
  s3_hostnames: [s3.us-west-2.amazonaws.com]   # cert and SAN checks use these names
certs:
  path: /etc/ober/certs/s3.pem                  # a cert for s3.us-west-2.amazonaws.com
backends:
  - name: aws_s3
    servers: ["s3.us-west-2.amazonaws.com:443"]
    tls: true                     # HTTPS to the servers
    tls_verify: true              # default: verify with the distro CA bundle
    tls_ca_file: ""               # or a CA bundle for an RGW with a private CA
    health_check_expect: "rstatus ^[234]"   # optional: S3 answers GET / with 307 or 403
  • SigV4 signs the Host header. Herr Ober passes Host unchanged, so clients must sign for the AWS name, and that name must resolve to the VIP (hosts file or private DNS).
  • Clients then expect a cert for the AWS name from Herr Ober. Use a private CA that the clients trust, or for a test a self-signed cert and aws --no-verify-ssl.
  • The SNI to the backend is the server's host name, which the AWS cert covers (also *.s3.us-west-2.amazonaws.com), so path-style and virtual-host style requests both work.
  • TLS servers given by host name are resolved again through DNS (resolvers sys), because S3 IP addresses change. Plain HTTP backends resolve names only at start. An IP server gets no SNI, so only the CA chain is verified.