[Debian-ha-maintainers] Bug#691397: heartbeat/mysql: mysql_monitor use wrong program and options for MySQL 5.5.27 binary installation

Gang Chen goncha at gmail.com
Thu Oct 25 06:41:43 UTC 2012


Package: cluster-agents
Version: 1:1.0.3-3.1
Severity: important
Tags: squeeze



-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Hi,

I installed a mysql 5.5.27 binary bundle (from mysql official site) in
/opt/mysql. Its not a standard install location for heartbeat/mysql. So mysql
cannot be started by LRM. I found heartbeat/mysql's mysql_monitor function use
wrong means to run test query, it runs `mysql' in PATH and modern has no `-O'
option.

Patch is here:

--- /usr/lib/ocf/resource.d/heartbeat/mysql.orig        2012-10-25
13:16:28.000000000 +0800
+++ /usr/lib/ocf/resource.d/heartbeat/mysql     2012-10-25
13:43:38.000000000 +0800
@@ -306,7 +306,7 @@
     fi

     # Do a detailed status check
-    buf=`echo "SELECT * FROM $OCF_RESKEY_test_table" | mysql
--user=$OCF_RESKEY_test_user --password=$OCF_RESKEY_test_passwd
--socket=$OCF_RESKEY_socket -O connect_timeout=1 2>&1`
+    buf=`echo "SELECT * FROM $OCF_RESKEY_test_table" |
$MYSQL_BINDIR/mysql --user=$OCF_RESKEY_test_user
--password=$OCF_RESKEY_test_passwd --socket=$OCF_RESKEY_socket
--connect-timeout=1 2>&1`
     rc=$?
     if [ ! $rc -eq 0 ]; then
        ocf_log err "MySQL $test_table monitor failed:";



More information about the Debian-ha-maintainers mailing list