diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-04-03 12:49:37 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-04-03 12:49:37 -0700 |
commit | 64266c79c91583ed6a9704066e920a0270efdd81 (patch) | |
tree | e55b8a033148a838dd179cfc80d9721ed9a08420 | |
parent | 94d79ea2e51b31874b70f808beb8124c3537c974 (diff) | |
download | vyatta-cfg-system-64266c79c91583ed6a9704066e920a0270efdd81.tar.gz vyatta-cfg-system-64266c79c91583ed6a9704066e920a0270efdd81.zip |
Fix 3086: VRRP only allows up to 20 virtual IPs
3 files changed, 12 insertions, 1 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index 1deeafe8..fff1acf1 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -47,10 +47,15 @@ sub keepalived_get_values { my $vrrp_instance = "vyatta-$intf-$group"; $config->setLevel("$path vrrp vrrp-group $group"); my @vips = $config->returnValues("virtual-address"); - if (scalar(@vips) == 0) { + my $num_vips = scalar(@vips); + if ($num_vips == 0) { print "must define a virtual-address for vrrp-group $group\n"; exit 1; } + if ($num_vips > 20) { + print "can not set more than 20 VIPs per group\n"; + exit 1; + } my $priority = $config->returnValue("priority"); if (!defined $priority) { $priority = 1; diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index 3b1cf6a6..c40c5f47 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,3 +5,6 @@ help: Configure virtual address create: sudo /opt/vyatta/sbin/vyatta-watchlink-exclude.pl --id=vrrp --action=add --intf="$VAR(../../../../@).$VAR(../../../@)" --ipadd=$VAR(@) --signal delete: sudo /opt/vyatta/sbin/vyatta-watchlink-exclude.pl --id=vrrp --action=remove --intf="$VAR(../../../../@).$VAR(../../../@)" --ipadd=$VAR(@) --signal + +comp_help: possible completions: + <x.x.x.x> Virtual IP address (up to 20 per group) diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index d66d4d60..af8b4624 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -5,3 +5,6 @@ help: Configure virtual address create: sudo /opt/vyatta/sbin/vyatta-watchlink-exclude.pl --id=vrrp --action=add --intf=$VAR(../../../@) --ipadd=$VAR(@) --signal delete: sudo /opt/vyatta/sbin/vyatta-watchlink-exclude.pl --id=vrrp --action=remove --intf=$VAR(../../../@) --ipadd=$VAR(@) --signal + +comp_help: possible completions: + <x.x.x.x> Virtual IP address (up to 20 per group) |