On 6/16/07, Andrew Beekhof <[EMAIL PROTECTED]> wrote:
On 6/15/07, Christian Rishøj <[EMAIL PROTECTED]> wrote:
> I have a 2-node symmetric cluster with a MySQL instance on each node
> performing circular (master-master) replication.
>
> I wrote a OCF-compliant resource script controlling and monitoring the
> replication thread in MySQL:
>
> Clone Set: replication
>     MySQLSlave:0        (cscd::ocf:MySQLSlave): Started ska
>     MySQLSlave:1        (cscd::ocf:MySQLSlave): Started dub
>
> (will post the script if it has any interest)
>
> Now, sometimes, e.g. when a server has been on standby for a while,
> the MySQL replication lacks behind for a while the MySQL instance is
> catching up. I let the OCF script report that the resource is running
> (as it is).
>
> However, I would like to migrate the IP on which queries are answered
> away from the node until it is completely up to date.
>
> I figure I can use the Seconds_Behind_Master variable from the MySQL
> replication thread in a location preference rule.
>
> So, how can I introduce an arbitrary value (Seconds_Behind_Master) in
> the CRM? Can the resource script introduce manipulate a variable in
> the CRM?

check out attrd and attrd_updater
then use that variable in your location rules

Elegant. Thank you.

Christian
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to