hastd Failover with ucarp
Christian.Vogt at haw-hamburg.de
Tue Feb 22 20:50:16 UTC 2011
> On Mon, 21 Feb 2011 16:55:35 +0100 Christian Vogt wrote:
> CV> Hello!
> CV> Thanks for the great work, I like this straight-forward FreeBSD a lot
> CV> from what I experienced untill now. I used the HAST How-To from
> CV> http://wiki.freebsd.org/HAST and it works perfectly if I use "pkill -USR2
> CV> -f 'ucarp -B'" to initiate the failover. The secondary node becomes
> CV> primary and the carp-interface is switched over to it.
> CV> But if I do a hard shutdown of the primary node it doesn't work, the
> CV> secondary node doesn't get primary. The ucarp-up script on the secondary
> CV> node is executed, but it fails because of the still running secondary
> CV> worker process (Secondary process for resource test is still running
> CV> after 30 seconds). Is the secondary process expected to end
> CV> automatically, when the primary process fails?
> I think it should exit but currently it does not. In r207371 timeouts for
> primary incoming and outgoing and secondary outgoing were added but not for
> secondary incoming. After keep alive mechanism was implemented I think we can
> add timeout for secondary incoming too. E.g. like in the attached patch?
> With the patch the secondary will exit in 20 seconds if it does not receive
> any packets from the primary.
> Or may by it is better to replace RETRY_SLEEP with timeout configuration
> parameter, both for keep alive/reconnection interval in primary and secondary
> incoming timeout?
> Mikolaj Golub
Thanks for your help, this solved the issue! I'm still going to use the carp+devd variant as proposed by Freddie, but this seems to be a good failover if carp doesn't work properly.
More information about the freebsd-fs