Monday, February 02, 2009

MySQL Sandbox 2.0.13 with improved features

MySQL Sandbox

MySQL Sandbox 2.0.13 was just released, with two main improvements.
  • Now the sandbox looks for gtar before looking for tar. If it is installed, it uses it. This allows the Sandbox successfully expanding and installing from a tarball on Solaris, where the native tar tool has always been source of problems for MySQL.
  • The start and restart scripts now accept a parameter. Anything passed to them from the command line will be added to mysqld_safe invocation. This allows quick tests with unusual parameters, without need of changing the configuration file.

These features are useful for benchmarks. I will soon write a quick guide on how to use the Sandbox for multiple versions tests.


Darren Cassar said...

Hi Giuseppe,

tar is truly a common problem on solaris for auto installation, but I guess it is easier to get around it by:
dcassar@mysqlpreacher $ gunzip < mysql-5.1.30-solaris10-sparc-64bit.tar.gz | tar xf -
dcassar@mysqlpreacher $ ln -s mysql-5.1.30-solaris10-sparc-64bit.tar 5.1.30

and using the ./make_replication_sandbox 5.1.30 which works brilliantly on my solaris sparc box

Giuseppe Maxia said...

yes, I know of this workaround, of course.
It doesn't help when you want to quick test a binary distribution. The purpose of the Sandbox is to make you completely lazy. If I can avoid the two steps you mentioned (which make_sandbox does), I would be happier!


Darren Cassar said...

Hi again,
I had no doubt you did know about the workaround but not everybody duess I guess :).
I'm not much of a dev myself but wouldn't it be possible to check uname and if OS is found to be solaris just make the `make_replication_sandbox` do a gunzip < mysql-x.x.xx-solaris10-sparc-64bit.tar.gz | tar xf - itself?

the lazier the better right? :)


Giuseppe Maxia said...

if you look at the code for make_sandbox, you will see that this is exactly what it does.
The problem is that the native "tar" has problems with longlinks, and doesn't handle them graciously.
"gtar", instead, doesn't complain at all.
If your "tar" is dynamically linked to "gtar", then you wouldn't have problems even in previous versions.


René Leonhardt said...

First of all many thanks for these wonderful scripts, they make setting up replication scenarios very easy!

I found 2 problems in MySQL Sandbox 2.0.15:
In contrast to make_sandbox, make_replication_sandbox does not take --upper_directory into account.

Instead, only SANDBOX_HOME will be used if available, otherwise the default /root/sandboxes is used.

In addition, there is no default interactive "do you agree? ([Y],n)" like with make_sandbox, wich is very useful to control the parameter interpretation.

And the last point: you still do not want to install, move or rewrite installed files in order to (prepare) remote server deployments? :)

Giuseppe Maxia said...

Thanks for your comments.
About make_replication_sandbox and upper_directory, can you file a bug with an example? this script is supposed to take upper_directory into account. Make sure that you include the desired result and the actual result in your report.

Interactivity for group installation can be done. I opened a blueprint for this task.

Remote installation is in the blueprints, but I will need help and time to complete it. Patches are welcome!