From b0198cfa3d9f2155f09364627a134f79abdba25e Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 29 Mar 2021 22:36:03 +0100 Subject: [PATCH] blade-{paris,tuvok}: split IPv4/IPv6 VRRP --- ops/nixos/blade-paris/default.nix | 16 ++++++++++++---- ops/nixos/blade-tuvok/default.nix | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ops/nixos/blade-paris/default.nix b/ops/nixos/blade-paris/default.nix index 4d7f63c55b..96f3e62511 100644 --- a/ops/nixos/blade-paris/default.nix +++ b/ops/nixos/blade-paris/default.nix @@ -83,18 +83,26 @@ in { }; }; - services.keepalived = { - enable = true; - vrrpInstances.mgmtGateway = { + services.keepalived = let + mgmtBase = { interface = "br-mgmt"; state = "MASTER"; priority = 100; + }; + in { + enable = true; + vrrpInstances.mgmtGateway = mgmtBase // { virtualIps = [ { addr = "10.100.0.1/23"; } { addr = "92.118.28.1/24"; dev = "br-public"; } - { addr = "2a09:a441::/48"; dev = "br-public"; } ]; virtualRouterId = 1; }; + vrrpInstances.mgmtGateway6 = mgmtBase // { + virtualIps = [ + { addr = "2a09:a441::/48"; dev = "br-public"; } + ]; + virtualRouterId = 2; + }; }; } diff --git a/ops/nixos/blade-tuvok/default.nix b/ops/nixos/blade-tuvok/default.nix index 1d7159d2f3..115a94666c 100644 --- a/ops/nixos/blade-tuvok/default.nix +++ b/ops/nixos/blade-tuvok/default.nix @@ -118,18 +118,26 @@ in { "0.0.0.0" "[::]" ]; - services.keepalived = { - enable = true; - vrrpInstances.mgmtGateway = { + services.keepalived = let + mgmtBase = { interface = "br-mgmt"; state = "MASTER"; priority = 50; + }; + in { + enable = true; + vrrpInstances.mgmtGateway = mgmtBase // { virtualIps = [ { addr = "10.100.0.1/23"; } { addr = "92.118.28.1/24"; dev = "br-public"; } - { addr = "2a09:a441::/48"; dev = "br-public"; } ]; virtualRouterId = 1; }; + vrrpInstances.mgmtGateway6 = mgmtBase // { + virtualIps = [ + { addr = "2a09:a441::/48"; dev = "br-public"; } + ]; + virtualRouterId = 2; + }; }; }