<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
When Pacemaker calls the mysql script, it goes through this code:<br>
<pre wrap="">#######################################################################
# Initialization:
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat}
. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs
#######################################################################</pre>
Which (as it says) initializes some environment variables, then it can
work with the mysql RA (Resource Agent). <br>
<br>
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.<br>
<br>
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".<br>
<br>
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
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<a
href="http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=HEAD">http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=HEAD</a><br>
<br>
How to test them is simple, follow the
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<a href="http://www.linux-ha.org/LSBResourceAgent">http://www.linux-ha.org/LSBResourceAgent</a>
guideline, just reference the exit codes from the first link. <br>
<br>