summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorLuke Bakken <lbakken@pivotal.io>2020-07-09 09:31:49 -0700
committerLuke Bakken <lbakken@pivotal.io>2020-07-09 09:31:49 -0700
commit25e076029ad26590278857c8a3d756e7224a0094 (patch)
tree6dc464e0cf5ca8945821d1711bde6c61f36f15d2 /src/rabbit.erl
parentf09522c75cb3d0c48877a20e2ddba5f3480e8de1 (diff)
downloadrabbitmq-server-git-25e076029ad26590278857c8a3d756e7224a0094.tar.gz
Move networking boot step to end of startup
This allows plugins to configure network listener settings and have those settings apply to all listeners when started. Fixes #2405
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 623a917366..4ac33db4c0 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -250,8 +250,8 @@
{requires, pre_flight}]}).
-rabbit_boot_step({networking,
- [{description, "TCP and TLS listeners"},
- {mfa, {rabbit_networking, boot, []}},
+ [{description, "TCP and TLS listeners (backwards compatibility)"},
+ {mfa, {rabbit_log, debug, ["'networking' boot step skipped and moved to end of startup", []]}},
{requires, notify_cluster}]}).
%%---------------------------------------------------------------------------
@@ -928,7 +928,14 @@ do_run_postlaunch_phase() ->
rabbit_plugins:strictly_plugins(rabbit_plugins:active())),
%% export definitions after all plugins have been enabled,
%% see rabbitmq/rabbitmq-server#2384
- rabbit_definitions:maybe_load_definitions()
+ case rabbit_definitions:maybe_load_definitions() of
+ ok -> ok;
+ DefLoadError -> throw(DefLoadError)
+ end,
+
+ %% start listeners after all plugins have been enabled,
+ %% see rabbitmq/rabbitmq-server#2405
+ ok = rabbit_networking:boot()
catch
throw:{error, _} = Error ->
rabbit_prelaunch_errors:log_error(Error),