From 5a3718f088848f8fbf0c80d6ee914b0bddbc1f99 Mon Sep 17 00:00:00 2001 From: Julien Semaan Date: Thu, 27 Jan 2022 10:25:56 -0500 Subject: [PATCH 1/3] allow to centralize the VIPs on the first node of the cluster --- conf/documentation.conf | 7 +++++++ conf/pf.conf.defaults | 6 ++++++ lib/pf/services/manager/keepalived.pm | 13 ++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/conf/documentation.conf b/conf/documentation.conf index 20564189d9f5..f2261d26d610 100644 --- a/conf/documentation.conf +++ b/conf/documentation.conf @@ -1558,6 +1558,13 @@ description=< Date: Thu, 27 Jan 2022 10:31:43 -0500 Subject: [PATCH 2/3] adjust logic of VIP centralizaiton --- lib/pf/services/manager/keepalived.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/pf/services/manager/keepalived.pm b/lib/pf/services/manager/keepalived.pm index 9aee2ff3dd0d..29882418a08c 100644 --- a/lib/pf/services/manager/keepalived.pm +++ b/lib/pf/services/manager/keepalived.pm @@ -107,11 +107,10 @@ EOT my $priority = 100 - pf::cluster::cluster_index(); if(isdisabled($Config{active_active}{centralize_vips})) { $priority = 100 - pf::cluster::reg_cluster_index(); - my $process_tracking = "haproxy_portal"; - if ($Config{"interface $interface"}{'type'} =~ /management/i || $Config{"interface $interface"}{'type'} =~ /radius/i) { - $process_tracking = "radius_load_balancer"; - $priority = 100 - pf::cluster::cluster_index(); - } + } + my $process_tracking = "haproxy_portal"; + if ($Config{"interface $interface"}{'type'} =~ /management/i || $Config{"interface $interface"}{'type'} =~ /radius/i) { + $process_tracking = "radius_load_balancer"; } my $cluster_ip = pf::cluster::cluster_ip($interface); $tags{'vrrp'} .= <<"EOT"; From c877828fc97ce4adb07fbb6c1c0f8ee9a9ed8afd Mon Sep 17 00:00:00 2001 From: Julien Semaan Date: Thu, 27 Jan 2022 11:16:46 -0500 Subject: [PATCH 3/3] add active_active.centralize_vips to admin --- .../Configuration/activeActive/_components/TheForm.vue | 7 +++++++ .../views/Configuration/activeActive/_components/index.js | 1 + 2 files changed, 8 insertions(+) diff --git a/html/pfappserver/root/src/views/Configuration/activeActive/_components/TheForm.vue b/html/pfappserver/root/src/views/Configuration/activeActive/_components/TheForm.vue index c062720907d6..3a5699a1e4eb 100644 --- a/html/pfappserver/root/src/views/Configuration/activeActive/_components/TheForm.vue +++ b/html/pfappserver/root/src/views/Configuration/activeActive/_components/TheForm.vue @@ -30,6 +30,11 @@ :text="$i18n.t('Set the gateway option in DHCP replies to point only to the VIP in cluster mode rather than to all servers in the cluster.')" /> + +