Bug 743974 - resource agent for mysql, monitor action generates false error messages
Summary: resource agent for mysql, monitor action generates false error messages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents
Version: 6.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 756082
TreeView+ depends on / blocked
 
Reported: 2011-10-06 15:52 UTC by schurzi
Modified: 2012-03-27 17:58 UTC (History)
5 users (show)

Fixed In Version: resource-agents-3.9.2-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-27 20:43:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description schurzi 2011-10-06 15:52:56 UTC
Description of problem:
The MySQL resource agent logs a lot of error messages to the system log. These messages are generated by the monitor action. 
--- snip ---
Oct  6 17:35:57 HOST lrmd: [1513]: info: RA output: (rsc_core_mysql:0:monitor:stderr) ERROR
Oct  6 17:35:57 HOST lrmd: [1513]: info: RA output: (rsc_core_mysql:0:monitor:stderr)  1045 (28000)
Oct  6 17:35:57 HOST lrmd: [1513]: info: RA output: (rsc_core_mysql:0:monitor:stderr) : Access denied for user 'root'@'localhost' (using password: NO)
--- snip ---

There is a configuration which controlls if the script will log in to mysql or just execute a PID check (kill -0). This option does not fully work in the shipped implementation. A bugfix was released upstream:
https://github.com/ClusterLabs/resource-agents/commit/259cb54f1a47a527085e3138955b4cc26b62d37c

Version-Release number of selected component (if applicable):
resource-agents-3.0.12-15.el6.x86_64

How reproducible:
create a simple cluster (a single node is enough)

create a mysql resource
primitive rsc_mysql ocf:heartbeat:mysql \
  params binary="..." client_binary="..." config="/etc/my.cnf" pid="..." socket="..." datadir="..." user="mysql" group="mysql" \
  op monitor interval="30s" timeout="70s" depth="0" \
  op start interval="0" timeout="120s" \
  op stop interval="0" timeout="120s"

Set a password for the mysql root user.

Actual results:
in syslog:
Oct  6 17:44:30 HOST mysql[25802]: INFO: MySQL monitor succeeded
Oct  6 17:44:58 HOST lrmd: [1513]: info: RA output: (rsc_x3_mysql:0:monitor:stderr) ERROR
Oct  6 17:44:58 HOST lrmd: [1513]: info: RA output: (rsc_x3_mysql:0:monitor:stderr)  1045 (28000)
Oct  6 17:44:58 HOST lrmd: [1513]: info: RA output: (rsc_x3_mysql:0:monitor:stderr) : Access denied for user 'root'@'localhost' (using password: NO)

Expected results:
in syslog:
Oct  6 17:44:30 HOST mysql[25802]: INFO: MySQL monitor succeeded

Additional info:
The resource agent for MySQL (/usr/lib/ocf/resource.d/heartbeat/mysql) can monitor a MySQL Server with a simple PID check and a more complex SQL Query. For the SQL query to work you have to specify a username and a password which the script uses to access mysql. You can chose, if you want to execute the SQL check by setting $OCF_CHECK_LEVEL to a Value > 0. This should disable all SQL based checks.

Comment 2 RHEL Program Management 2011-10-07 16:04:10 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 7 Chris Feist 2012-02-27 20:43:04 UTC
This should already be fixed in resource-agents-3.9.2-7.el6 (which was in RHEL-6.2).  Please let me know if you're still having issues with this bz.


Note You need to log in before you can comment on or make changes to this bug.