From 7363488860d3d597c83bc26c43bc0961f4429863 Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sun, 8 Feb 2015 14:34:32 +0000 Subject: vyatta-wanloadbalance: remove legacy load balancing code and tidy up Remove legacy load balancing code left over from previous versions that is no longer used, and tidy up a few of the scripts. Bug #441 http://bugzilla.vyos.net/show_bug.cgi?id=441 --- Makefile.am | 5 ---- configure.ac | 2 +- debian/vyatta-wanloadbalance.postinst.in | 1 - etc/init.d/vyatta-wanloadbalance | 44 ---------------------------- etc/loadbalance.conf | 50 -------------------------------- scripts/vyatta-wanloadbalance.init | 2 -- scripts/vyatta-wanloadbalance.init.in | 30 ------------------- scripts/vyatta-wlb-status | 1 - src/loadbalance.conf | 50 -------------------------------- 9 files changed, 1 insertion(+), 184 deletions(-) delete mode 100644 etc/init.d/vyatta-wanloadbalance delete mode 100644 etc/loadbalance.conf delete mode 100755 scripts/vyatta-wanloadbalance.init.in delete mode 100644 src/loadbalance.conf diff --git a/Makefile.am b/Makefile.am index 25321b8..b1dedce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,9 +6,6 @@ opdir = $(datadir)/vyatta-op/templates bin_sudo_usersdir = $(bindir)/sudo-users curverdir = $(sysconfdir)/config-migrate/current -initddir = /etc/init.d -etcdir = /etc - AM_CPPFLAGS = -I src -Wall -DDEBUG CLEANFILES = src/main.o src/lbdata.o src/lbdatafactory.o src/loadbalance.o src/rl_str_proc.o src/lbpathtest.o src/lbtest_icmp.o src/lbtest_ttl.o src/lboutput.o src/lbtest.o @@ -50,5 +47,3 @@ install-exec-hook: cd templates; $(cpiop) $(DESTDIR)$(cfgdir) mkdir -p $(DESTDIR)$(opdir) cd templates-op; $(cpiop) $(DESTDIR)$(opdir) - mkdir -p $(DESTDIR)/etc - cd etc; $(cpiop) $(DESTDIR)/etc diff --git a/configure.ac b/configure.ac index 956119d..7c3bca8 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ m4_define([VERSION_ID], [m4_esyscmd([ else echo -n 2.4 fi])]) -AC_INIT([vyatta-wanloadbalance], VERSION_ID, [vyatta-support@vyatta.com]) +AC_INIT([vyatta-wanloadbalance], VERSION_ID, [maintainers@vyos.net]) test -n "$VYATTA_VERSION" || VYATTA_VERSION=$PACKAGE_VERSION diff --git a/debian/vyatta-wanloadbalance.postinst.in b/debian/vyatta-wanloadbalance.postinst.in index 7195bc8..80f5895 100644 --- a/debian/vyatta-wanloadbalance.postinst.in +++ b/debian/vyatta-wanloadbalance.postinst.in @@ -2,7 +2,6 @@ LOADBALANCE_DIR=/var/run/load-balance - prefix=/opt/vyatta mkdir -p $LOADBALANCE_DIR diff --git a/etc/init.d/vyatta-wanloadbalance b/etc/init.d/vyatta-wanloadbalance deleted file mode 100644 index 214ea8e..0000000 --- a/etc/init.d/vyatta-wanloadbalance +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/bash - -### BEGIN INIT INFO -# Provides: vyatta-wanloadbalnce -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Default-Start: -# Default-Stop: -# Short-Description: Vyatta WAN loadbalance service -### END INIT INFO - -declare progname=${0##*/} -declare action=$1; shift - -conf=$1; shift -pid=/var/run/vyatta/wlb.pid - -test -x $bb || exit 0 - -start () -{ - if [ -n "$conf" ] ; then - /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid 2>/dev/null - else - /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -d -i $pid 2>/dev/null - fi -} - -stop () -{ - if [ -f $pid ] - then - kill -s SIGTERM $( cat $pid ) 2>/dev/null - fi -} - -case "$action" in - start) start;; - stop) stop;; - force-reload) stop; sleep 1; start;; - restart) stop; sleep 1; start;; - *) echo "Usage: $progname {start|stop|restart}" - exit 1 -esac diff --git a/etc/loadbalance.conf b/etc/loadbalance.conf deleted file mode 100644 index 85e6c5d..0000000 --- a/etc/loadbalance.conf +++ /dev/null @@ -1,50 +0,0 @@ -# -# Sample vyatta load balance configuration file. -# - -health { - interface eth1 { - target 10.0.0.1 - success-ct 2 - failure-ct 1 - ping-resp 100 - } - - interface eth2 { - target 10.0.0.1 - success-ct 1 - failure-ct 1 - ping-resp 1000 - } -} - -rule 1 { - protocol udp - interface eth1 { - weight 1 - } - interface eth2 { - weight 2 - } -} - -rule 2 { - protocol tcp - source { - address 1.1.1.1 - port-number 2222 - } - interface eth1 { - weight 1 - } - interface eth2 { - weight 3 - } -} - -#default rule w/o protocol specified -rule 10 { - interface eth2 { - weight 1 - } -} \ No newline at end of file diff --git a/scripts/vyatta-wanloadbalance.init b/scripts/vyatta-wanloadbalance.init index eeccc32..2f61284 100755 --- a/scripts/vyatta-wanloadbalance.init +++ b/scripts/vyatta-wanloadbalance.init @@ -10,7 +10,6 @@ test -x $bb || exit 0 start () { -# /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -d -i $pid 1>/dev/null start-stop-daemon --background --start --quiet --oknodo --exec /opt/vyatta/sbin/wan_lb -- -f /var/run/load-balance/wlb.conf -d -i $pid } @@ -30,4 +29,3 @@ case "$action" in *) echo "Usage: $progname {start|stop|restart}" exit 1 esac - diff --git a/scripts/vyatta-wanloadbalance.init.in b/scripts/vyatta-wanloadbalance.init.in deleted file mode 100755 index decb811..0000000 --- a/scripts/vyatta-wanloadbalance.init.in +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/bash - -declare progname=${0##*/} -declare action=$1; shift - -conf=$1; shift -pid=/var/run/vyatta/wlb.pid - -test -x $bb || exit 0 - -start () -{ - /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid -} - -stop () -{ - if [ -f $pid ] - then - kill -s SIGTERM $( cat $pid ) 2>/dev/null - fi -} - -case "$action" in - start) start;; - stop) stop;; - restart) stop; sleep 1; start;; - *) echo "Usage: $progname {start|stop|restart}" - exit 1 -esac diff --git a/scripts/vyatta-wlb-status b/scripts/vyatta-wlb-status index 325b3b1..f86cc5b 100755 --- a/scripts/vyatta-wlb-status +++ b/scripts/vyatta-wlb-status @@ -1,5 +1,4 @@ #!/bin/sh - iptables $1 -L WANLOADBALANCE_PRE -t mangle -v diff --git a/src/loadbalance.conf b/src/loadbalance.conf deleted file mode 100644 index 85e6c5d..0000000 --- a/src/loadbalance.conf +++ /dev/null @@ -1,50 +0,0 @@ -# -# Sample vyatta load balance configuration file. -# - -health { - interface eth1 { - target 10.0.0.1 - success-ct 2 - failure-ct 1 - ping-resp 100 - } - - interface eth2 { - target 10.0.0.1 - success-ct 1 - failure-ct 1 - ping-resp 1000 - } -} - -rule 1 { - protocol udp - interface eth1 { - weight 1 - } - interface eth2 { - weight 2 - } -} - -rule 2 { - protocol tcp - source { - address 1.1.1.1 - port-number 2222 - } - interface eth1 { - weight 1 - } - interface eth2 { - weight 3 - } -} - -#default rule w/o protocol specified -rule 10 { - interface eth2 { - weight 1 - } -} \ No newline at end of file -- cgit v1.2.3