[rabbitmq-discuss] [PATCH 05 of 10] OCF resource agent: fix validate exit codes
Florian Haas
florian.haas at linbit.com
Tue May 11 18:09:42 BST 2010
# HG changeset patch
# User Florian Haas <florian.haas at linbit.com>
# Date 1273594006 -7200
# Node ID 2a468e9f5b96c9d31554525c5b00852f0f302487
# Parent f0a7e4621b20a35c6cf20b2393d7d6b3f02fbc7b
OCF resource agent: fix validate exit codes
Exit with $OCF_ERR_INSTALLED if validate fails due to non-availability
of a required binary, or config file.
diff -r f0a7e4621b20 -r 2a468e9f5b96 packaging/common/rabbitmq-server.ocf
--- a/packaging/common/rabbitmq-server.ocf Tue May 11 18:05:09 2010 +0200
+++ b/packaging/common/rabbitmq-server.ocf Tue May 11 18:06:46 2010 +0200
@@ -204,34 +204,34 @@
rabbit_validate_partial() {
if [ ! -x $RABBITMQ_MULTI ]; then
ocf_log err "rabbitmq-server multi $RABBITMQ_MULTI does not exist or is not executable";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
if [ ! -x $RABBITMQ_CTL ]; then
ocf_log err "rabbitmq-server ctl $RABBITMQ_CTL does not exist or is not executable";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
}
rabbit_validate_full() {
if [ ! -z $RABBITMQ_CLUSTER_CONFIG_FILE ] && [ ! -e $RABBITMQ_CLUSTER_CONFIG_FILE ]; then
ocf_log err "rabbitmq-server cluster_config_file $RABBITMQ_CLUSTER_CONFIG_FILE does not exist or is not a file";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
if [ ! -z $RABBITMQ_CONFIG_FILE ] && [ ! -e $RABBITMQ_CONFIG_FILE ]; then
ocf_log err "rabbitmq-server config_file $RABBITMQ_CONFIG_FILE does not exist or is not a file";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
if [ ! -z $RABBITMQ_LOG_BASE ] && [ ! -d $RABBITMQ_LOG_BASE ]; then
ocf_log err "rabbitmq-server log_base $RABBITMQ_LOG_BASE does not exist or is not a directory";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
if [ ! -z $RABBITMQ_MNESIA_BASE ] && [ ! -d $RABBITMQ_MNESIA_BASE ]; then
ocf_log err "rabbitmq-server mnesia_base $RABBITMQ_MNESIA_BASE does not exist or is not a directory";
- exit $OCF_ERR_ARGS;
+ exit $OCF_ERR_INSTALLED;
fi
rabbit_validate_partial
More information about the rabbitmq-discuss
mailing list