LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

LVS, mon, and heartbeat, who's in control?

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: LVS, mon, and heartbeat, who's in control?
From: Paul Lantinga <prl@xxxxxx>
Date: Wed, 30 Jan 2002 11:22:12 -0500

Good morning,

We're running the .8.x stable code.  It works great in the default setup with one LVS server doing NAT.  Phase II means trying out 2 load balancers, as found at http://www.linuxvirtualserver.org/HighAvailability.html.  This works fine using heartbeat to control lvs and mon in the manner found in the example haresources file.

  clients -- switch -- lvs and lvs2 -- switch -- servers
However, I've been asked to have mon monitor not only the real servers, but also the the IP addresses for the switches on the outside and the inside and to then kill heartbeat if it fails.  I added a section to the mon.cf file to monitor the 'gateways' and to alert|upalert with heartbeat.alert|startheartbeat.alert.  The heartbeat alerts are simple scripts that do /etc/init.d/heartbeat stop|start and the haresources contains: lvs vip-http vip-servers lvs mon

Of course, this killfest doesn't work b/c you can't have mon killing heartbeat and heartbeat killing mon as you're left with noone watching anything.  ;) . 

So, I figured, how about having two mon instances or how about having mon control both heartbeat and lvs.

The dual mon setup would be:
- one instance of mon to watch my real servers that would pull servers in and out of service with the lvs.alert.  This would be started and stopped by heartbeat.  haresources would look like: lvs vip-http vip-servers mon

- a second instance of mon would be started at boot time and would monitor the gateways hostgroup using a mon.cf with:
  hostgroup gateways gw1 gw2

  watch gateways
        service fping
                interval 10s
                monitor fping.monitor
                period wd{Sun-Sat}
                alert heartbeat.alert
                upalert starthearbeat.alert

The mon in control scenario would be:
- push everything from the two mon configs above into one mon.cf file. 

Is either of these methods preferable? wise? unwise?  Has anyone else managed to get 2 instances of mon running on the same box?  Is anyone using mon to control heartbeat and lvs?

thanks,

Paul L.

<Prev in Thread] Current Thread [Next in Thread>