Bug 20208 - lvs.cf
Summary: lvs.cf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat High Availability Server
Classification: Retired
Component: piranha
Version: 1.0
Hardware: i686
OS: Linux
high
medium
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: Wil Harris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-02 13:52 UTC by Ray Parish
Modified: 2007-03-27 03:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-17 19:33:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Red Hat Bugzilla 2000-11-02 13:52:18 UTC
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?
Thanks

Comment 1 Red Hat Bugzilla 2000-11-02 20:20:07 UTC
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 140.250.110.1, 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
attempt.

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.


Comment 2 Red Hat Bugzilla 2000-11-02 20:37:19 UTC
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.
Thanks

Comment 3 Red Hat Bugzilla 2000-11-02 21:04:44 UTC
>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).

HOWEVER...

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 copeland for the
example.


>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
successfully with.


>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
with them.

>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.


Comment 4 Red Hat Bugzilla 2000-11-06 17:32:20 UTC
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?


Comment 5 Red Hat Bugzilla 2000-11-06 18:52:58 UTC
>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
>file?


Humm. Sounds bad. SHNouldn't do that. We'll look at it.


Comment 6 Red Hat Bugzilla 2000-11-17 19:33:41 UTC
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
you)


Thanks 

Phil
=--=

Comment 7 Red Hat Bugzilla 2000-12-05 05:06:06 UTC
I've had no additional feedback,.. is this still a problem? or has it been
resolved? (ie can I close this record?

Phil
=--=


Note You need to log in before you can comment on or make changes to this bug.