diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-01-14 14:16:11 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-01-16 11:46:59 +0100 |
| commit | b07cf2ddbfcfa3543c9cc98ecac07e2cac0fe351 (patch) | |
| tree | 8ad5237faaae5b1d7ba7ba0dc657ff0282aa394d /LICENSE-MPL-RabbitMQ | |
| parent | 04700dde4a79ab6501b282d21b9bc3c876e732db (diff) | |
| download | rabbitmq-server-git-b07cf2ddbfcfa3543c9cc98ecac07e2cac0fe351.tar.gz | |
rabbit_plugins: Filter non-plugins out
When the module discovers plugins in the plugins directories, it
considers all applications there. There are actual RabbitMQ plugins,
their dependencies, and possibly other applications which are neither
plugins nor dependencies.
So far, this was the case of `syslog` which could be used by Lager if
the user configures it. To make sure `rabbit_plugins` or
rabbitmq-plugins(8) didn't mess with `syslog`, there was a hard-coded
filtering function which excluded this specific application.
In RabbitMQ Enterprise Edition, we want to add another application
of this kind: `inet_tcp_compress_dist`. This application implements
an Erlang distribution protocol, so it is effectively unrelated to
RabbitMQ. However, to keep packaging simple, it is provided in the
plugins directory.
We could add it to the hard-coded filtering function, but instead this
function is replaced by the following logic to filter plugins:
* Applications which depend on `rabbit` are considered actual plugins.
* Plugins' dependencies, direct and indirect, are considered plugins
as well.
Therefore, `rabbit_plugins` will ignore:
* Applications which don't depend on `rabbit` and no plugins
depend on them (again, directly or indirectly)
* Applications which are part of Erlang/OTP.
This means the behavior slightly changes: a plugin which didn't declare
its dependency to `rabbit` will not be considered a plugin anymore. I
consider it is a bug in the plugin in the first place.
The code will log the following debug messages to list ignored
applications:
2020-01-14 13:18:41.468 [debug] <0.941.0> Plugins discovery: ignoring getopt, not a RabbitMQ plugin
2020-01-14 13:18:41.468 [debug] <0.941.0> Plugins discovery: ignoring inet_tcp_compress_dist, not a RabbitMQ plugin
2020-01-14 13:18:41.468 [debug] <0.941.0> Plugins discovery: ignoring lz4, not a RabbitMQ plugin
2020-01-14 13:18:41.468 [debug] <0.941.0> Plugins discovery: ignoring syslog, not a RabbitMQ plugin
2020-01-14 13:18:41.468 [debug] <0.941.0> Plugins discovery: ignoring zstd, not a RabbitMQ plugin
Diffstat (limited to 'LICENSE-MPL-RabbitMQ')
0 files changed, 0 insertions, 0 deletions
