summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rabbit: Change boot state to `stopping` in prep_stop/1Jean-Sébastien Pédron2020-02-101-3/+3
|
* rabbit: Merge start_apps/2 and start_loaded_apps/2Jean-Sébastien Pédron2020-02-101-7/+6
| | | | | The latter is only ever called by the former, so there is no need to split them.
* Merge pull request #2237 from rabbitmq/adapt-unit-log_config_SUITEJean-Sébastien Pédron2020-02-101-74/+82
|\ | | | | unit_log_config_SUITE: Adapt after fixes to rabbit_lager
| * unit_log_config_SUITE: Adapt after fixes to rabbit_lagerJean-Sébastien Pédron2020-02-101-74/+82
|/ | | | | | See: * commit 169eeeb426b1c71e5b4e81f8fa813cab9570247a * commit 15dfe7b1bf63c6f6b9940738b219f08bcc241cbd
* Merge pull request #2236 from ↵Jean-Sébastien Pédron2020-02-101-13/+41
|\ | | | | | | | | rabbitmq/fix-logging-after-issue2180-related-changes Fix logging after #2180-related changes
| * rabbit_lager: Fix log level being set from the configuration fileJean-Sébastien Pédron2020-02-101-1/+27
| | | | | | | | | | | | | | | | After changing the module to take into account the log level set from the `$RABBITMQ_LOG` environment variable, I broke the ability to set it from the configuration file. This should work again.
| * rabbit_lager: Only use "\r\n" with the console backendJean-Sébastien Pédron2020-02-101-12/+14
|/ | | | | | | | For the other backends, go back to "\n" only. This fixes an issue where the log file had a mix of "\n" and "\r\n" as newlines characters. This was visible through "^M" characters at the end of each line.
* Merge pull request #2233 from Ayanda-D/handle-absent-alive-queuesMichael Klishin2020-02-091-1/+1
|\ | | | | Handle and raise protocol error for absent queues assumed to be alive
| * Format pid correctlyAyanda Dube2020-02-081-1/+1
|/
* WordingMichael Klishin2020-02-081-1/+1
|
* improve handling of absent queues assumed to be aliveAyanda Dube2020-02-081-1/+7
|
* rabbit_binding: a few helpers to make it easier to delete bindingsMichael Klishin2020-02-081-5/+22
| | | | | when working with definition import, replacement or cleanup.
* Merge pull request #2216 from rabbitmq/move-all-os-getenv-to-rabbit_envJean-Sébastien Pédron2020-02-037-35/+54
|\ | | | | Move all RabbitMQ-specific environment variables to `rabbit_env`
| * rabbit_mnesia_rename: Use the new rabbit_nodes_common:name_type() functionJean-Sébastien Pédron2020-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... instead of calling rabbit_nodes:name_type(). The latter now uses the context to return the name type of the current node (instead of the environment variable which may not be set). However, this function is executed in the context of the CLI which does not start rabbit_prelaunch. Therefore, there is no context to get the name type from. Anyway, the name type should be determined based on the node name we are about to impersonate. So use the argument to deduce the name type.
| * Move all RabbitMQ-specific environment variables to `rabbit_env`Jean-Sébastien Pédron2020-02-036-34/+52
|/ | | | | | | | | | The reading of `$NOTIFY_SOCKET` is also moved at the same time. This is in preparation of the work around start/stop status. There is an associated commit in rabbitmq-common to update `rabbit_env` and record the origin of each variable. [#170149339]
* Refactor definition import functions to log lessMichael Klishin2020-02-021-25/+22
| | | | | | | | | * Only log the intent to import for categories that are not empty/missing * Log how many entities will be imported Current logging frequency is reasonable for occasional manual or automated imports but with continuous automated imports (say, a hot standby) it is too excessive.
* Introduce rabbit_{exchange,amqqueue}:lookup_many/1Michael Klishin2020-02-022-11/+19
| | | | | | | | | | rabbit_amqqueue:lookup/1 already supports lists of keys but it makes less sense for rabbit_exchange:lookup/1. This introduces a uniform API element that can be used to look up N entities by key while preserving the historically accumulated difference that stems from the common access patterns for each entity type.
* rabbit_exchange:lookup/1: support lists of keysMichael Klishin2020-02-021-2/+10
| | | | like rabbit_amqqueue does
* rabbit_guide:string/2: support binary prefixesMichael Klishin2020-02-021-4/+6
|
* Skip persistent cluster ID test for mixed version clustersMichael Klishin2020-02-021-11/+17
| | | | | As previous 3.7.x do not have the function the test relies on. Note that the change is otherwise safe for them.
* Merge pull request #2228 from rabbitmq/rabbitmq-server-2222-2Michael Klishin2020-02-011-0/+3
|\ | | | | Ignore SIGUSR2 signal as well
| * Ignore SIGUSR2 signal as wellLuke Bakken2020-01-311-0/+3
|/ | | | Fixes #2222
* Merge pull request #2227 from rabbitmq/rabbitmq-server-2222Jack Vanlightly2020-01-312-0/+63
|\ | | | | Override OTP handlers to gracefully shut down on SIGTERM, SIGQUIT
| * Override OTP handlers to gracefully shut down on SIGTERM, SIGQUITMichael Klishin2020-01-302-0/+63
| | | | | | | | | | | | | | | | otherwise the default handler will terminate the runtime. Closes #2222. Pair: @vanlightly.
* | Merge pull request #2226 from rabbitmq/mk-persistent-internal-cluster-idJack Vanlightly2020-01-313-11/+64
|\ \ | |/ |/| Introduce a persistent internal cluster ID
| * Log message wordingMichael Klishin2020-01-301-1/+1
| | | | | | | | Pair: @vanlightly
| * Introduce a persistent internal cluster IDMichael Klishin2020-01-303-11/+64
|/ | | | | | | | | | | That the operator cannot and are not supposed to control. The ID is cluster-wide and stored as a global runtime parameter to make sure it is replicated across all nodes. It is intentionally excluded from imported definitions because it is not meant to be reused. This ID would be useful in several features/plugins under development.
* rabbit_definitions: introduce a few typesMichael Klishin2020-01-281-0/+20
|
* Merge pull request #2221 from loguntsov/patch-1Michael Klishin2020-01-281-1/+1
|\ | | | | Fix bad type of result of ack function.
| * Formatting.Sergey Loguntsov2020-01-271-1/+1
| |
| * Fix bad type of result of ack function.Sergey Loguntsov2020-01-271-1/+1
|/
* Merge pull request #2219 from rabbitmq/revisit-rabbit-start_apps-2Michael Klishin2020-01-241-8/+14
|\ | | | | rabbit: Change start_apps/2 to call application:ensure_all_started/2
| * rabbit: Change start_apps/2 to call application:ensure_all_started/2Jean-Sébastien Pédron2020-01-241-8/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | .. instead of reinventing about the same logic. start_apps/2 is not called to start the `rabbit` application anymore (it is started as a normal Erlang application now). It means it's only used to start plugins which are also supposed to be regular Erlang applications. It runs boot steps unconditionally as well (because this function never starts `rabbit). One difference with the previous code is that the previous code started all loaded applications. This seemed unnecessary and even caused issues with testsuites where some applications were loaded like `rabbitmqctl` but were not meant to be started. Another difference is that before, all boot steps were executed at once, then all plugins were started. Now, to improve consistency and make sure that a dependency is fully ready before a plugin which depends on it starts, for each application we execute the boot steps then start it, before moving to the next. [#170870798]
* Merge pull request #2220 from rabbitmq/fix-bootsteps-run-vs-app-start-orderJean-Sébastien Pédron2020-01-241-4/+14
|\ | | | | rabbit: Fix plugins' run_boot_steps() vs. start order
| * rabbit: Fix plugins' run_boot_steps() vs. start orderJean-Sébastien Pédron2020-01-241-4/+14
|/ | | | | | | | | | | | | | | | | | Before `rabbit` startup code was rewritten as part of rabbitmq/rabbitmq-server#2180 to make it closer to a regular Erlang application, plugins' boot steps were executed before plugins were started. This commit restores this behavior. Indeed the initial patch inverted them by starting the plugins first, then executed the boot steps. It also brings another improvement in the process: a dependency has its boot steps executed and is started before a plugin which depends on it is considered. This should improve consistency. Note that the `start_apps/2` function, which is run when a user enables a plugin at runtime must be improved as well. There is a work in progress in rabbitmq/rabbitmq-server#2219.
* Makefile: Expand the list of slow testsuitesJean-Sébastien Pédron2020-01-231-0/+14
| | | | | Those are all the testsuites which take more than 5 minutes in Concourse.
* Merge pull request #2218 from Gsantomaggio/rabbitmq_server_2214Michael Klishin2020-01-231-2/+6
|\ | | | | Handle timeout error on the rebalance function
| * Handle timeout error on the rebalance functionGabriele Santomaggio2020-01-221-2/+6
| | | | | | | | Fixes: https://github.com/rabbitmq/rabbitmq-server/issues/2214
* | Merge pull request #2211 from rabbitmq/unsupported-if-flags-delete-qqArnaud Cogoluègnes2020-01-222-1/+41
|\ \ | |/ |/| Unsupported if_empty and if_unused flags for delete quorum queues
| * Acting user not used in qq queue.delete with flagsArnaud Cogoluègnes2020-01-201-2/+2
| | | | | | | | References #2211
| * Unsupported if_empty and if_unused flags for delete quorum queuesdcorbacho2020-01-152-1/+41
| | | | | | | | [#167065717]
* | quorum_queue_SUITE: Remove an unused variableJean-Sébastien Pédron2020-01-171-1/+1
| |
* | unit_SUITE: Declare test plugins' dependenciesJean-Sébastien Pédron2020-01-171-1/+6
| | | | | | | | | | | | | | | | Those plugins are created at runtime. We just need to populate the list of `applications` they depend on. This list must include `rabbit`. This will be even required once #rabbitmq/rabbitmq-server#2212 is accepted.
* | Revert "unit_SUITE: Fix test plugin's dependencies"Jean-Sébastien Pédron2020-01-171-1/+1
| | | | | | | | | | | | rabbit_shovel_test is not a plugin in fact. This reverts commit 3cf8b6384a9986e227dac3552f1b4208731ed84a.
* | unit_SUITE: Fix test plugin's dependenciesJean-Sébastien Pédron2020-01-161-1/+1
| | | | | | | | | | | | | | It should depend on `rabbit`. This will be even required once #rabbitmq/rabbitmq-server#2212 is accepted.
* | Merge pull request #2212 from rabbitmq/filter-non-plugins-outGerhard Lazu2020-01-161-12/+48
|\ \ | |/ |/| rabbit_plugins: Filter non-plugins out
| * rabbit_plugins: Filter non-plugins outJean-Sébastien Pédron2020-01-161-12/+48
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #2210 from rabbitmq/filter-applicable-policiesMichael Klishin2020-01-155-2/+56
|\ | | | | Filter policies that cannot be applied to quorum queues
| * Filter policies that cannot be applied to quorum queuesdcorbacho2020-01-145-2/+56
| | | | | | | | | | | | | | | | | | Some policies, such as highly available, do not apply to all types of queues. Even though quorum queues ignores some policies, they're still listed as an applied policy on this type of queue. This commit ignores filters these policies when applied, so they'll never be listed on the wrong type of queue. [#169811193]
* | rabbit_feature_flags: Lookup feature flags in RabbitMQ-related applications onlyJean-Sébastien Pédron2020-01-131-2/+2
| | | | | | | | | | This reduces the time it takes to generate the feature flags registry. On my laptop, it goes from 830 ms to 235 ms.