diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-19 00:23:07 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-19 00:23:07 +0100 |
commit | 15bebe49dc3b2833ba7cbc9bd41ad349bb0bb2a4 (patch) | |
tree | 6eea97d22cd984dc1dbd6a46c9a4524c26829538 | |
parent | 77d9f83cc2e8e6afea0a42d0953d3adfaf2769e1 (diff) | |
download | rabbitmq-server-15bebe49dc3b2833ba7cbc9bd41ad349bb0bb2a4.tar.gz |
moved rabbitmq_cluster.config into the cluster_nodes field of rabbit in rabbitmq.config
-rwxr-xr-x | packaging/common/rabbitmq-server.ocf | 16 | ||||
-rwxr-xr-x | scripts/rabbitmq-server | 7 | ||||
-rw-r--r-- | scripts/rabbitmq-server.bat | 8 | ||||
-rw-r--r-- | scripts/rabbitmq-service.bat | 8 | ||||
-rw-r--r-- | src/rabbit_mnesia.erl | 15 |
5 files changed, 2 insertions, 52 deletions
diff --git a/packaging/common/rabbitmq-server.ocf b/packaging/common/rabbitmq-server.ocf index db0ed70b..b969535a 100755 --- a/packaging/common/rabbitmq-server.ocf +++ b/packaging/common/rabbitmq-server.ocf @@ -40,7 +40,6 @@ ## OCF_RESKEY_nodename ## OCF_RESKEY_ip ## OCF_RESKEY_port -## OCF_RESKEY_cluster_config_file ## OCF_RESKEY_config_file ## OCF_RESKEY_log_base ## OCF_RESKEY_mnesia_base @@ -117,14 +116,6 @@ The IP Port for rabbitmq-server to listen on <content type="integer" default="" /> </parameter> -<parameter name="cluster_config_file" unique="0" required="0"> -<longdesc lang="en"> -Location of the cluster config file -</longdesc> -<shortdesc lang="en">Cluster config file path</shortdesc> -<content type="string" default="" /> -</parameter> - <parameter name="config_file" unique="0" required="0"> <longdesc lang="en"> Location of the config file @@ -184,7 +175,6 @@ RABBITMQ_CTL=$OCF_RESKEY_ctl RABBITMQ_NODENAME=$OCF_RESKEY_nodename RABBITMQ_NODE_IP_ADDRESS=$OCF_RESKEY_ip RABBITMQ_NODE_PORT=$OCF_RESKEY_port -RABBITMQ_CLUSTER_CONFIG_FILE=$OCF_RESKEY_cluster_config_file RABBITMQ_CONFIG_FILE=$OCF_RESKEY_config_file RABBITMQ_LOG_BASE=$OCF_RESKEY_log_base RABBITMQ_MNESIA_BASE=$OCF_RESKEY_mnesia_base @@ -195,7 +185,6 @@ RABBITMQ_SERVER_START_ARGS=$OCF_RESKEY_server_start_args export_vars() { [ ! -z $RABBITMQ_NODE_IP_ADDRESS ] && export RABBITMQ_NODE_IP_ADDRESS [ ! -z $RABBITMQ_NODE_PORT ] && export RABBITMQ_NODE_PORT - [ ! -z $RABBITMQ_CLUSTER_CONFIG_FILE ] && export RABBITMQ_CLUSTER_CONFIG_FILE [ ! -z $RABBITMQ_CONFIG_FILE ] && export RABBITMQ_CONFIG_FILE [ ! -z $RABBITMQ_LOG_BASE ] && export RABBITMQ_LOG_BASE [ ! -z $RABBITMQ_MNESIA_BASE ] && export RABBITMQ_MNESIA_BASE @@ -215,11 +204,6 @@ rabbit_validate_partial() { } 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_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_INSTALLED; diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 2261b56e..7283f0e8 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -79,12 +79,6 @@ fi [ -f "${RABBITMQ_LOGS}" ] && cat "${RABBITMQ_LOGS}" >> "${RABBITMQ_LOGS}${RABBITMQ_BACKUP_EXTENSION}" [ -f "${RABBITMQ_SASL_LOGS}" ] && cat "${RABBITMQ_SASL_LOGS}" >> "${RABBITMQ_SASL_LOGS}${RABBITMQ_BACKUP_EXTENSION}" -if [ -f "$RABBITMQ_CLUSTER_CONFIG_FILE" ]; then - RABBITMQ_CLUSTER_CONFIG_OPTION="-rabbit cluster_config \"$RABBITMQ_CLUSTER_CONFIG_FILE\"" -else - RABBITMQ_CLUSTER_CONFIG_OPTION="" -fi - RABBITMQ_START_RABBIT= [ "x" = "x$RABBITMQ_ALLOW_INPUT" ] && RABBITMQ_START_RABBIT='-noinput' @@ -124,6 +118,5 @@ exec erl \ -os_mon start_disksup false \ -os_mon start_memsup false \ -mnesia dir "\"${RABBITMQ_MNESIA_DIR}\"" \ - ${RABBITMQ_CLUSTER_CONFIG_OPTION} \ ${RABBITMQ_SERVER_START_ARGS} \ "$@" diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat index a290f935..cebd7d1d 100644 --- a/scripts/rabbitmq-server.bat +++ b/scripts/rabbitmq-server.bat @@ -103,14 +103,6 @@ if exist "!SASL_LOGS!" ( rem End of log management
-if "!RABBITMQ_CLUSTER_CONFIG_FILE!"=="" (
- set RABBITMQ_CLUSTER_CONFIG_FILE=!RABBITMQ_BASE!\rabbitmq_cluster.config
-)
-set CLUSTER_CONFIG=
-if not exist "!RABBITMQ_CLUSTER_CONFIG_FILE!" GOTO L1
-set CLUSTER_CONFIG=-rabbit cluster_config \""!RABBITMQ_CLUSTER_CONFIG_FILE:\=/!"\"
-:L1
-
if "!RABBITMQ_MNESIA_DIR!"=="" (
set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
)
diff --git a/scripts/rabbitmq-service.bat b/scripts/rabbitmq-service.bat index bd117b83..96248f6a 100644 --- a/scripts/rabbitmq-service.bat +++ b/scripts/rabbitmq-service.bat @@ -136,14 +136,6 @@ if exist "!SASL_LOGS!" ( rem End of log management
-if "!RABBITMQ_CLUSTER_CONFIG_FILE!"=="" (
- set RABBITMQ_CLUSTER_CONFIG_FILE=!RABBITMQ_BASE!\rabbitmq_cluster.config
-)
-set CLUSTER_CONFIG=
-if not exist "!RABBITMQ_CLUSTER_CONFIG_FILE!" GOTO L1
-set CLUSTER_CONFIG=-rabbit cluster_config \""!RABBITMQ_CLUSTER_CONFIG_FILE:\=/!"\"
-:L1
-
if "!RABBITMQ_MNESIA_DIR!"=="" (
set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
)
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index e2b6927f..eb797763 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -253,20 +253,9 @@ read_cluster_nodes_config() -> case rabbit_misc:read_term_file(FileName) of {ok, [ClusterNodes]} -> ClusterNodes; {error, enoent} -> - case application:get_env(cluster_config) of + case application:get_env(rabbit, cluster_nodes) of undefined -> []; - {ok, DefaultFileName} -> - case file:consult(DefaultFileName) of - {ok, [ClusterNodes]} -> ClusterNodes; - {error, enoent} -> - error_logger:warning_msg( - "default cluster config file ~p does not exist~n", - [DefaultFileName]), - []; - {error, Reason} -> - throw({error, {cannot_read_cluster_nodes_config, - DefaultFileName, Reason}}) - end + {ok, ClusterNodes} -> ClusterNodes end; {error, Reason} -> throw({error, {cannot_read_cluster_nodes_config, |