[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=
=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=
k"=20
> test_user=3D"servicecheck"
> And that's what the crm is telling me:
>=20
> * 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)
>=20
> 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.
>=20
> How can they be used to check the status of the mysql service?
>=20
> Thanks very much again!!
>=20
> ---
> 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`
    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
-------------- 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