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

Darren.Mansell at opengi.co.uk Darren.Mansell at opengi.co.uk
Tue Feb 9 12:01:25 EST 2010

On Tue, 2010-02-09 at 17:01 +0100, Oscar Rem=C3=AD=C2=ADrez de Ganuza Satr=
> Hello!
> I have one question regarding the ocf:heartbeat:mysql RA.
> 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=
> test_user=3D"servicecheck"
> And that's what the crm is telling me:
> * test_user (string, [root]): MySQL test user
>     MySQL test user
> * test_passwd (string): MySQL test user password
>     MySQL test user password
> * test_table (string, [mysql.user]): MySQL test table
>     Table to be tested in monitor statement (in database.table notation)
> But in my tests, they are not working as expected: they are always=20
> telling me that the service is ok, even if i do not have the user=20
> "servicecheck" defined on the database, and also if I "stop" (kill=20
> -SIGSTOP) the mysql process.
> How can they be used to check the status of the mysql service?
> Thanks very much again!!
> ---
> Oscar Rem=C3=ADrez de Ganuza
> Servicios Inform=C3=A1ticos
> Universidad de Navarra
> Ed. de Derecho, Campus Universitario
> 31080 Pamplona (Navarra), Spain
> tfno: +34 948 425600 Ext. 3130
> http://www.unav.es/SI

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`
    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;
        ocf_log info "MySQL monitor succeded";
        return $OCF_SUCCESS;

And if I kill the MySQL process on mine the monitor detects this. What's
in your logs?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3071 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100209/5f1f6024/attachment-0003.bin>

More information about the Pacemaker mailing list