[Pacemaker] ocf:heartbeat:mysql RA: op monitor

Oscar Remí­rez de Ganuza Satrústegui oscarrdg at unav.es
Wed Feb 10 09:31:52 UTC 2010


Hello,

Darren.Mansell at opengi.co.uk escribió:
> On Tue, 2010-02-09 at 17:01 +0100, Oscar Rem=C3=AD=C2=ADrez de Ganuza Satr=
> =C3=BAstegui
> wrote:
>   
>> Hello!
>> =20
>> I have one question regarding the ocf:heartbeat:mysql RA.
>> =20
>> I supposed that the following params defined on the resource were to=20
>> being used by the monitor operation to check the status of the mysql=20
>> service: test_passwd=3D"password" test_table=3D"ldirectord.connectionchec
>
> Very odd. The RA does the following:
>
> buf=3D`echo "SELECT * FROM $OCF_RESKEY_test_table" | mysql --user=3D$OCF_RE=
> SKEY_test_user --password=3D$OCF_RESKEY_test_passwd --socket=3D$OCF_RESKEY_=
> socket -O connect_timeout=3D1 2>&1`
>     rc=3D$?
>     if [ ! $rc -eq 0 ]; then
>         ocf_log err "MySQL $test_table monitor failed:";
>         if [ ! -z "$buf" ]; then ocf_log err $buf; fi
>         return $OCF_ERR_GENERIC;
>     else
>         ocf_log info "MySQL monitor succeded";
>         return $OCF_SUCCESS;
>     fi
>
> And if I kill the MySQL process on mine the monitor detects this. What's
> in your logs?
>
> Darren
>   
If I kill the processes (kill -KILL) mysqld_safe and mysqld, it is 
detected and the service restarted:

Feb 10 09:12:41 herculespre crmd: [2172]: info: process_lrm_event: LRM 
operation mysql-cun-service_monitor_30000 (call=25, rc=7, 
cib-update=164, confirmed=fa
lse) not running
Feb 10 09:12:41 herculespre crmd: [2172]: info: process_graph_event: 
Detected action mysql-cun-service_monitor_30000 from a different 
transition: 16 vs. 82
Feb 10 09:12:41 herculespre crmd: [2172]: info: abort_transition_graph: 
process_graph_event:462 - Triggered transition abort (complete=1, 
tag=lrm_rsc_op, id=
mysql-cun-service_monitor_30000, 
magic=0:7;8:16:0:7c59ebee-ec74-4752-aa54-4cecd982d0c9, cib=0.1139.5) : 
Old event
Feb 10 09:12:41 herculespre crmd: [2172]: WARN: update_failcount: 
Updating failcount for mysql-cun-service on herculespre after failed 
monitor: rc=7 (update=
value++, time=1265789561)
Feb 10 09:12:41 herculespre crmd: [2172]: info: do_state_transition: 
State transition S_IDLE -> S_POLICY_ENGINE [ input=I_PE_CALC 
cause=C_FSA_INTERNAL origin
=abort_transition_graph ]
...
*Stop:
Feb 10 09:12:41 herculespre crmd: [2172]: info: te_rsc_command: 
Initiating action 9: stop mysql-cun-service_stop_0 on herculespre (local)
Feb 10 09:12:41 herculespre pengine: [2170]: info: process_pe_message: 
Transition 85: PEngine Input stored in: /var/lib/pengine/pe-input-3906.bz2
Feb 10 09:12:41 herculespre crmd: [2172]: info: do_lrm_rsc_op: 
Performing key=9:85:0:7c59ebee-ec74-4752-aa54-4cecd982d0c9 
op=mysql-cun-service_stop_0 )
Feb 10 09:12:41 herculespre lrmd: [2166]: info: 
rsc:mysql-cun-service:27: stop
Feb 10 09:12:41 herculespre crmd: [2172]: info: process_lrm_event: LRM 
operation mysql-cun-service_monitor_30000 (call=25, status=1, 
cib-update=0, confirmed=true) Cancelled
Feb 10 09:12:41 herculespre crmd: [2172]: info: process_lrm_event: LRM 
operation mysql-cun-service_stop_0 (call=27, rc=0, cib-update=168, 
confirmed=true) ok
Feb 10 09:12:41 herculespre crmd: [2172]: info: match_graph_event: 
Action mysql-cun-service_stop_0 (9) confirmed on herculespre (rc=0)

*Start:
Feb 10 09:12:41 herculespre crmd: [2172]: info: te_rsc_command: 
Initiating action 36: start mysql-cun-service_start_0 on herculespre (local)
Feb 10 09:12:41 herculespre crmd: [2172]: info: do_lrm_rsc_op: 
Performing key=36:85:0:7c59ebee-ec74-4752-aa54-4cecd982d0c9 
op=mysql-cun-service_start_0 )
Feb 10 09:12:41 herculespre lrmd: [2166]: info: 
rsc:mysql-cun-service:28: start
Feb 10 09:12:45 herculespre lrmd: [2166]: info: RA output: 
(mysql-cun-service:start:stderr) logd is not running
Feb 10 09:12:45 herculespre mysql[31431]: INFO: MySQL started
Feb 10 09:12:45 herculespre lrmd: [2166]: info: RA output: 
(mysql-cun-service:start:stderr) 2010/02/10_09:12:45 INFO: MySQL started
Feb 10 09:12:45 herculespre crmd: [2172]: info: process_lrm_event: LRM 
operation mysql-cun-service_start_0 (call=28, rc=0, cib-update=169, 
confirmed=true) ok
Feb 10 09:12:45 herculespre crmd: [2172]: info: match_graph_event: 
Action mysql-cun-service_start_0 (36) confirmed on herculespre (rc=0)

So, the monitor operation is working ok if the mysql service is stopped 
(kill -KILL), but not if the service is "hung" (kill -SIGSTOP).
And that even withouth defining the test_user on the mysql server.
Very odd indeed.

Any idea how I can check the result of the SELECT monitor operation? Or 
some logs that could give me more information?

Thank you very much for you help anyway!!

Regards,

---
Oscar Remírez de Ganuza
Servicios Informáticos
Universidad de Navarra
Ed. de Derecho, Campus Universitario
31080 Pamplona (Navarra), Spain
tfno: +34 948 425600 Ext. 3130
http://www.unav.es/SI

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4422 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100210/a63ae40d/attachment-0004.bin>


More information about the Pacemaker mailing list