summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update rabbit_fifo with Ra aux changeskjnilsson2019-12-131-2/+4
| | | | | | Ra now will automatically pass `eval` and `tick` to handle_aux after each applied batch and tick even respectively. This updates the state machine to handle this.
* Merge pull request #2183 from rabbitmq/rabbitmq-cli-389-part1Michael Klishin2019-12-125-13/+176
|\ | | | | rabbit_{amqueue,quorum_queue}: add several listing and sampling functions for new CLI commands
| * Ensure list_local_quorum_queues workskjnilsson2019-12-122-7/+7
| | | | | | | | on both follower and leader nodes.
| * Initial tests for rabbit_quorum_queue:list_with_minimum_quorum/0Michael Klishin2019-12-121-3/+36
| |
| * Drive-by change: correct a typoMichael Klishin2019-12-121-1/+1
| |
| * rabbit_{amqueue,quorum_queue}: add several listing and sampling functionsMichael Klishin2019-12-123-9/+139
|/ | | | | | | | | So that node-local queues that satisfy certain criteria can be listed easily. Mob: @kjnilsson and several other Pivots. Part of rabbitmq/rabbitmq-cli#389.
* Git: Ignore copied CLIJean-Sébastien Pédron2019-12-121-1/+1
|
* Update rabbitmq-components.mkJean-Sébastien Pédron2019-12-121-4/+4
|
* quorum_queue_SUITE: Verify rabbit_ct_helpers:run_steps() return valueJean-Sébastien Pédron2019-12-121-35/+50
| | | | | | ... and skip the testscases in case of an error. Remove trailing whitespaces while here.
* Merge pull request #2142 from rabbitmq/rabbitmq-server-script-replacementJean-Sébastien Pédron2019-12-1142-2431/+2173
|\ | | | | Move rabbitmq-server(8) scripts to Erlang
| * rabbit_lager: Use log levels from prelaunch contextJean-Sébastien Pédron2019-12-112-147/+215
| | | | | | | | | | Those log levels, coming from the process environment, take precedence over whatever is configured.
| * Move most of shell scripts to Erlang codeJean-Sébastien Pédron2019-12-1141-2296/+1970
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A large part of the rabbitmq-server(8) and CLI scripts, both Bourne-shell and Windows Batch versions, was moved to Erlang code and the RabbitMQ startup procedure was reorganized to be closer to a regular Erlang application. A new application called `rabbitmq_prelaunch` is responsible for: 1. Querying the environment variables to initialize important variables (using the new `rabbit_env` module in rabbitmq-common). 2. Checking the compatibility with the Erlang/OTP runtime. 3. Configuring Erlang distribution. 5. Writing the PID file. The application is started early (i.e. it is started before `rabbit`). The `rabbit` application runs the second half of the prelaunch sequence at the beginning of the application `start()` function. This second phase is responsible for the following steps: 1. Preparing the feature flags registry. 2. Reading and validating the configuration. 3. Configuring logging. 4. Running the various cluster checks. In addition to this prelaunch sequence, the `rabbit` application start procedure ends with a "postlaunch" sequence which takes care of starting enabled plugins. Thanks to this, RabbitMQ can be started with `application:start(rabbit)` as any other Erlang application. The only caveats are: * Mnesia must be stopped at the time `rabbit_prelaunch` is started, and must remain stopped when `rabbit` is started, to allow the Erlang distribution setup and cluster checks. `rabbit` takes care of starting Mnesia. * Likewise for Ra, because it relies on the `ra` application environment to be configured. Transitioning from scripts to Erlang code has the following benefits: * RabbitMQ start behavior should be identical between Unix and Windows. Also, features should be on par now. For instance, RabbitMQ now writes a PID file on Windows, like it always did on Unix-based systems. * The difference between published packages and a development environment are greatly reduced. In fact, we removed all the "if this is a dev working copy, then ..." blocks. As part of that, the `rabbit` application is now treated like its plugins: it is packaged as an `.ez` archive and written to the `plugins` directory (even though it is not technically a plugin). Also in a development copy, the CLI is copied to the top-level project. So when testing a plugin for instance, the CLI to use is `sbin/rabbitmqctl` in the current directory, not the master copy in `rabbit/scripts`. * As a consequence of the previous two points, maintaining and testing on Windows is now made easy. It should even be possible to setup CI on Windows. * There are less issues with paths containing non-US-ASCII characters, which can happen on Windows because RabbitMQ stores its data in user directories by default. This process brings at least one more benefit: we now have early logging during this prelaunch phase, which eases diagnostics and debugging. There are also behavior changes: * The new format configuration files used to be converted to an Erlang-term-based file by the Cuttlefish CLI. To do that, configuration schemas were copied to a temporary directory and the generated configuration file was written to RabbitMQ data directory. Now, Cuttlefish is used as a library: everything happens in memory. No schemas are copied, no generated configuration is written to disk. * The PID file is removed when the Erlang VM exits. * The `rabbit_config` module was trimmed significantly because most of the configuration handling is done in `rabbit_prelaunch_conf` now. * The RabbitMQ nodename does not appear on the command line, therefore it is missing from ps(1) and top(1) output. * The `rabbit:start()` function will probably behave differently in some ways because it defers everything to the Erlang application controller (instead of reimplementing it).
* Merge pull request #2181 from rabbitmq/rabbitmq-server-2044Michael Klishin2019-12-111-4/+27
|\ | | | | Ensure syslog application is started when used as backend
| * Ensure syslog application is started when used as backendLuke Bakken2019-12-091-4/+27
|/ | | | | | | | | | | | | | | | | | | | | Fixes #2044 Fixes #2044 To test - * Clone https://github.com/lukebakken/rabbitmq-server-2044 * Ensure `syslog-ng` is in your `PATH`, then run `run-syslog-ng.sh` * Start RabbitMQ using `rabbitmq.config` * Run the following to log using the federation sink: ``` rabbit_federation_link_util:log_debug(rabbit_misc:r(<<"/">>, exchange), "TEST TEST ~s", [bar]). ``` Without this patch, nothing will be sent to the local `syslog-ng` server. Also, running `application:which_applications()` will not show that `syslog` is started. Applying this patch will fix both.
* rabbit_mnesia: Be more flexible in is_virgin_node()Jean-Sébastien Pédron2019-12-051-9/+9
| | | | | | | | | | Before, if the directory was not empty, the function required that all three ignored files were present in that directory. If only two were, then the test would fail and the node would not be considered as pristine. Now, we take the list of files in that directory and remove the files to ignored. If the result is empty, the node is new.
* rabbit_mnesia: Do not include `rabbit.hrl`Jean-Sébastien Pédron2019-12-051-2/+0
| | | | ... as it is not used.
* unit_inbroker_non_parallel_SUITE: Skip log file test if dir writableJean-Sébastien Pédron2019-12-051-8/+21
| | | | | | | | | If the supposedly non-writable directory is writable (e.g. we are running the testsuite on Windows as Administrator), we skip this test. On Unix, we now use `/` as the non-writable directory because `/var/empty` may not exist. For instance, this is the case on Debian Stretch AWS EC2 image.
* scripts/rabbitmq-env.bat: Replace `where.exe` by a PowerShell commandJean-Sébastien Pédron2019-12-051-1/+1
| | | | | | | | | On Amazon AWS EC2 Windows Server 2019 image, `where.exe` is unavailable. Fortunately, we can achieve the same thing with a plain PowerShell oneliner which should work everywhere. PowerShell is provided with Windows since Windows 7 (2009) according to Wikipedia.
* Merge pull request #2176 from rabbitmq/duplicated-consumers-metricMichael Klishin2019-11-292-4/+27
|\ | | | | Remove duplicated consumers metric in quorum queues
| * Take consumers from `handle_tick` arguments, as stats from `infos` are not ↵dcorbacho2019-11-292-7/+11
| | | | | | | | yet updated
| * Remove duplicated consumers metric in quorum queuesdcorbacho2019-11-282-2/+21
| |
* | feature_flags_SUITE: Cleanup other plugins in `my_plugin/plugins`Jean-Sébastien Pédron2019-11-281-1/+18
| | | | | | | | | | | | We only keep `my_plugin-*.ez`. In particular, we don't want another copy of `rabbit_common-*.ez` which might conflict with the primary copy if we configure a secondary Umbrella.
* | feature_flags_SUITE: Use `ff_from_testsuite` wherever possibleJean-Sébastien Pédron2019-11-281-13/+9
| | | | | | | | | | | | | | | | | | ... instead of all feature flags. Using all feature flags in a testcase is not possible if we configure a secondary Umbrella which don't have the same feature flags set. Before this change, the testcases failed because of those other incompatible feature flags.
* | feature_flags_SUITE: Check feature flag support stateJean-Sébastien Pédron2019-11-281-18/+36
|/ | | | | ... in addition to the fact they are disabled. Because a unsupported feature flag is implicitly disabled.
* feature_flags_SUITE: Just set the extra plugin pathJean-Sébastien Pédron2019-11-271-7/+1
| | | | | rabbit_ct_broker_helpers will take care of prepending the regular plugins path.
* Merge pull request #2165 from rabbitmq/mgmt-less-improvementsMichael Klishin2019-11-273-4/+66
|\ | | | | Add format/1 for classic queues and totals/type_specific info for all queue types
| * Add format/1 for classic queues and totals/type_specific info for all typesdcorbacho2019-11-173-4/+66
| | | | | | | | | | | | | | | | The functions report the necessary data for mgmt-less UI: * replica information for individual formatting of classic queues * queue totals/replica information for all queues [#169802101]
* | rabbit_channel: Restore start_link/11 for backward compatibilityJean-Sébastien Pédron2019-11-262-2/+13
| | | | | | | | | | | | | | | | | | start_link/11 calls start_link/12 with AmqpParams set to `undefined`. This is what rabbit_channel_sup was doing as well as rabbit_ct_broker_helpers in rabbitmq-ct-helpers. Those modules use the restored start_link/11 again so the default value of AmqpParams is stored in one place only.
* | Add test for authn/authz context propagationArnaud Cogoluègnes2019-11-263-0/+225
| | | | | | | | References #2172
* | Merge pull request #2167 from rabbitmq/basic-get-sac-qqMichael Klishin2019-11-265-1/+38
|\ \ | | | | | | Reject basic.get operations on quorum queues with single active consumer enabled
| * | Reject basic.get operations on quorum queues with single active consumer enableddcorbacho2019-11-205-1/+38
| | | | | | | | | | | | | | | | | | rabbitmq-server/2164 [#169810347]
* | | Merge pull request #2172 from rabbitmq/velimir-avoid-get-amqp-params-callMichael Klishin2019-11-265-299/+99
|\ \ \ | | | | | | | | A continuation to 2169
| * | | Remove log statementArnaud Cogoluègnes2019-11-251-2/+1
| | | |
| * | | Continuation to #2169 by @velimirMichael Klishin2019-11-234-188/+18
| | | | | | | | | | | | | | | | | | | | | | | | * Drop channel source * Correct optional variable extraction to accommodate MQTT and Erlang client test suites
| * | | Merge branch 'avoid-get-amqp-params-call' of ↵Michael Klishin2019-11-203-113/+84
| |\ \ \ | | | | | | | | | | | | | | | https://github.com/velimir/rabbitmq-server into velimir-avoid-get-amqp-params-call
| | * | | avoid synchronous call to a connection process from a channel processGrigory Starinkin2019-11-203-113/+84
| | | |/ | | |/| | | | | | | | | performance optimisation
* | | | Merge pull request #2171 from rabbitmq/rabbitmq-server-2170Michael Klishin2019-11-223-1/+40
|\ \ \ \ | | | | | | | | | | Skip importing queues and exchanges with invalid names
| * | | | Add one more definition import test caseMichael Klishin2019-11-212-1/+28
| | | | |
| * | | | Skip importing queues and exchanges with invalid namesLuke Bakken2019-11-211-0/+12
|/ / / / | | | | | | | | | | | | Fixes #2170
* | | | dynamic_ha_SUITE: Ensure conditions for `rebalance_exactly` are metJean-Sébastien Pédron2019-11-211-0/+25
|/ / / | | | | | | | | | | | | | | | I.e., queues are using different mirrors so that they are not all rebalanced on the same node (the testcase expects they are spread on all three nodes).
* | | Fix a rabbit_mgmt_util extraction leftoverMichael Klishin2019-11-191-1/+1
| |/ |/| | | | | Part of rabbitmq/rabbitmq-management#749.
* | Merge pull request #2160 from rabbitmq/rabbitmq-management-749Michael Klishin2019-11-1924-27/+2545
|\ \ | |/ |/| Extract rabbit_definitions from rabbitmq-management
| * rabbit_definitions:import_parsed/{1,2}: support proplistsMichael Klishin2019-11-161-3/+7
| |
| * Refactoring for CLI-driven definition importMichael Klishin2019-11-165-16/+28
| |
| * Log spamMichael Klishin2019-11-151-1/+0
| |
| * Definition import: refactor for future ctl commandMichael Klishin2019-11-152-87/+142
| |
| * Reformat one test caseMichael Klishin2019-11-152-9/+602
| | | | | | | | and make only one file fail validation.
| * Definition export: alias rabbit_version as rabbitmq_versionMichael Klishin2019-11-151-0/+1
| |
| * Export general and topic permissionsMichael Klishin2019-11-141-2/+17
| |
| * Export explicitly defined bindingsMichael Klishin2019-11-142-7/+36
| |