[Pacemaker] Upgraded mysql from 5.0 to 5.1 - And changed to OCF RA

Jake Bogie jbogie at SureSource.com
Thu Jul 8 12:53:40 UTC 2010


Dan,

 

THANK YOU!

 

It's working!!

 

-          Jake

 

From: Dan Frincu [mailto:dfrincu at streamwide.ro] 
Sent: Thursday, July 08, 2010 4:20 AM
To: The Pacemaker cluster resource manager
Subject: Re: [Pacemaker] Upgraded mysql from 5.0 to 5.1 - And changed to
OCF RA

 

I think I didn't explain enough of the config, therefore the confusion.
There are 2 ways the script /usr/lib/ocf/resource.d/heartbeat/mysql is
called. First is by the cluster resource manager, Pacemaker, and second
is manually by you.

When Pacemaker calls the mysql script, it goes through this code:



#######################################################################
# Initialization:
 
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat}
. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs
 
#######################################################################

Which (as it says) initializes some environment variables, then it can
work with the mysql RA (Resource Agent). 

When you run the script, manually, you don't have to add the export
commands to the script, that _could_ mess it up when Pacemaker calls it,
you run the export commands from the shell, creating (in the current
shell) the environment that you need to test the mysql script. So,
remove the export lines from the script, as I can see from your output,
it seems that the script works OK with the mysql server.

But, when running a resource manually, either via mysql RA script or via
LSB init script, it doesn't mean Pacemaker is aware of this, therefore
when running "crm status", the resource doesn't show up. You check the
script manually to see if there are any issues in running it, then you
use the cluster resource manager to start the resource and check it from
"crm status".

I've also previously said "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
specification draft for the RA exit codes can be found at
http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.tx
t?rev=HEAD

How to test them is simple, follow the
http://www.linux-ha.org/LSBResourceAgent guideline, just reference the
exit codes from the first link. 


More information about the Pacemaker mailing list