diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-04 10:28:06 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-04 10:28:06 -0700 |
commit | 5ec3ec09b50c92ef9fe52a72426df2f42e1a345c (patch) | |
tree | 6b180dea9fcea896656d1a595fc066507cde3da6 /scripts/keepalived | |
parent | aaf21ee2b37c0328658e2d26cbac845a75e9d712 (diff) | |
parent | 64266c79c91583ed6a9704066e920a0270efdd81 (diff) | |
download | vyatta-cfg-system-5ec3ec09b50c92ef9fe52a72426df2f42e1a345c.tar.gz vyatta-cfg-system-5ec3ec09b50c92ef9fe52a72426df2f42e1a345c.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'scripts/keepalived')
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index 0f1301db..55d53715 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; |