[Bucardo-general] MCP PID and automatic syncs

Goran Gugic goran.gugic at gmail.com
Wed Jun 17 18:06:39 UTC 2009

Hello to everyone again

I believe that PID written in /var/run/bucardo/bucardo.pid is a wrong one.
(Consequently also what is reported by bucardo_ctl status for 'PID of
Bucardo MCP').
As far as I can read the problem (not very far - I am very new to both
bucardo and Perl) this is due to the fact that the pid file is created
before forking in Bucardo.pm (see lines 660, writing to pid file, and then
on 669 fork which gets a new pid).

I tried to fix it and only mildy tested it by puting the ## Create a new pid
file section after the fork section. After this change the status reports
PID correctly.

Should I post this (trivial) patch here?

2) automatic syncs (swap)
I have also done some work on testing the connections in a way that might be
interesting - using Net::Ping, the syn variant, which checks if the port at
dbhost:dbport is open and can be set to timeout very quicky compared to the
timeout of the connect_database (which for me was at around 3 minutes for
hosts to which the route has been broken, which is the most common scenario
that I am trying to address).

My goal here is to have the syncs go up and down automatically depending on
the availability of the connections (so that one dropped connection does not
ruin a day for all the others) and that this works fairly quickly (times
should be comparable to typical time needed to fix simple connection problem
on the other end, which is at around 10-30 mins minimum).
Currently I am working around bucardo_ctl and have a simple daemon that
pings the secondary masters and if connections go down or up for the syncs
it manages (syncs which 'should be up') it will stop bucardo, mark their
status as inactive or active according to the state of the connection to the
host and start bucardo again.

This seems to work now and I am wondering - should I leave it to work around
bucardo_ctl or should I try to integrate with bucardo?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090617/c93b4722/attachment.html 

More information about the Bucardo-general mailing list