diff options
author | Tim Watson <watson.timothy@gmail.com> | 2014-03-28 13:46:10 +0000 |
---|---|---|
committer | Tim Watson <watson.timothy@gmail.com> | 2014-03-28 13:46:10 +0000 |
commit | a994cd8db832684b837ede757d7b2052a9593e57 (patch) | |
tree | bff9fd3e848e8cc4509ed2d5707cfd7a0de6bb25 /src/rabbit_plugins.erl | |
parent | 49a5a1efe3237e280d80827673e6534670900758 (diff) | |
download | rabbitmq-server-a994cd8db832684b837ede757d7b2052a9593e57.tar.gz |
Ensure start_app considers plugins when using RABBITMQ_NODE_ONLY
- always start all enabled plugins, regardless of startup type
- only disable plugins that are currently running
The latter incidentally fixes bug 24941.
Diffstat (limited to 'src/rabbit_plugins.erl')
-rw-r--r-- | src/rabbit_plugins.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index edb7b12f..cc65c569 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -44,8 +44,11 @@ enable(Plugins) -> ok = rabbit_event:notify(plugins_changed, [{enabled, Diff}]). disable(Plugins) -> - Diff = rabbit:stop_apps(Plugins), - ok = rabbit_event:notify(plugins_changed, [{disabled, Plugins}]). + RunningApps = rabbit_misc:which_applications(), + ToDisable = [P || P <- Plugins, + proplists:is_defined(P, RunningApps)], + rabbit:stop_apps(ToDisable), + ok = rabbit_event:notify(plugins_changed, [{disabled, ToDisable}]). %% @doc Prepares the file system and installs all enabled plugins. setup() -> |