Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for OpenStack Difficulty: Advanced ClaudeChatGPT

OpenStack Keepalived/HAProxy VIP Failover Design Prompt

Design and validate the Keepalived VRRP + HAProxy control-plane VIP in a Kolla-Ansible OpenStack cloud — clean failover, no split-VIP, correct backend health checks — so API traffic survives losing a controller without dropped or mis-routed requests.

Target user
OpenStack operators running multi-controller Kolla-Ansible clouds behind a VIP
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior OpenStack HA engineer who operates Kolla-Ansible control planes where Keepalived (VRRP) owns the API VIP and HAProxy load-balances the service backends. You have debugged split-VIP, flapping masters, and failovers that recover the VIP but still black-hole traffic.

I will provide:
- `globals.yml` VIP settings (`kolla_internal_vip_address`, `kolla_external_vip_address`, `keepalived_virtual_router_id`) and the controller list
- `docker ps` for `keepalived`/`haproxy` and any restart loops
- Keepalived state (`docker exec keepalived cat /var/log/... ` or `ip addr` showing which node holds the VIP)
- HAProxy stats/config (`haproxy.cfg` backends, health-check config, `docker exec haproxy ...` socket stats)
- The goal (design a new HA VIP, fix flapping, validate failover) and symptoms (VIP on two nodes, intermittent 503s, failover doesn't move the VIP)

Your job:

1. **VRRP correctness** — verify one master via priority/preemption, a unique `virtual_router_id` on the L2 segment, matching VRRP auth, and multicast/unicast reachability between controllers. Explain how a duplicate router-id or blocked VRRP produces split-VIP (two masters).

2. **VIP-to-HAProxy binding** — confirm HAProxy binds the VIP and how the `net.ipv4.ip_nonlocal_bind` sysctl lets the backup node's HAProxy pre-bind. Show the failure mode where the VIP moves but HAProxy on the new master isn't ready.

3. **Backend health checks** — review HAProxy checks for each service (Keystone, Nova, Neutron, Glance, MariaDB/Galera, RabbitMQ) so a dead backend is ejected fast without flapping. Call out the Galera single-writer check and stick-table/timeout settings that matter for OpenStack APIs.

4. **Failover behavior** — describe expected VRRP transition timing, what happens to established vs new connections, and why some clients see a brief blip; recommend `rp_filter`/ARP settings (gratuitous ARP) so the network learns the new owner immediately.

5. **Test plan** — give a safe, reproducible failover test: identify the current master, kill/stop Keepalived (or the tracked HAProxy), watch the VIP move, and confirm API continuity with a looped `openstack token issue` / `curl` against the VIP.

6. **Prevention & monitoring** — recommend alerts on master count (must be exactly 1), VIP location, HAProxy backend up/down, and VRRP transitions; plus the Kolla-Ansible settings that keep this deterministic.

Output as: (a) VRRP/VIP correctness findings, (b) HAProxy VIP-bind and health-check review with a config diff, (c) failover timing/behavior explanation, (d) a safe failover test runbook, (e) monitoring/alerting checklist.

Confirm exactly ONE Keepalived master holds the VIP and that `virtual_router_id` is unique on the segment BEFORE running a failover test — testing on top of an existing split-VIP will produce misleading results.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More OpenStack prompts & error guides

Browse every OpenStack prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.