✨ feat: Implement HA Router VRRP, Multi-WAN, and Conntrack Sync (Group 2)#9
Conversation
This commit implements the requirements of GROUP 2 for the High Availability (HA) NixOS router plan (`0001-ha-router-setup-plan.md`): 1. **VRRP (`vrrp/default.nix`)**: Configures `Keepalived` VRRP instances for the local LAN/VLANs. It defines `notifyMaster` and `notifyBackup` scripts to handle dynamic WAN MAC spoofing and interface administrative state control on failover. 2. **Multi-WAN (`multi-wan/default.nix`)**: Implements a `multi-wan-healthcheck` systemd service that monitors external connectivity via ICMP. It dynamically adjusts the default route metric to shift traffic away from broken uplinks while preserving the gateway discovery capabilities for failback. 3. **Conntrack (`conntrack/default.nix`)**: Configures `conntrackd` FTFW (Failover/Fault-Tolerant Firewall) state synchronization securely over a dedicated `vlan40` interface, using multicast. 4. **Base Refactor (`masthead/default.nix`)**: Defines necessary `cfg` options for the MAC, VRRP Virtual IPs, and health check IPs. It properly provisions "real" dedicated IPs for all interfaces based on the specific node's `role` (primary/backup) to avoid IP conflicts and allow VRRP daemons to communicate. Co-authored-by: ProjectInitiative <6314611+ProjectInitiative@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This pull request fully implements GROUP 2 of the HA Router architecture plan, providing robust High Availability and Multi-WAN failover logic.
🎯 What
modules/nixos/hosts/masthead/vrrp/default.nixintegrating the custom Keepalived VRRP wrapper.modules/nixos/hosts/masthead/multi-wan/default.nixadding an automated ping-based health check that alters route metrics to achieve a multi-WAN failover design similar tomwan3.modules/nixos/hosts/masthead/conntrack/default.nixisolating state synchronization to a dedicated interface (vlan40) utilizingconntrackd's FTFW sync.modules/nixos/hosts/masthead/default.nixremoving the statically assignedlan0VIP (which breaks HA logic) and instead applies distinct "real" role-based IPs (e.g..2and.3) to all primary and backup interfaces.🛡️ Solution
iproute2references, metric-based failover (so gateways are never completely erased from routing tables), and secure multicast bindings.PR created automatically by Jules for task 7255720421843975739 started by @ProjectInitiative