diff options
| -rw-r--r-- | rabbitmq-components.mk | 17 | ||||
| -rwxr-xr-x | scripts/rabbitmq-server-ha.ocf | 16 | ||||
| -rw-r--r-- | src/rabbit_autoheal.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_coordinator.erl | 2 | ||||
| -rw-r--r-- | test/unit_inbroker_SUITE.erl | 8 |
5 files changed, 16 insertions, 29 deletions
diff --git a/rabbitmq-components.mk b/rabbitmq-components.mk index e3417856f8..dbad95d738 100644 --- a/rabbitmq-components.mk +++ b/rabbitmq-components.mk @@ -38,6 +38,7 @@ dep_rabbitmq_boot_steps_visualiser = git_rmq rabbitmq-boot-steps-visualiser $ dep_rabbitmq_clusterer = git_rmq rabbitmq-clusterer $(current_rmq_ref) $(base_rmq_ref) master dep_rabbitmq_codegen = git_rmq rabbitmq-codegen $(current_rmq_ref) $(base_rmq_ref) master dep_rabbitmq_consistent_hash_exchange = git_rmq rabbitmq-consistent-hash-exchange $(current_rmq_ref) $(base_rmq_ref) master +dep_rabbitmq_ct_helpers = git_rmq rabbitmq-ct-helpers $(current_rmq_ref) $(base_rmq_ref) master dep_rabbitmq_delayed_message_exchange = git_rmq rabbitmq-delayed-message-exchange $(current_rmq_ref) $(base_rmq_ref) master dep_rabbitmq_dotnet_client = git_rmq rabbitmq-dotnet-client $(current_rmq_ref) $(base_rmq_ref) master dep_rabbitmq_event_exchange = git_rmq rabbitmq-event-exchange $(current_rmq_ref) $(base_rmq_ref) master @@ -98,6 +99,7 @@ RABBITMQ_COMPONENTS = amqp_client \ rabbitmq_clusterer \ rabbitmq_codegen \ rabbitmq_consistent_hash_exchange \ + rabbitmq_ct_helpers \ rabbitmq_delayed_message_exchange \ rabbitmq_dotnet_client \ rabbitmq_event_exchange \ @@ -285,16 +287,6 @@ endif # rabbitmq-components.mk checks. # -------------------------------------------------------------------- -ifeq ($(PROJECT),rabbit_common) -else ifdef SKIP_RMQCOMP_CHECK -else ifeq ($(IS_DEP),1) -else ifneq ($(filter co up,$(MAKECMDGOALS)),) -else -# In all other cases, rabbitmq-components.mk must be in sync. -deps:: check-rabbitmq-components.mk -fetch-deps: check-rabbitmq-components.mk -endif - # If this project is under the Umbrella project, we override $(DEPS_DIR) # to point to the Umbrella's one. We also disable `make distclean` so # $(DEPS_DIR) is not accidentally removed. @@ -308,11 +300,6 @@ endif ifeq ($(UNDER_UMBRELLA),1) ifneq ($(PROJECT),rabbitmq_public_umbrella) DEPS_DIR ?= $(abspath ..) - -distclean:: distclean-components - @: - -distclean-components: endif ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),) diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf index 8f711b3473..f2ba9a1519 100755 --- a/scripts/rabbitmq-server-ha.ocf +++ b/scripts/rabbitmq-server-ha.ocf @@ -1082,7 +1082,7 @@ stop_server_process() { if [ $rc -ne 0 ] ; then # Try to stop without known PID ocf_log err "${LH} RMQ-server process PIDFILE was not found!" - su_rabbit_cmd "${OCF_RESKEY_ctl} stop 2>&1 >> \"${OCF_RESKEY_log_dir}/shutdown_log\"" + su_rabbit_cmd "${OCF_RESKEY_ctl} stop >> \"${OCF_RESKEY_log_dir}/shutdown_log\" 2>&1" if [ $? -eq 0 ] ; then ocf_log info "${LH} RMQ-server process stopped succesfully, although there was no PIDFILE found." ocf_log info "${LH} grant a graceful termintation window ${OCF_RESKEY_stop_time} to end its beam" @@ -1093,7 +1093,7 @@ stop_server_process() { elif [ "${pid}" ] ; then # Try to stop gracefully by known PID ocf_log info "${LH} Execute stop with timeout: ${TIMEOUT_ARG}" - su_rabbit_cmd "${OCF_RESKEY_ctl} stop ${OCF_RESKEY_pid_file} 2>&1 >> \"${OCF_RESKEY_log_dir}/shutdown_log\"" + su_rabbit_cmd "${OCF_RESKEY_ctl} stop ${OCF_RESKEY_pid_file} >> \"${OCF_RESKEY_log_dir}/shutdown_log\" 2>&1" [ $? -eq 0 ] && ocf_log info "${LH} RMQ-server process (PID=${pid}) stopped succesfully." fi @@ -1128,7 +1128,7 @@ stop_rmq_server_app() { # stop the app ocf_log info "${LH} Execute stop_app with timeout: ${TIMEOUT_ARG}" - su_rabbit_cmd "${OCF_RESKEY_ctl} stop_app 2>&1 >> \"${OCF_RESKEY_log_dir}/shutdown_log\"" + su_rabbit_cmd "${OCF_RESKEY_ctl} stop_app >> \"${OCF_RESKEY_log_dir}/shutdown_log\" 2>&1" rc=$? if [ $rc -ne 0 ] ; then ocf_log err "${LH} RMQ-server app cannot be stopped." @@ -1161,7 +1161,7 @@ start_beam_process() { ocf_log warn "${LH} found old PID-file '${OCF_RESKEY_pid_file}'." pid=$(cat ${OCF_RESKEY_pid_file}) if [ "${pid}" -a -d "/proc/${pid}" ] ; then - ocf_run cat /proc/${pid}/cmdline | grep -c 'bin/beam' 2>&1 > /dev/null + ocf_run cat /proc/${pid}/cmdline | grep -c 'bin/beam' > /dev/null 2>&1 rc=$? if [ $rc -eq $OCF_SUCCESS ] ; then ocf_log warn "${LH} found beam process with PID=${pid}, killing...'." @@ -1404,7 +1404,7 @@ get_status() { # try to parse the which_applications() output only if it exited w/o errors if [ "${what}" -a $rc -eq 0 ] ; then rc=$OCF_NOT_RUNNING - echo "$body" | grep "\{${what}," 2>&1 > /dev/null && rc=$OCF_SUCCESS + echo "$body" | grep "\{${what}," > /dev/null 2>&1 && rc=$OCF_SUCCESS if [ $rc -ne $OCF_SUCCESS ] ; then ocf_log info "${LH} app ${what} was not found in command output: ${body}" @@ -1667,7 +1667,7 @@ node_health_check_local() { node_health_check_legacy() { local rc_alive local timeout_alive - su_rabbit_cmd "${OCF_RESKEY_ctl} list_channels 2>&1 > /dev/null" + su_rabbit_cmd "${OCF_RESKEY_ctl} list_channels > /dev/null 2>&1" rc_alive=$? [ $rc_alive -eq 137 -o $rc_alive -eq 124 ] && ocf_log err "${LH} 'rabbitmqctl list_channels' timed out, per-node explanation: $(enhanced_list_channels)" check_timeouts $rc_alive "rabbit_list_channels_timeouts" "list_channels" @@ -1706,11 +1706,11 @@ node_health_check_legacy() { rc=$OCF_ERR_GENERIC elif [ -n "${alarms}" ]; then - for node in "${alarms}"; do + for node in ${alarms}; do name=`echo ${node} | perl -n -e "m/memory,'(?<n>\S+)+'/ && print \"$+{n}\n\""` if [ "${name}" = "${RABBITMQ_NODENAME}" ] ; then ocf_log err "${LH} Found raised memory alarm. Erasing the alarm and restarting." - su_rabbit_cmd "${OCF_RESKEY_ctl} set_vm_memory_high_watermark 10 2>&1 > /dev/null" + su_rabbit_cmd "${OCF_RESKEY_ctl} set_vm_memory_high_watermark 10 > /dev/null 2>&1" rc=$OCF_ERR_GENERIC break fi diff --git a/src/rabbit_autoheal.erl b/src/rabbit_autoheal.erl index 9d6bfff5fc..3adcc09692 100644 --- a/src/rabbit_autoheal.erl +++ b/src/rabbit_autoheal.erl @@ -245,7 +245,7 @@ handle_msg({become_winner, _}, %% Something has happened to the leader, it might have seen us down but we %% are still alive. Partitions have changed, cannot continue. rabbit_log:info("Autoheal: I am the winner and received another healing " - "request, partitions have changed. Aborting ~n", [Losers]), + "request, partitions have changed to ~p. Aborting ~n", [Losers]), winner_finish(Losers), not_healing; diff --git a/src/rabbit_mirror_queue_coordinator.erl b/src/rabbit_mirror_queue_coordinator.erl index 017d1d1fa2..fe1168f120 100644 --- a/src/rabbit_mirror_queue_coordinator.erl +++ b/src/rabbit_mirror_queue_coordinator.erl @@ -363,7 +363,7 @@ handle_cast({gm_deaths, DeadGMPids}, %% NOTE: Reported deaths here, could be inconsistant. rabbit_mirror_queue_misc:report_deaths(MPid, false, QueueName, DeadPids), - {stop, normal, State}; + {stop, shutdown, State}; {error, not_found} -> {stop, normal, State} end; diff --git a/test/unit_inbroker_SUITE.erl b/test/unit_inbroker_SUITE.erl index 8de282c50a..7b783facd2 100644 --- a/test/unit_inbroker_SUITE.erl +++ b/test/unit_inbroker_SUITE.erl @@ -1684,15 +1684,15 @@ credit_flow_settings(Config) -> credit_flow_settings1(_Config) -> %% default values - passed = test_proc(200, 50), + passed = test_proc(200, 100), - application:set_env(rabbit, credit_flow_default_credit, {100, 20}), - passed = test_proc(100, 20), + application:set_env(rabbit, credit_flow_default_credit, {100, 300}), + passed = test_proc(100, 300), application:unset_env(rabbit, credit_flow_default_credit), % back to defaults - passed = test_proc(200, 50), + passed = test_proc(200, 100), passed. test_proc(InitialCredit, MoreCreditAfter) -> |
