[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: carp without preemption problem



> I am not sure how to configure carp so that if the host becomes the
> master, it stays the master (as opposed to 'tends' to be the master),
> without having a preferred master.  I adjusted ifstated.conf to call
> 'ifconfig carp0 advbase 3 advskew 100' when the interface becomes 
BACKUP
> and 'ifconfig carp0 advbase 1 advskew 0' when the interface becomes
> MASTER, and this seems to work ok, but I am not sure that it is the
> proper way to configure carp, as it leaves an up to 3 second delay to
> perform takeover.

You're making this much, much harder than it needs to be.  CARP is very 
simple, as far as basic configuration goes.

You do not need ifstated in order to respond to CARP events.  Turn it 
off.  Kill the process.  Then:

   sysctl -w net.inet.carp.preempt=0

on both machines.  

Then, when you bring up the CARP interface, leave advbase and advskew 
alone.  Do not touch.  Do not configure them.  That's it.

May I suggest also reading the fine documentation, available for your 
perusal at:

   http://www.openbsd.org/faq/faq6.html#CARP

(Shameless plug: I wrote the first draft of that.)

-- 

-Sunny Raspet