| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
More support functions for rabbitmq/rabbitmq-cli#389
|
| | | |
|
| | | |
|
| |\ \
| |/
|/| |
Run rabbit_prelaunch_conf:setup/1 earlier in startup
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes the issue where applications' configuration is applied after
they are started (and they do not read their environment again after
startup). This is the case of applications such as `ra` or
`sysmon_handler`: they are dependencies of `rabbit` and the Erlang
application controller will start them before.
Now, the configuration is loaded during the first prelaunch phase by
rabbitmq_prelaunch, hopefully before those applications are started.
To permit this change, the code updating the `enabled_plugins_file` was
moved to its own module. This one can't be moved to the
rabbitmq_prelaunch application because it depends on `rabbit_plugins`.
While here, add a couple assertions by checking return values.
|
| |/ |
|
| |
|
|
|
|
|
| |
This macro is used when the requested key always exists. If this is not
the case, `rabbit_ct_helpers:get_config()` should be used.
This fixes a warning reported by common_test.
|
| |\
| |
| | |
Update rabbit_fifo with Ra aux changes
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, there is a small time window where systemd considers the
service as running, but `rabbit:is_running()` would return false.
For instance, if "rabbitmqctl status" is called during that window, it
would return an error saying that RabbitMQ must be started on the node.
This must be the situation hit during package testing in CI.
|
| |/
|
|
|
| |
When testing mixed-versions clusters, we need to check what kind of node
is node B, because we may have to restart it differently.
|
| |\
| |
| | |
rabbit_{amqueue,quorum_queue}: add several listing and sampling functions for new CLI commands
|
| | |
| |
| |
| | |
on both follower and leader nodes.
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
... and skip the testscases in case of an error.
Remove trailing whitespaces while here.
|
| |\
| |
| | |
Move rabbitmq-server(8) scripts to Erlang
|
| | |
| |
| |
| |
| | |
Those log levels, coming from the process environment, take precedence
over whatever is configured.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |\
| |
| | |
Ensure syslog application is started when used as backend
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
... as it is not used.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| | |
Remove duplicated consumers metric in quorum queues
|
| | |
| |
| |
| | |
yet updated
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
... 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.
|
| |/
|
|
|
| |
... in addition to the fact they are disabled. Because a unsupported
feature flag is implicitly disabled.
|
| |
|
|
|
| |
rabbit_ct_broker_helpers will take care of prepending the regular
plugins path.
|
| |\
| |
| | |
Add format/1 for classic queues and totals/type_specific info for all queue types
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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]
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
References #2172
|
| |\ \
| | |
| | | |
Reject basic.get operations on quorum queues with single active consumer enabled
|
| | | |
| | |
| | |
| | |
| | |
| | | |
rabbitmq-server/2164
[#169810347]
|
| |\ \ \
| | | |
| | | | |
A continuation to 2169
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Drop channel source
* Correct optional variable extraction to accommodate MQTT and Erlang client
test suites
|
| | |\ \ \
| | | | |
| | | | |
| | | | | |
https://github.com/velimir/rabbitmq-server into velimir-avoid-get-amqp-params-call
|
| | | | |/
| | |/|
| | | |
| | | | |
performance optimisation
|
| |\ \ \ \
| | | | |
| | | | | |
Skip importing queues and exchanges with invalid names
|
| | | | | | |
|
| |/ / / /
| | | |
| | | |
| | | | |
Fixes #2170
|