[Pacemaker] Upgraded mysql from 5.0 to 5.1

Dan Frincu dfrincu at streamwide.ro
Wed Jul 7 05:55:51 EDT 2010


Have you copied twice this line?

socket="/var/lib/mysql/mysql.sock" binary="/usr/sbin/mysqld"
socket="/var/lib/mysql/mysql.sock" binary="/usr/sbin/mysqld"

I think so. Regardless, to test a resource agent manually requires that 
you define some variables and then call the script by hand. Also, check 
all the actions (start,stop,restart,promote,etc) and their exit codes, 
to see if they match the OCF RA specification. Most of the problems that 
you will have with a resource agent and it's resource can be found if 
you're manually testing the RA script.

Go to /usr/lib/ocf/resource.d/heartbeat/
Open the mysql RA script. Go to line 63 and starting from that line 
update the values in the script to match the contents of /etc/my.cnf. 
Then update the crm configure for the primitive mysql-server to match as 
well.
 From what I remember, the values in 
OCF_RESKEY_{binary_default,pid_default,socket_default} are wrong in the 
RA script vs what's actually installed.

Then "export OCF_ROOT=/usr/lib/ocf/" and all OCF_RESKEY_* with their 
defined values, then call the script with no parameters. It should 
provide the usage of the script. Then take step by step each action and 
check it's exit code, see if it matches the OCF RA specification, and 
also check to see if it actually starts the resource or not. The thing 
is, once the script works as it should, all the issues have been 
resolved, the cluster will work with the mysql-server resource.

Regards,
Dan

Jake Bogie wrote:
> So I took Raoul's advice and ditched the lsb:mysql check and went for
> the ocf:heartbeat version however...
>
> I'm getting this now...
>
> What am I missing? I'm having a hard time finding a document on how to
> setup this resource agent.
>
> ============
> Last updated: Tue Jul  6 12:44:07 2010
> Stack: openais
> Current DC: qad02 - partition with quorum
> Version: 1.0.9-89bd754939df5150de7cd76835f98fe90851b677
> 2 Nodes configured, 2 expected votes
> 3 Resources configured.
> ============
>
> Online: [ qad02 qad01 ]
>
>  Resource Group: mysql
>      fs_mysql   (ocf::heartbeat:Filesystem):    Started qad02
>      ip_mysql   (ocf::heartbeat:IPaddr2):       Started qad02
>  Master/Slave Set: ms_drbd_mysql
>      Masters: [ qad02 ]
>      Slaves: [ qad01 ]
>
> Failed actions:
>     mysql-server_start_0 (node=qad01, call=6, rc=6, status=complete):
> not configured
>     mysql-server_start_0 (node=qad02, call=33, rc=5, status=complete):
> not installed
>
> ###
>
> primitive mysql-server ocf:heartbeat:mysql \
>         op monitor interval="30s" timeout="30s" \
>         op start interval="0" timeout="120" \
>         op stop interval="0" timeout="120" \
>         params config="/etc/my.cnf" datadir="/drbd/mysql/data/"
> socket="/var/lib/mysql/mysql.sock" binary="/usr/sbin/mysqld"
> socket="/var/lib/mysql/mysql.sock" binary="/usr/sbin/mysqld"
> pid="/drbd/mysql/data/mysql.pid" test_passwd="isitup"
> test_table="cluster_check.connectioncheck" test_user="qaclus" \
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>   

-- 
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania
E-mail: dfrincu at streamwide.ro
Phone: +40 (0) 21 320 41 24





More information about the Pacemaker mailing list