summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-02-10 14:17:41 +0100
committerGitHub <noreply@github.com>2020-02-10 14:17:41 +0100
commita922e91b0bffaba9f6b09a0305e62c677b75101e (patch)
tree5b6aefa9777875fbb318e5c4e79417e84eaa6534 /src/rabbit.erl
parentd188ea9042e5621432ab276290b955168d668d22 (diff)
parent12e59d8892374d503676f40ba73c7def42eccb81 (diff)
downloadrabbitmq-server-git-a922e91b0bffaba9f6b09a0305e62c677b75101e.tar.gz
Merge pull request #2238 from rabbitmq/various-fixes-post-issue2180
Various fixes post #2180
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 41a54ba36c..191fbc5320 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -606,17 +606,16 @@ start_apps(Apps) ->
-spec start_apps([app_name()],
#{app_name() => restart_type()}) -> 'ok'.
-%% TODO: start_apps/2 and start_loaded_apps/2 are now specific to
-%% plugins. Those function should be moved over `rabbit_plugins`, along
-%% with top_apps/1, once the latter stops using app_utils as well.
+%% TODO: start_apps/2 and is now specific to plugins. This function
+%% should be moved over `rabbit_plugins`, along with stop_apps/1, once
+%% the latter stops using app_utils as well.
start_apps(Apps, RestartTypes) ->
+ false = lists:member(rabbit, Apps), %% Assertion.
+ %% We need to load all applications involved in order to be able to
+ %% find new feature flags.
app_utils:load_applications(Apps),
ok = rabbit_feature_flags:refresh_feature_flags_after_app_load(Apps),
- start_loaded_apps(Apps, RestartTypes).
-
-start_loaded_apps(Apps, RestartTypes) ->
- false = lists:member(rabbit, Apps), %% Assertion.
rabbit_prelaunch_conf:decrypt_config(Apps),
lists:foreach(
fun(App) ->
@@ -1041,13 +1040,13 @@ do_run_postlaunch_phase() ->
end.
prep_stop(State) ->
- rabbit_peer_discovery:maybe_unregister(),
- State.
+ rabbit_prelaunch:set_boot_state(stopping),
+ rabbit_peer_discovery:maybe_unregister(),
+ State.
-spec stop(_) -> 'ok'.
stop(State) ->
- rabbit_prelaunch:set_boot_state(stopping),
ok = rabbit_alarm:stop(),
ok = case rabbit_mnesia:is_clustered() of
true -> ok;