diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-08-11 15:34:38 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-08-11 15:34:38 -0700 |
commit | 837348ee45977158bdf9f423f09cb6539608d586 (patch) | |
tree | b0c00453230468d22fd20537f39deab09a73a559 | |
parent | 9208bf11107b6467fea395be832d4aeff946db9d (diff) | |
download | vyatta-cluster-837348ee45977158bdf9f423f09cb6539608d586.tar.gz vyatta-cluster-837348ee45977158bdf9f423f09cb6539608d586.zip |
fix for bug 3560: add lower limits for intervals
-rw-r--r-- | scripts/VyattaClusterConfig.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/VyattaClusterConfig.pm b/scripts/VyattaClusterConfig.pm index 01979dc..3b564eb 100644 --- a/scripts/VyattaClusterConfig.pm +++ b/scripts/VyattaClusterConfig.pm @@ -6,6 +6,8 @@ use VyattaConfig; my $DEFAULT_INITDEAD = 30000; my $DEFAULT_DEADPING = 30000; +my $MIN_DEAD = 300; +my $MIN_KEEP = 100; my $DEFAULT_LOG_FACILITY = 'daemon'; my $SERVICE_DIR = "/etc/init.d"; my $RESOURCE_SCRIPT_DIR = "/etc/ha.d/resource.d"; @@ -224,6 +226,12 @@ sub ha_cf { return (undef, "using multiple secondary nodes is not supported yet") if ($#secondaries > 0); return (undef, + "dead interval must be at least $MIN_DEAD milliseconds") + if ($ditvl < $MIN_DEAD); + return (undef, + "keepalive interval must be at least $MIN_KEEP milliseconds") + if ($kitvl < $MIN_KEEP); + return (undef, "dead interval must be more than twice the keepalive interval") if ($ditvl <= (2 * $kitvl)); return (undef, |