diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-06-10 08:39:08 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-06-10 08:39:08 -0700 |
commit | 237415c05a9ab70bca8ec416a7fcdbb5dc291f20 (patch) | |
tree | afc6c35ba7d05c0b149e54b078da9f0cd9e5e58d | |
parent | 2762fd2d35459452718e6d26e75f28d4a6453d5b (diff) | |
download | vyatta-cfg-qos-237415c05a9ab70bca8ec416a7fcdbb5dc291f20.tar.gz vyatta-cfg-qos-237415c05a9ab70bca8ec416a7fcdbb5dc291f20.zip |
Fix error messages for misconfiguration
One more try at explaining why rates must be correct.
-rw-r--r-- | scripts/VyattaQosTrafficShaper.pm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/VyattaQosTrafficShaper.pm b/scripts/VyattaQosTrafficShaper.pm index 8e7c1e3..9564c43 100644 --- a/scripts/VyattaQosTrafficShaper.pm +++ b/scripts/VyattaQosTrafficShaper.pm @@ -106,15 +106,22 @@ my $rate = _getPercentRate($self->{_rate}, $limit); if ($rate > $limit) { - printf STDERR - "Warning: $level\nbandwidth %dKbps > overall bandwidth %dKbps\n", - $rate / 1000, $limit / 1000; + print "Configuration error in: $level\n"; + printf STDERR "The bandwidth reserved for this class (%dKbps) must be", + $rate / 1000; + printf STDERR "less than the bandwidth for the overall policy (%dKbps)\n", + $limit / 1000; + exit 1; } my $ceil = _getPercentRate($self->{_ceiling}, $limit); if (defined $ceil && $ceil < $rate) { - die "$level\nceiling %dKbps < class bandwidth %dKbps\n", - $ceil / 1000, $rate / 1000; + print "Configuration error in: $level\n"; + printf STDERR "The bandwidth ceiling for this class (%dKbps) must be", + $ceil / 1000; + printf STDERR "less than the reserved bandwidth for the class (%dKbps)\n", + $rate / 1000; + exit 1; } } |