[Linux-ha-dev] Re: Patch for mysql OCF resource

Dejan Muhamedagic dejanmm at fastmail.fm
Tue Feb 12 08:21:30 MST 2008


Hi,

On Sun, Feb 10, 2008 at 05:23:59PM -0800, Narayan Newton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Well, that went nicely...I sent the wrong patch :).
> 
> Attached is the right patch, with the socket and pidfile entries for
> gentoo correct.

Thanks for the patch. Though I really dislike this defaults
tweaking business. Looks like every distribution and their
brother have different ideas about how to install mysql. If
somebody with mysql knowledge could reduce this set of OCF
variables it would be great. It's interesting that in no other, I
think at least, RA we have such a calamity of an environment.

Thanks,

Dejan

> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> 
> iD8DBQFHr6QyiZzbwJkJx6IRArqRAJ4ynXUobdX5dKbN6/RYg+vmjKA37ACdGAxB
> 5dLgJ7MnokfexihEGlIEhs4=
> =1p25
> -----END PGP SIGNATURE-----
> 
> On Feb 10, 2008 4:27 PM, Narayan Newton <nnewton at osuosl.org> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi all,
> >
> > It would appear I'm going to be using the MySQL OCF resource agent in
> > the near future, so I am starting to work on it a bit. The attached
> > patch adds defaults for gentoo and debian as well as fixing one of the
> > global defaults, "mysqld_safe" instead of "safe_mysqld".
> >
> > I'm rather new to the community, so please let me know if I have
> > violated a community standard right off the bat or if you prefer
> > patches submitted in a different way/form. :) Thanks!
> >
> > - --
> > Narayan Newton
> > Database Administrator
> > OSU Open Source Lab
> > GA Member Drupal Association
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (GNU/Linux)
> >
> > iD8DBQFHr5bqiZzbwJkJx6IRAjdWAKC+y5M3G3VCgX00zO2syI+2qfIxtgCfck0C
> > T08Kr+wjFgt+jJWm/+kcu+A=
> > =huzo
> > -----END PGP SIGNATURE-----
> >
> 
> 
> 
> -- 
> Narayan Newton
> Database Administrator
> OSU Open Source Lab
> GA Member Drupal Association

> diff -r 0ec715104599 resources/OCF/mysql
> --- a/resources/OCF/mysql	Sun Feb 10 12:23:31 2008 +0100
> +++ b/resources/OCF/mysql	Sun Feb 10 17:20:23 2008 -0800
> @@ -9,7 +9,8 @@
>  # Author:	Alan Robertson 		: DB2 Script
>  # Author:	Jakub Janczak  		: Rewrite as MySQL
>  # Author:	Andrew Beekhof 		: Cleanup and import
> -# Author:	Sebastian Reitenbach 	: add OpenBSD defaults, more cleanup
> +# Author:	Sebastian Reitenbach    : add OpenBSD defaults, more cleanup
> +# Author:  Narayan Newton      : Add Gentoo/Debian defaults
>  #
>  # Support:	linux-ha at lists.linux-ha.org
>  # License:	GNU General Public License (GPL)
> @@ -58,8 +59,36 @@ OCF_RESKEY_test_passwd_default=""
>  OCF_RESKEY_test_passwd_default=""
>  OCF_RESKEY_enable_creation_default=0
>  OCF_RESKEY_additional_parameters_default=""
> +elif [ -f "/etc/gentoo-release" ]; then
> +OCF_RESKEY_binary_default="/usr/bin/mysqld_safe"
> +OCF_RESKEY_config_default="/etc/mysql/my.cnf"
> +OCF_RESKEY_datadir_default="/var/lib/mysql"
> +OCF_RESKEY_user_default="mysql"
> +OCF_RESKEY_group_default="mysql"
> +OCF_RESKEY_log_default="/var/log/mysql/mysqld.err"
> +OCF_RESKEY_pid_default="/var/run/mysqld/mysqld.pid"
> +OCF_RESKEY_socket_default="/var/run/mysqld/mysqld.sock"
> +OCF_RESKEY_test_user_default="root"
> +OCF_RESKEY_test_table_default="mysql.user"
> +OCF_RESKEY_test_passwd_default=""
> +OCF_RESKEY_enable_creation_default=0
> +OCF_RESKEY_additional_parameters_default=""
> +elif [ -f "/etc/debian_version" ]; then
> +OCF_RESKEY_binary_default="/usr/bin/mysqld_safe"
> +OCF_RESKEY_config_default="/etc/mysql/my.cnf"
> +OCF_RESKEY_datadir_default="/var/lib/mysql"
> +OCF_RESKEY_user_default="mysql"
> +OCF_RESKEY_group_default="mysql"
> +OCF_RESKEY_log_default="/var/log/mysql.log"
> +OCF_RESKEY_pid_default="/var/run/mysqld/mysqld.pid"
> +OCF_RESKEY_socket_default="/var/run/mysqld/mysqld.sock"
> +OCF_RESKEY_test_user_default="root"
> +OCF_RESKEY_test_table_default="mysql.user"
> +OCF_RESKEY_test_passwd_default=""
> +OCF_RESKEY_enable_creation_default=0
> +OCF_RESKEY_additional_parameters_default=""
>  else
> -OCF_RESKEY_binary_default="/usr/bin/safe_mysqld"
> +OCF_RESKEY_binary_default="/usr/bin/mysqld_safe"
>  OCF_RESKEY_config_default="/etc/my.cnf"
>  OCF_RESKEY_datadir_default="/var/lib/mysql"
>  OCF_RESKEY_user_default="mysql"

> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/



More information about the Linux-HA-Dev mailing list