See changeset description.
exporting patch:
# HG changeset patch
# User Dominik Klein <[email protected]>
# Date 1229092041 -3600
# Node ID ba0edd6afc4489ba438a17a246848e4d1e9854ea
# Parent 1a5685e8f1ed6c230ae3892856892e6a3a57d208
RA mysql: Add check for mysqld binary. Pretty hard to debug if the binary is not in the default location and it is not set in the cib. start just timed out with no visible reason. Also new check for writable pid directory and fix a wrong variable name.
diff -r 1a5685e8f1ed -r ba0edd6afc44 resources/OCF/mysql
--- a/resources/OCF/mysql Tue Dec 09 16:10:12 2008 +0100
+++ b/resources/OCF/mysql Fri Dec 12 15:27:21 2008 +0100
@@ -246,8 +246,13 @@ END
mysql_validate() {
# checking the parameters
+ if [ ! -x $OCF_RESKEY_binary ]; then
+ ocf_log err "mysqld binary $OCF_RESKEY_binary does not exist or is not executable";
+ exit $OCF_ERR_INSTALLED;
+ fi
+
if [ ! -f $OCF_RESKEY_config ]; then
- ocf_log err "Config $OCF_RESKEY_mysql_config doesn't exist";
+ ocf_log err "Config $OCF_RESKEY_config doesn't exist";
exit $OCF_ERR_INSTALLED;
fi
@@ -266,6 +271,12 @@ mysql_validate() {
if [ ! $? -eq 0 ]; then
ocf_log err "Group $OCF_RESKEY_group doesn't exist";
exit $OCF_ERR_INSTALLED;
+ fi
+
+ piddir=`dirname $OCF_RESKEY_pid`
+ if ! su - $OCF_RESKEY_user -c "test -w $piddir"; then
+ ocf_log err "Directory $piddir for pidfile $OCF_RESKEY_pid is not writable by $OCF_RESKEY_user"
+ exit $OCF_ERR_PERM;
fi
}
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/