Red Hat Bugzilla – Bug 20208
Last modified: 2007-03-26 23:37:13 EDT
I am trying to have HA server run in fail over mode. I am trying to have
the failover work on DNS and DHCP. Both of these services run on the same
ip. How can I set up the lvs.cf file to be able to failover on DHCP and DNS
using the same IP?
What you want to do should be possible, but it could get pretty involved.
I'm going to treat this as 2 questions...
>How can I set up the lvs.cf file to be able to failover on DHCP and DNS
>using the same IP?
I assume that you are talking about fos services here. Each service must be
defined to use a VIP (Virtual IP) address. However, they can be defined to use
the SAME VIP -- they do not have to be unique. For example, If you have a server
running on IP address 22.214.171.124, and you want it to supply 2 IP services,
you could defined both services as using virtual address "192.168.10.1".
Hopefully that directly answers your question.
>I am trying to have the failover work on DNS and DHCP
This is much more complex. Mail, DNS, and NFS are common topicsof conversation
on the LVS mailing list. First, in order to monitor a UDP service you must be
able to do one of two things:
1. Perform a send/expect test that works for the service (you cannot perform a
connect-only test on a UDP service). Send/expect is currently very limited. You
can only use textual data. This is fine for your own services, but for existing
IP services it is limiting and probably won't work for you.
2. Some services use both UDP and TCP, so you might be able to test the service
on a TCP port number. Again; a send/expect test may not work because the odds
are that the protocol used is binary, but you can at least perform a connect
These restrictions are listed in the Installation guide. There is also the need
that the service must be static in data content. I mention this because DHCP
usually has a database to deal with. If the service has a local database, it is
not replicated nor has co-ordinated access for write changes. There are
technologies available to solve this (network block device, rsync, etc), but you
would need to set this up yourself. I also have heard of someone using fos to
control a NFS service for example, but he actually modified the source of the
NFS daemon to accept and respond to a specific test message.
Well, when I called RedHat to inquire on the High Availability server they
assured me that what I wanted to do was indeed possible.
I have been fighting with phone tech support to help make this possible.
What is the best way to get help on creating an lvs.cf file to do what I need
it to do? I need to be able to fail over on DNS or DHCP. I know about
the /var/state/dhcpd.leases file but isnt there a way to periodically scp or
rcp that file from one box to another? Then when a service goes astray on the
master machine the database file will already be on the slave. I mainly need
what the lvs.cf file would look like in this manner.
>Well, when I called RedHat to inquire on the High Availability server
they assured me that what I wanted to do was indeed possible.
It should be, but it's going to require some cleaverness on your part No one I
know has done this, and the product and documents do not list or promote DNS,
NFS, or DHCP as supported services because they are impacted by the restrictions
concerning monitoring binary/UDP services. These services are not user
interactive and are often hot topics on the HA mailing lists, especially NFS.
(these services are tricky on all Linux HA products, not just piranha).
Piranha is a tool rather than a product. It's a generic solution and open
source. There are ways to make this work. For example; You could define your
lvs.cf file to monitor a custom created shell service that responds to a tcp
send/expext test, and in turn uses shell commands to determine whether dhcp or
dns is operating. Tesating your service would then product the same result.
Phil has a prototype of such a scheme. email him at email@example.com for the
>What is the best way to get help on creating an lvs.cf file to do what I
need it to do?
Unfortunately I do not have an answer. An "out-of-the-box" piranha cannot be
used to monitor those services by only putting definitions in the lvs.cf file,
unless those same services have tcp ports that you can connect or test
>I know about the /var/state/dhcpd.leases file but isnt there a way to
periodically scp or rcp that file from one box to another?
Yes; there are MANY things possible here. crontab entries doing scp or rcp's,
rsyncs, using a network block device, GFS, etc. Putting the service data on an
external storage device and using NFS to access it from the servers is the
example given in our documentation right now.
>Then when a service goes astray on the master machine the database file will
already be on the slave.
Yes; but there is a potentional for data corruption or loss in some schemes. For
example; suppose your copy gets stopped half way through? Then you have a
partial or empty database on the other system. There are some Linux HA
technologies designed to address these concerns. You may want to become familiar
>I mainly need what the lvs.cf file would look like in this manner.
Unfortunately, there is no lvs.cf configuration that will work with those
services. You will need to get more creative.
Ok I understand I will have to play with this and see what I can get to work..
But I have a question in the piranha gui. It has a field for the VIP address's
netmask. I fill that field in and it doens't write anything to the /etc/lvs.cf file?
>Ok I understand I will have to play with this and see what I can get to work..
We'll try to have explicit examples in the next version of the documentation.
>But I have a question in the piranha gui. It has a field for the VIP address's
>netmask. I fill that field in and it doens't write anything to the /etc/lvs.cf
Humm. Sounds bad. SHNouldn't do that. We'll look at it.
hummm (just back from a weeks holiday)
It does actually work.
2 questions for you.
1. are you expecting the VIP to change immediately you select one fom the menu?
(you MUST press the accept button at the bottom of the page for it to
register it as a change to the configuration)
2. Can I have a copy of your lvs.cf config if the above gives you no joy and
could you tell me version of piranha you are using? (rpm -q piranha should tell
I've had no additional feedback,.. is this still a problem? or has it been
resolved? (ie can I close this record?