Ubotu failover setup

Paul O'Malley ompaul at eircom.net
Wed Sep 19 17:45:43 UTC 2007

Dennis Kaarsemaker wrote:
> Hiya,
> I've been pondering about a good Ubotu failover setup for a while and
> here's what I've come up with. If nobody thinks this is a terrible idea,
> I'd like to implement it soon.
> - N copies of ubotu run at N hosts
> - The nicknames of all copies are linked to ubotu
> - There is a fixed order of preference between them, with ubotu itself 
>   being leading
> - Code and datafiles (except users) are synchronized automatically
> - The copies do not have users and are in read-only mode (so no factoid 
>   editing)
> - During normal operation the copies only exist in #ubuntu-bots
> - The copies all run an extra plugin, FailOver, that will detect when 
>   ubotu or any copy leaves unexpectedly or comes back
> - When a copy becomes the first preferred copy, because ubotu (and 
>   possibly other copies) are unavailable, it will join all channels 
>   ubotu needs to be in. It will not assume the nickname ubotu
> - When ubotu is back in a channel, the copy of ubotu will automatically 
>   leave it.
> Thoughts, comments?

have all bots join the same irc server, if they "loose their primary 
server, they all have a secondary server, and they all part and ubotu is 
the only one to join all channels

ubotu dies

Have bots inc +1 each other, have the second bot sit in all channels, if 
it "sees" ubotu leave, it can assume role, if it sees "ubotu" rejoin it 
shuts up

if lagged there might be two answers for the min or so of lag time (max 
lag I have seen)

if bot no2. or lower dies,

bot three takes the position of number 2 and number two becomes lowest 

thus last fail becomes lowest number, if it is going to have a 
connection issue it may happen more than once

restoring order after some death of one or more bots
(for whatever reason)

one of the editors calls a "@reorder" command in the channel and 
whatever the predetermined listing kicks in

(copied from Dennis but with some comment perhaps implied but not said)
ubotu or replacement has a database error(S)

the "primary bot" echos on db error messages into the bot channel a 
trigger command,

a different bot becomes the master and the other ones retire, and reorder

What would be brilliant would be to have a "known good db" from a day 
eariler or two days eariler become the default and see if this restores 

(Dennis great idea)


More information about the Ubuntu-irc mailing list