Mysql active/active cluster cookbook


#1

Hello,

I’m looking for a work base to check sync of an
active/active mysql cluster and redo the sync in case one of the node is
unsync.

If someone has any clue about it :wink:

Thanks in advance,

Tensibai


#2

On Thu, Nov 3, 2011 at 3:28 PM, Tensibai tensibai@iabis.net wrote:

I’m looking for a work base to check sync of an active/active mysql cluster
and redo the sync in case one of the node is unsync.

Hi Tensibai,

am I correct in understanding that you’d like a recipe that rebuilds a
MySQL master-master replication after failing? That doesn’t look like
a trivial task because you’d need to have the two nodes exchange data
and status while rebuilding (e.g., lock the database on one node while
setting the new replication start point on the other).

(And I’m not sure if I’d want this kind of self-healing in the first
place, but that’s another discussion.)

Best regards,
Jochen


#3

On Fri, 4 Nov 2011 23:06:59 +0100, Jochen Lillich wrote:

On Thu, Nov 3, 2011 at 3:28 PM, Tensibai wrote:

I’m looking for a work base to check sync of an active/active mysql
cluster and redo the sync in case one of the node is unsync.
Hi Tensibai, am I correct in understanding that you’d like a recipe
that rebuilds a MySQL master-master replication after failing? That
doesn’t look like a trivial task because you’d need to have the two
nodes
exchange data and status while rebuilding (e.g., lock the database on
one
node while setting the new replication start point on the other).

(And I’m not sure if I’d want this kind of self-healing in the first
place, but that’s another discussion.) Best regards, Jochen

HI Jochen,

You’re correct on the understanding, and I agree the repair should not
be automatic.
I’m more thinking about a node attribute ‘need_resync_db’ I would set
to the DB needed resync once verified which node is out of sync.

For the consistency check I though about a recipe using maatkit to
check consistency and alerting/listing when there’s a problem and a
recipe doing the resync (lock, dump, reload) and reseting the node
attribute once done.

I just wonder if there’s something already existing or if I should
write it on my own.
As I’m really new to chef I try not to reinvent the wheel and I’m
pretty sure I don’t know some helpfull cookbook sources :slight_smile:

Thanks for your answer

Tensibai


#4

On Nov 7, 2011, at 2:31 AM, Tensibai wrote:

I just wonder if there’s something already existing or if I should write it on my own.
As I’m really new to chef I try not to reinvent the wheel and I’m pretty sure I don’t know some helpfull cookbook sources :slight_smile:

From what I’ve seen, the first place is to look in the official Opscode cookbooks. From there, try github – although the Opscode cookbooks are available on github, there’s lots of other stuff that is also on github that might be potentially useful. Just keep in mind that there’s also a fair amount of crap on github, too.

If you stick to the people who have contributed stuff to the official Opscode cookbooks, then you’re probably pretty safe – that stuff is likely to be relatively good quality but maybe just not yet ready for broad publication. In that case, I would be inclined to send a message to the author(s) and talk to them about what you found in their code and talk to them in more depth.

This list and #chef on irc.freenode.net are also good sources.


Brad Knowles bknowles@ihiji.com
SAGE Level IV, Chef Level 0.0.1