Thanks to the various posts on this thread, I've managed to get a pair of Hercules appliances up and running in the following configuration:
By themselves, the Hercules appliances are functioning as expected; the odd behavior now comes when I enable VRRPD so add redundancy between the load balancers themselves. My understanding is that once you've assigned a virtual IP to VRRP, the pair of VRRP servers is supposed to establish a master/backup configuration. However, once I've started the service, the Hercules appliances hang up for about 15-30 seconds, return to service, but now /var/log/messages show that both servers claim to be the master router.
Any suggestions on why this might be?
My (almost) working config:
#!/bin/sh
LOGFILE1=/var/log/pen.smtp.log
LOGFILE2=/var/log/pen.squid.log
PIDFILE1=/var/run/pen.smtp.pid
PIDFILE2=/var/run/pen.squid.pid
CONTROLPORT1=8888
CONTROLPORT2=8889
CHROOTDIR=/chroot/pen
VRRP_IP=10.1.1.100
VSERVER_ID=1
LBSERVER1=25
LBSERVER2=3128
SERVER1=10.1.1.72
SERVER2=10.1.1.92
case "$1" in
start)
echo -n "Starting VRRP Cluster Service: "
/sbin/vrrpd -i eth0 -v $VSERVER_ID $VRRP_IP
echo "OK"
if -x /bin/pen ; then
echo -n "Starting pen.smtp: "
/bin/pen -C $CONTROLPORT1 -X -l $LOGFILE1 -p $PIDFILE1 $LBSERVER1 $SERVER1 $SERVER2
echo "OK"
fi
if -x /bin/pen ; then
echo -n "Starting pen.squid: "
/bin/pen -C $CONTROLPORT2 -X -l $LOGFILE2 -p $PIDFILE2 $LBSERVER2 $SERVER1 $SERVER2
echo "OK"
fi
;;
stop)
kill `cat /var/run/pen.smtp.pid`
kill `cat /var/run/pen.squid.pid`
killall vrrpd
;;
*)
echo "usage: $0 { start | stop }" >&2
exit 1
;;
esac