Hi, I'm neither sure if this is the right place to post this, nor if I'm doing it right this way, nor even if not maybe somebody else allready mentioned it... but: While "ERROR"-grep'ing my log, i found the MySQL-RA (shipped with SLES11SP1, kept up-to-date) throwing a message like this with every single call of the monitor action:
> Sep 23 15:19:16 nde35 lrmd: [2843]: info: RA output: (mysql:monitor:stderr) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Actually that error isn't even wrong, because we also set a password in MySQL for r...@localhost; a not too uncommon scenario, I'd guess, so that's why I'm writing this post. On tracking it down, I found these lines in the MySQL-RA: >[...] >MYSQL_OPTIONS_LOCAL="-S $OCF_RESKEY_socket --connect_timeout=1" >MYSQL_OPTIONS_REPL="--user=$OCF_RESKEY_replication_user --password=$OCF_RESKEY_replication_passwd" >[...] >is_slave() { > [...] > mysql_options="$MYSQL_OPTIONS_LOCAL $MYSQL_OPTIONS_REPL" > [...] > $MYSQL $mysql_options \ > -e 'SHOW SLAVE STATUS\G' > $tmpfile > [...] >} >[...] And from the debug-code I temporarily scripted in, I saw that the mysql_options-string ended with "--user= --password=", which is overriding any user/password eventually set earlier (not in/around is_slave() anyway). Having had a look onto a 2nd cluster we're running that isn't up-to-date with the latest patches, I also noticed that this syslog-error-spam was seemingly introduced only with the latest officially updated MySQL-RA for SLES11-HAE-SP1. Anyway, here's the diff of the changes I - for now - made to the MySQL-RA running in our cluster (trying to keep the changes small; therefor i.e. didn't introduce a new user/pw-combo for this): ==================== 337a338,340 > [ "$OCF_RESKEY_test_user" ] && MYSQL_OPTIONS_LOCAL="$MYSQL_OPTIONS_LOCAL --user=$OCF_RESKEY_test_user" > [ "$OCF_RESKEY_test_passwd" ] && MYSQL_OPTIONS_LOCAL="$MYSQL_OPTIONS_LOCAL --password=$OCF_RESKEY_test_passwd" > [ ! "$OCF_RESKEY_replication_user" -a ! "$OCF_RESKEY_replication_passwd" ] && MYSQL_OPTIONS_REPL="" 558c561 < ocf_log err "Config $OCF_RESKEY_config doesn't exist"; --- > ocf_is_probe || ocf_log err "Config $OCF_RESKEY_config doesn't exist" ==================== Cnut Jansen
337a338,340 > [ "$OCF_RESKEY_test_user" ] && MYSQL_OPTIONS_LOCAL="$MYSQL_OPTIONS_LOCAL --user=$OCF_RESKEY_test_user" > [ "$OCF_RESKEY_test_passwd" ] && MYSQL_OPTIONS_LOCAL="$MYSQL_OPTIONS_LOCAL --password=$OCF_RESKEY_test_passwd" > [ ! "$OCF_RESKEY_replication_user" -a ! "$OCF_RESKEY_replication_passwd" ] && MYSQL_OPTIONS_REPL="" 558c561 < ocf_log err "Config $OCF_RESKEY_config doesn't exist"; --- > ocf_is_probe || ocf_log err "Config $OCF_RESKEY_config doesn't exist"
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/