The file defaults to /etc/bongoyo.conf, and can be specified by the -c command line parameter to bongoyo. It is divided into two sections. The first section contains the global parameters, and the second section contains blocks that define the fail-over servers as well as the virtual servers. Below are the syntax rules of the configuration file:
The configuration file format is designed in a way that an identical configuration file can be shared among the fail-over servers, although it does not have to be so. But it really helps. Really.
Parameter | Sections * | Description |
---|---|---|
port | G | TCP port to listen for incoming messages. |
debug | G |
Debug level. 0: only fatal messages 10: important messages 30: really chatty |
log file | G |
Log file. (Syslog capability on wish list.) |
Example:
port = 30672 debug = 10 log file = /var/log/bongoyo.log
Each server (real and virtual) is defined in a smb.conf-ish block, with the identifier in [brackets]. Definition block for a virtual server is identified by the virtual keyword/field. Some fields have meaning only for a virtual server and some fields have meaning only for a real fail-over server.
Parameter | Sections | Description |
---|---|---|
addr | V,F | IP address of server. |
boss_order | F |
For selecting boss. The lower the integer, the higher seniority. |
pre_takeover post_takeover pre_release post_release |
V |
Tasks to run before/after taking over/releasing the virtual server. Accepts module. |
secret | V |
(Very lousy) authentication. Really functions as a place holder until better authentication method can be employed. It is on the wish list. |
service_check | F |
Task run by the fail-over server. This gets run by the boss to check the availability of the virtual server. |
suitability_self_check | V | Check to see if localhost is suitable for taking-over a virtual server. |
use_interface | F |
Interfaces that can be used to assume the IP of the virtual server. Multiple interfaces can be specified, separate by white space. Each interface is defined by interface,network/netmask. |
The first example is a system of 2 fail-over servers (F1, F2) and 1 virtual server (V1). The service that is being monitored is the LPRng lpd using the LPRNG bongoyo module. Presumably a special queue called queue0 is used to check the serviceability of the virtual server. I.e., whichever of F1 or F2 has taken over V1, it has better have a queue called queue0. It is also highly recommended that the output of this queue is /dev/null rather than to a real printer.
Whenever F1 or F2 takes over the virtual server V1 IP, it runs the script
/usr/local/lib/bongoyo/do-new-printcap.sh.Presumeably this is a shell script that reconfigures the /etc/printcap and perhaps kill and restart the LPRng lpd. The same script is also executed when a failover server releases the IP of the virtual server.
# global configs port = 30672 debug = 10 log file = /var/log/bongoyo.log # server configs: 2 fail-over servers, 1 virtual server [F1] addr = 192.168.1.10 boss_order = 10 secret = passwd1 use_interface = le0:1,192.168.1.0/255.255.255.0 [F2] addr = 192.168.1.11 boss_order = 20 secret = passwd2 use_interface = eth0:1,192.168.1.0/255.255.255.0 eth0:2,192.168.1.0/255.255.255.0 [V1] addr = 192.168.1.20 virtual service_check = LPRNG:queue0 suitability_self_check = LPRNG: pre_takeover = NULL: post_takeover = EXEC:30 /usr/local/lib/bongoyo/do-new-printcap.sh pre_release = NULL: post_release = EXEC:30 /usr/local/lib/bongoyo/do-new-printcap.sh
This example is the same as the last one, except that it has an additional virtual server. This virtual server is a web server listening on port 80/tcp. The TCPCONN module performs a simple check of the virtual webserver, basically checking if a TCP connection is accepted on port 80.
# global configs port = 30672 debug = 10 log file = /var/log/bongoyo.log # server configs: 2 fail-over servers, 2 virtual servers [F1] addr = 192.168.1.10 boss_order = 10 secret = passwd1 use_interface = le0:1,192.168.1.0/255.255.255.0 [F2] addr = 192.168.1.11 boss_order = 20 secret = passwd2 use_interface = eth0:1,192.168.1.0/255.255.255.0 eth0:2,192.168.1.0/255.255.255.0 [V1] addr = 192.168.1.20 virtual service_check = LPRNG:queue0 suitability_self_check = LPRNG: pre_takeover = NULL: post_takeover = EXEC:30 /usr/local/lib/bongoyo/do-new-printcap.sh pre_release = NULL: post_release = EXEC:30 /usr/local/lib/bongoyo/do-new-printcap.sh [V2] addr = 192.168.1.21 virtual service_check = TCPCONN:80 suitability_self_check = TCPCONN:80 pre_takeover = NULL: post_takeover = NULL: pre_release = NULL: post_release = NULL:
Page mangling by Edwin Lim.
Wed Sep 6 01:39:53 EDT 2000