Skip to content

Conversation

@dumbbell
Copy link
Collaborator

@dumbbell dumbbell commented May 4, 2020

See #2277.

dumbbell added 2 commits May 4, 2020 12:48
This has several benefits:

1. It simplifies the code, all configuration being handled by the same
   code path (no more condition on Erlang-term-based vs. Cuttlefish).
   `rabbit_config` shrinks quite a lot in the process.

2. We can use additional configuration files AND an Erlang-term-based
   configuration file. In other words, it is possible to use the same
   existing Erlang-term-based file and introduce Cuttlefish files when
   needed.

   It allows a user to run RabbitMQ with:

   RABBITMQ_CONFIG_FILE=/path/to/rabbitmq.config \
   RABBITMQ_CONFIG_FILES=/path/to/conf.d/*.conf \
   ./sbin/rabbitmq-server

   A developer can do the same with `make run-broker`:

   make run-broker \
   RABBITMQ_CONFIG_FILES=/path/to/conf.d/*.conf

   In the example above, the main configuration file generated by
   rabbitmq-run.mk is an Erlang-term-based one.

This is implemented by calling Cuttlefish with a (possibly empty) list
of additional files and the Erlang-term-based file as the advanced
configuration file.

References #2180.

(cherry picked from commit 7edfe22)
It is unused in RabbitMQ or tier-1 plugins, and the previously returned
value made no sense since the switch to Cuttlefish as a library (as part
of #2180).

(cherry picked from commit 5f5fccf)
@dumbbell dumbbell force-pushed the backport-config-handling-with-cuttlefish branch from 61fefb6 to e64321c Compare May 4, 2020 10:49
@dumbbell dumbbell marked this pull request as ready for review May 4, 2020 11:05
@dumbbell dumbbell merged commit bb2f3dd into v3.8.x May 4, 2020
@dumbbell dumbbell deleted the backport-config-handling-with-cuttlefish branch May 4, 2020 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants