using network based replication sandboxes

Asked by Ramon on 2009-07-16


I'm testing a set of scripts that will allow replication failover in a complex replication setup.
In the real-world these scripts operate on master(s)-slave(s) setups that all have a seperate ip address, the slaves are loadbalanced using ipvs / keepalived, we always deploy two masters, one as active master the other as hot-standby.
Each master would have a slavegroup assigned to it, in some cases we deal with intermediate masters which are also slaves for a subset of data coming from a different database servergroup.

I would very much like to use mysql-sandbox as a testing tool, it's great. And would reduce the requirements for my testing environment to basically zero / a single machine.

However to avoid large amount of wrapper code for the current python classes this would involve attaching a separate ipaddress to each mysql-instance in a sandbox.

Is this possible at all ? I had a quick and very superficial look through the sourcecode and the concept of starting different servers on different ports but the same ip-address seems fairly central to the entire codebase.

Ideally I'd start every instance on a additional address in the range on the same port.
For example:
 + master1 ->
 + master2 -> (replicating off master1)
 + slave1 -> (replicating off master1)
 + slave2 -> (replicating off master1)
 + slave3 -> (replicating off master2)
 + slave4 -> (replicating off master2)

In this setup I would have an easy testing scenario by modifying the /etc/hosts file on the test-machine to match staging/production.

Any suggestions to map this problem into the current sandbox setup would be greatly appreciated.


Ramon van Alteren

Question information

English Edit question
MySQL Sandbox Edit question
No assignee Edit question
Last query:
Last reply:

Thanks for your interest in MySQL Sandbox.
I certainly want to improve its features and make it possible to have replication nodes in several hosts. My first successful attempt at this task is explained in my blog:

Enhancing the Sandbox to accept several IPs is not difficult. The HOST is referred only in two places: in the template to use a single sandbox, and in the script that defines the replication rules. More complicated is the actual installation of the remote sandboxes, task that I have tried to accomplish in the above blog post.

I will certainly tackle the problem and try to come up with a general purpose solution. Probably the best course of action is decoupling the sandbox from Gearman, and let the user define how to do the practical installation.

There is also another effort to enhance MySQL Sandbox, which probably would meet your needs.

Please join the mailing list and discuss this matter there.



Can you help with this problem?

Provide an answer of your own, or ask Ramon for more information if necessary.

To post a message you must log in.