On 14-1-2012 7:48, William Yodlowsky wrote:
> On 13 January 2012 at 16:35, Stuart Henderson <[email protected]> wrote:
>> i suspect the semantics you're actually looking for for relayd might
>> be "if relayd is not running, carpdemote should be raised".
>
> For my small corner of the net, having some other daemon or the kernel
> provide carp "auto-demotion" for when a service fails would be a great
> thing. Like a userland-accessible carp watchdog.
ifstated can do this. (maybe it should be renamed to hoststated ;-) )
daemon_up = '( "/etc/rc.d/relayd check" every 10 )'
state main {
if !$daemon_up {
run "ifconfig -g carp carpdemote"
set-state demoted
}
}
state demoted {
if $daemon_up {
run "ifconfig -g carp -carpdemote"
set-state main
}
}
@dlg, is the current example in /usr/src/etc/ifstated.conf still valid?
Maybe we can replace it with the very simple example above?