No subject


Mon Mar 29 03:57:18 EDT 2010


(exit
6), which means "program is not configured".=20



Jul  7 11:47:58 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster

Because the mysql-server primitive and/or the mysql RA were not properly
configured at the time the error message was written, it led to:




Jul  7 11:47:58 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)


Therefore, export the variables manually, check the exit codes on each
operation of the script, they should match normal operation as described
in the RA specification draft, if everything is OK, move on the the crm
shell, cleanup the mysql-server resource, cleanup the max failures (the
cluster resource manager keeps track of these, I've had to manually
remove everything from /var/lib/heartbeat/crm/*, haven't found a way to
clear this option, yet, and loaded the saved config with crm load
config.crm to have the cluster functional again).=20

Also keep in mind that the mysql RA script needs to be the same (as well
as /etc/my.cnf) on all cluster nodes, and even if Pacemaker propagates
the changes to all nodes via multicast, /var/lib/heartbeat/crm/* files
are placed on all cluster nodes as well. And the mysql RA script needs
to work the same way on all nodes.

And I'll stop, I've said enough already.

Cheers.


Jake Bogie wrote:=20

So I took Dan's advice this time and cleaned up my resource
configuration, updated the script, and verified...however I'm still not
getting the resource online...
=20
[root at qad01 heartbeat]# crm resource start mysql-server
[root at qad01 heartbeat]# crm status
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Last updated: Wed Jul  7 11:49:20 2010
Stack: openais
Current DC: qad01 - partition with quorum
Version: 1.0.9-89bd754939df5150de7cd76835f98fe90851b677
2 Nodes configured, 2 expected votes
3 Resources configured.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
Online: [ qad02 qad01 ]
=20
 Resource Group: mysql
     fs_mysql   (ocf::heartbeat:Filesystem):    Started qad01
     ip_mysql   (ocf::heartbeat:IPaddr2):       Started qad01
 Master/Slave Set: ms_drbd_mysql
     Masters: [ qad01 ]
     Slaves: [ qad02 ]
=20
Failed actions:
    mysql-server_start_0 (node=3Dqad01, call=3D6, rc=3D6, =
status=3Dcomplete):
not configured
=20
[root at qad01 heartbeat]# ./mysql start
mysql[5750]: DEBUG: MySQL is not running
mysql[5750]: DEBUG: MySQL is not running
100707 11:49:55 [Warning] option 'group_concat_max_len': unsigned value
0 adjusted to 4
100707 11:49:55 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
100707 11:49:55  InnoDB: highest supported file format is Barracuda.
100707 11:49:55  InnoDB: Warning: allocated tablespace 1, old maximum
was 0
100707 11:49:55 InnoDB Plugin 1.0.9 started; log sequence number
28732335894
100707 11:49:55 [Note] Event Scheduler: Loaded 0 events
100707 11:49:55 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.48-community'  socket: '/var/lib/mysql/mysql.sock'  port:
3306  MySQL Community Server (GPL)
mysql[5750]: INFO: MySQL started
[root at qad01 heartbeat]# ./mysql status
[root at qad01 heartbeat]# ./mysql monitor
[root at qad01 heartbeat]# ./mysql validate-all
[root at qad01 heartbeat]# crm status
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Last updated: Wed Jul  7 11:50:23 2010
Stack: openais
Current DC: qad01 - partition with quorum
Version: 1.0.9-89bd754939df5150de7cd76835f98fe90851b677
2 Nodes configured, 2 expected votes
3 Resources configured.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
Online: [ qad02 qad01 ]
=20
 Resource Group: mysql
     fs_mysql   (ocf::heartbeat:Filesystem):    Started qad01
     ip_mysql   (ocf::heartbeat:IPaddr2):       Started qad01
 Master/Slave Set: ms_drbd_mysql
     Masters: [ qad01 ]
     Slaves: [ qad02 ]
=20
Failed actions:
    mysql-server_start_0 (node=3Dqad01, call=3D6, rc=3D6, =
status=3Dcomplete):
not configured
[root at qad01 heartbeat]# ./mysql stop
100707 11:50:31 [Note] /usr/sbin/mysqld: Normal shutdown
=20
./mysql: line 426: (/1000)-5: syntax error: operand expected (error
token is "/1000)-5")
100707 11:50:31 [Note] Event Scheduler: Purging the queue. 0 events
100707 11:50:31  InnoDB: Starting shutdown...
[root at qad01 heartbeat]# 100707 11:50:36  InnoDB: Shutdown completed; log
sequence number 28732335904
100707 11:50:36 [Note] /usr/sbin/mysqld: Shutdown complete
=20
[root at qad01 heartbeat]#
=20
[root at qad01 heartbeat]# crm configure show mysql-server
primitive mysql-server ocf:heartbeat:mysql \
        op monitor interval=3D"30s" timeout=3D"30s" \
        op start interval=3D"0" timeout=3D"120" \
        op stop interval=3D"0" timeout=3D"120" \
        params binary=3D"/usr/sbin/mysqld" config=3D"/etc/my.cnf"
datadir=3D"/drbd/mysql/data/" user=3D"mysql" group=3D"mysql"
log=3D"/var/log/mysqld.log" pid=3D"/drbd/mysql/data/qadb.pid"
socket=3D"/var/lib/mysql/mysql.sock" test_user=3D"qaclus"
test_passwd=3D"isitup" test_table=3D"cluster_check.connectioncheck" \
        meta target-role=3D"Started"
=20
[root at qad01 heartbeat]# cat mysql
#!/bin/sh
#
#
# MySQL
#
# Description:  Manages a MySQL database as Linux-HA resource
=20
#
# 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:  Narayan Newton      : Add Gentoo/Debian defaults
#
# Support:      linux-ha at lists.linux-ha.org
# License:      GNU General Public License (GPL)
# Copyright:    (C) 2002 - 2005 International Business Machines, Inc.
#
# An example usage in /etc/ha.d/haresources:
#       node1  10.0.0.170 mysql
#
# See usage() function below for more details...
#
# OCF instance parameters:
#   OCF_RESKEY_binary
#   OCF_RESKEY_config
#   OCF_RESKEY_datadir
#   OCF_RESKEY_user
#   OCF_RESKEY_group
#   OCF_RESKEY_test_table
#   OCF_RESKEY_test_user
#   OCF_RESKEY_test_passwd
#   OCF_RESKEY_enable_creation
#   OCF_RESKEY_additional_parameters
#   OCF_RESKEY_log
#   OCF_RESKEY_pid
#   OCF_RESKEY_socket
#######################################################################
# Initialization:
=20
: ${OCF_FUNCTIONS_DIR=3D${OCF_ROOT}/resource.d/heartbeat}
. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs
=20
#######################################################################
=20
# Added exports
export OCF_ROOT=3D/usr/lib/ocf/
export OCF_RESKEY_binary_default=3D"/usr/sbin/mysqld"
export OCF_RESKEY_config_default=3D"/etc/my.cnf"
export OCF_RESKEY_datadir_default=3D"/drbd/mysql/data"
export OCF_RESKEY_user_default=3D"mysql"
export OCF_RESKEY_group_default=3D"mysql"
export OCF_RESKEY_log_default=3D"/var/log/mysqld.log"
export OCF_RESKEY_pid_default=3D"/drbd/mysql/data/qadb.pid"
export OCF_RESKEY_socket_default=3D"/var/lib/mysql/mysql.sock"
export OCF_RESKEY_test_user_default=3D"qaclus"
export OCF_RESKEY_test_table_default=3D"cluster_check.connectioncheck"
export OCF_RESKEY_test_passwd_default=3D"isitup"
=20
# Fill in some defaults if no values are specified
HOSTOS=3D`uname`
if [ "X${HOSTOS}" =3D "XOpenBSD" ];then
OCF_RESKEY_binary_default=3D"/usr/local/bin/mysqld_safe"
OCF_RESKEY_config_default=3D"/etc/my.cnf"
OCF_RESKEY_datadir_default=3D"/var/mysql"
OCF_RESKEY_user_default=3D"_mysql"
OCF_RESKEY_group_default=3D"_mysql"
OCF_RESKEY_log_default=3D"/var/log/mysqld.log"
OCF_RESKEY_pid_default=3D"/var/mysql/mysqld.pid"
OCF_RESKEY_socket_default=3D"/var/run/mysql/mysql.sock"
OCF_RESKEY_test_user_default=3D"root"
OCF_RESKEY_test_table_default=3D"mysql.user"
OCF_RESKEY_test_passwd_default=3D""
OCF_RESKEY_enable_creation_default=3D0
OCF_RESKEY_additional_parameters_default=3D""
else
OCF_RESKEY_binary_default=3D"/usr/sbin/mysqld"
OCF_RESKEY_config_default=3D"/etc/my.cnf"
OCF_RESKEY_datadir_default=3D"/drbd/mysql/data"
OCF_RESKEY_user_default=3D"mysql"
OCF_RESKEY_group_default=3D"mysql"
OCF_RESKEY_log_default=3D"/var/log/mysqld.log"
OCF_RESKEY_pid_default=3D"/drbd/mysql/data/qadb.pid"
OCF_RESKEY_socket_default=3D"/var/lib/mysql/mysql.sock"
OCF_RESKEY_test_user_default=3D"qaclus"
OCF_RESKEY_test_table_default=3D"cluster_check.connectioncheck"
OCF_RESKEY_test_passwd_default=3D"isitup"
OCF_RESKEY_enable_creation_default=3D0
OCF_RESKEY_additional_parameters_default=3D""
Fi
=20
[root at qad01 heartbeat]# cat /var/log/messages | grep mysql-server
Jul  7 11:43:38 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:43:38 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:43:38 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:43:38 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:43:38 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:43:38 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:43:38 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:47:58 qad01 crmd: [4360]: info: abort_transition_graph:
te_update_diff:267 - Triggered transition abort (complete=3D1,
tag=3Dlrm_rsc_op, id=3Dmysql-server_monitor_0,
magic=3D0:7;7:0:7:e87a73c4-97b8-4f63-9e69-89ec59fce708, cib=3D0.287.3) :
Resource op removal
Jul  7 11:47:58 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:47:58 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:47:58 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:47:58 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:47:58 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:47:58 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:47:58 qad01 attrd: [4358]: info: attrd_trigger_update: Sending
flush op to all hosts for: fail-count-mysql-server (INFINITY)
Jul  7 11:47:58 qad01 attrd: [4358]: info: attrd_trigger_update: Sending
flush op to all hosts for: last-failure-mysql-server (1278516515)
Jul  7 11:47:58 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:47:58 qad01 crmd: [4360]: info: te_rsc_command: Initiating
action 7: monitor mysql-server_monitor_0 on qad02
Jul  7 11:47:58 qad01 crmd: [4360]: info: match_graph_event: Action
mysql-server_monitor_0 (7) confirmed on qad02 (rc=3D0)
Jul  7 11:47:58 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:47:58 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:47:58 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:47:58 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:47:58 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:47:58 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:47:58 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:48:01 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:48:01 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:48:01 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:48:01 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:48:01 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:48:01 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:48:01 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:48:10 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:48:10 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:48:10 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:48:10 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:48:10 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:48:10 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:48:10 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:48:11 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:48:11 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:48:11 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:48:11 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:48:11 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:48:11 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:48:11 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
Jul  7 11:48:26 qad01 pengine: [4359]: ERROR: unpack_rsc_op: Hard error
- mysql-server_start_0 failed with rc=3D6: Preventing mysql-server from
re-starting anywhere in the cluster
Jul  7 11:48:26 qad01 pengine: [4359]: WARN: unpack_rsc_op: Processing
failed op mysql-server_start_0 on qad01: not configured (6)
Jul  7 11:48:26 qad01 pengine: [4359]: notice: native_print:
mysql-server       (ocf::heartbeat:mysql): Stopped
Jul  7 11:48:26 qad01 pengine: [4359]: info: get_failcount: mysql-server
has failed INFINITY times on qad01
Jul  7 11:48:26 qad01 pengine: [4359]: WARN: common_apply_stickiness:
Forcing mysql-server away from qad01 after 1000000 failures
(max=3D1000000)
Jul  7 11:48:26 qad01 pengine: [4359]: info: native_color: Resource
mysql-server cannot run anywhere
Jul  7 11:48:26 qad01 pengine: [4359]: notice: LogActions: Leave
resource mysql-server  (Stopped)
___
=20
Message: 7
Date: Wed, 07 Jul 2010 12:55:51 +0300
From: Dan Frincu <dfrincu at streamwide.ro> <mailto:dfrincu at streamwide.ro>=20
To: The Pacemaker cluster resource manager
        <pacemaker at oss.clusterlabs.org>
<mailto:pacemaker at oss.clusterlabs.org>=20
Subject: Re: [Pacemaker] Upgraded mysql from 5.0 to 5.1
Message-ID: <4C344F27.1060707 at streamwide.ro>
<mailto:4C344F27.1060707 at streamwide.ro>=20
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed
=20
Have you copied twice this line?
=20
socket=3D"/var/lib/mysql/mysql.sock" binary=3D"/usr/sbin/mysqld"
socket=3D"/var/lib/mysql/mysql.sock" binary=3D"/usr/sbin/mysqld"
=20
I think so. Regardless, to test a resource agent manually requires that=20
you define some variables and then call the script by hand. Also, check=20
all the actions (start,stop,restart,promote,etc) and their exit codes,=20
to see if they match the OCF RA specification. Most of the problems that
=20
you will have with a resource agent and it's resource can be found if=20
you're manually testing the RA script.
=20
Go to /usr/lib/ocf/resource.d/heartbeat/
Open the mysql RA script. Go to line 63 and starting from that line=20
update the values in the script to match the contents of /etc/my.cnf.=20
Then update the crm configure for the primitive mysql-server to match as
=20
well.
 From what I remember, the values in=20
OCF_RESKEY_{binary_default,pid_default,socket_default} are wrong in the=20
RA script vs what's actually installed.
=20
Then "export OCF_ROOT=3D/usr/lib/ocf/" and all OCF_RESKEY_* with their=20
defined values, then call the script with no parameters. It should=20
provide the usage of the script. Then take step by step each action and=20
check it's exit code, see if it matches the OCF RA specification, and=20
also check to see if it actually starts the resource or not. The thing=20
is, once the script works as it should, all the issues have been=20
resolved, the cluster will work with the mysql-server resource.
=20
Regards,
Dan
=20
Jake Bogie wrote:
 =20

	So I took Raoul's advice and ditched the lsb:mysql check and
went for
	the ocf:heartbeat version however...
	=20
	I'm getting this now...
	=20
	What am I missing? I'm having a hard time finding a document on
how to
	setup this resource agent.
	=20
	=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
	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.
	=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
	=20
	Online: [ qad02 qad01 ]
	=20
	 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 ]
	=20
	Failed actions:
	    mysql-server_start_0 (node=3Dqad01, call=3D6, rc=3D6,
status=3Dcomplete):
	not configured
	    mysql-server_start_0 (node=3Dqad02, call=3D33, rc=3D5,
status=3Dcomplete):
	not installed
	=20
	###
	=20
	primitive mysql-server ocf:heartbeat:mysql \
	        op monitor interval=3D"30s" timeout=3D"30s" \
	        op start interval=3D"0" timeout=3D"120" \
	        op stop interval=3D"0" timeout=3D"120" \
	        params config=3D"/etc/my.cnf" datadir=3D"/drbd/mysql/data/"
	socket=3D"/var/lib/mysql/mysql.sock" binary=3D"/usr/sbin/mysqld"
	socket=3D"/var/lib/mysql/mysql.sock" binary=3D"/usr/sbin/mysqld"
	pid=3D"/drbd/mysql/data/mysql.pid" test_passwd=3D"isitup"
	test_table=3D"cluster_check.connectioncheck" test_user=3D"qaclus" \
	=20
	_______________________________________________
	Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
	http://oss.clusterlabs.org/mailman/listinfo/pacemaker
	=20
	Project Home: http://www.clusterlabs.org
	Getting started:
	   =20

http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
 =20

	Bugs:
	   =20

http://developerbugs.linux-foundation.org/enter_bug.cgi?product=3DPacemak=
e
r
 =20

	 =20
	   =20

=20
 =20





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

------_=_NextPart_001_01CB1E9C.96FA31BE
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:p=3D"urn:schemas-microsoft-com:office:powerpoint" =
xmlns:a=3D"urn:schemas-microsoft-com:office:access" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:s=3D"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" =
xmlns:rs=3D"urn:schemas-microsoft-com:rowset" xmlns:z=3D"#RowsetSchema" =
xmlns:b=3D"urn:schemas-microsoft-com:office:publisher" =
xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadsheet" =
xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" =
xmlns:odc=3D"urn:schemas-microsoft-com:office:odc" =
xmlns:oa=3D"urn:schemas-microsoft-com:office:activation" =
xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" =
xmlns:rtc=3D"http://microsoft.com/officenet/conferencing" =
xmlns:D=3D"DAV:" xmlns:Repl=3D"http://schemas.microsoft.com/repl/" =
xmlns:mt=3D"http://schemas.microsoft.com/sharepoint/soap/meetings/" =
xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2003/xml" =
xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" =
xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" =
xmlns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/directory/" =
xmlns:ds=3D"http://www.w3.org/2000/09/xmldsig#" =
xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint/dsp" =
xmlns:udc=3D"http://schemas.microsoft.com/data/udc" =
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:sub=3D"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/"=
 xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#" =
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" =
xmlns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/soap" =
xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" =
xmlns:udcp2p=3D"http://schemas.microsoft.com/data/udc/parttopart" =
xmlns:wf=3D"http://schemas.microsoft.com/sharepoint/soap/workflow/" =
xmlns:dsss=3D"http://schemas.microsoft.com/office/2006/digsig-setup" =
xmlns:dssi=3D"http://schemas.microsoft.com/office/2006/digsig" =
xmlns:mdssi=3D"http://schemas.openxmlformats.org/package/2006/digital-sig=
nature" =
xmlns:mver=3D"http://schemas.openxmlformats.org/markup-compatibility/2006=
" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns:mrels=3D"http://schemas.openxmlformats.org/package/2006/relationshi=
ps" xmlns:spwp=3D"http://microsoft.com/sharepoint/webpartpages" =
xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/2006/types"=
 =
xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/2006/messag=
es" =
xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/=
" =
xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPortalServer/Pub=
lishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" =
xmlns:st=3D"&#1;" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	color:black;}
span.apple-style-span
	{mso-style-name:apple-style-span;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 @list l0
	{mso-list-id:2008551189;
	mso-list-type:hybrid;
	mso-list-template-ids:-1796034716 -961787110 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Calibri","sans-serif";
	mso-fareast-font-family:Calibri;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DWordSection1>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dan,<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>THANK YOU!<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It&#8217;s working!!<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l0 =
level1 lfo1'><![if !supportLists]><span
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><span
style=3D'mso-list:Ignore'>-<span style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span =
style=3D'font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Jake<o:p></o:p></span></p>

<p class=3DMsoNormal><a name=3D"_MailEndCompose"><span =
style=3D'font-size:10.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span=
></a></p>

<div>

<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt =
0in 0in 0in'>

<p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span =
style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Dan Frincu
[mailto:dfrincu at streamwide.ro] <br>
<b>Sent:</b> Thursday, July 08, 2010 4:20 AM<br>
<b>To:</b> The Pacemaker cluster resource manager<br>
<b>Subject:</b> Re: [Pacemaker] Upgraded mysql from 5.0 to 5.1 - And =
changed to
OCF RA<o:p></o:p></span></p>

</div>

</div>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>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>
<br>
<o:p></o:p></p>

<pre>####################################################################=
###<o:p></o:p></pre><pre># =
Initialization:<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>: =
${OCF_FUNCTIONS_DIR=3D${OCF_ROOT}/resource.d/heartbeat}<o:p></o:p></pre><=
pre>. =
${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs<o:p></o:p></pre><pre><o:p>&nbsp;</o:=
p></pre><pre>############################################################=
###########<o:p></o:p></pre>

<p class=3DMsoNormal>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
&quot;crm status&quot;, 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 &quot;crm
status&quot;.<br>
<br>
I've also previously said &quot;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&quot;. The specification =
draft
for the RA exit codes can be found at <a
href=3D"http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent=
-api.txt?rev=3DHEAD">http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/r=
esource-agent-api.txt?rev=3DHEAD</a><br>
<br>
How to test them is simple, follow the <a
href=3D"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>


More information about the Pacemaker mailing list