summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/keepalived/vyatta-keepalived.pl6
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def1
-rw-r--r--templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/disable/node.def1
3 files changed, 8 insertions, 0 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl
index e40c737a..ada5e367 100755
--- a/scripts/keepalived/vyatta-keepalived.pl
+++ b/scripts/keepalived/vyatta-keepalived.pl
@@ -50,6 +50,12 @@ sub keepalived_get_values {
foreach my $group (@groups) {
my $vrrp_instance = "vyatta-$intf-$group";
$config->setLevel("$path vrrp vrrp-group $group");
+ if ($config->exists("disable")) {
+ VyattaKeepalived::vrrp_log("$vrrp_instance disabled - skipping");
+ my $state_file = VyattaKeepalived::get_state_file($intf, $group);
+ system("rm -f $state_file");
+ next;
+ }
my @vips = $config->returnValues("virtual-address");
my $num_vips = scalar(@vips);
if ($num_vips == 0) {
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
new file mode 100644
index 00000000..916e313b
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Set VRRP group disabled
diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
new file mode 100644
index 00000000..916e313b
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Set VRRP group disabled