Commit Graph

2225 Commits

Author SHA1 Message Date
Michael Klishin b8718c736e
Merge pull request #5020 from rabbitmq/stream-max-segment-size-limit
Limit stream max segment size to 3 GB
2022-06-10 18:53:15 +04:00
Michael Klishin aa8b0dc778
Merge pull request #4985 from rabbitmq/rabbitmq-server-4981
Fix cluster links statistic
2022-06-10 13:50:03 +04:00
Arnaud Cogoluègnes e44b65957d
Limit stream max segment size to 3 GB
Values too large can overflow the stream position field
in the index (32 bit int).
2022-06-10 11:45:57 +02:00
Philip Kuryloski 15a79466b1 Use the new xref2 macro from rules_erlang
That adopts the modern erlang.mk xref behaviour
2022-06-09 23:18:28 +02:00
Luke Bakken 86a509df80
Fix cluster links statistic
Use the `sys_dist` ets table to get distribution port information.

Fixes #4981

Get cluster links stats for TLS dist

Use code from prometheus.erl to get dist links info
2022-06-09 07:20:45 -07:00
Philip Kuryloski 327f075d57 Make rabbitmq-server work with rules_erlang 3
Also rework elixir dependency handling, so we no longer rely on mix to
fetch the rabbitmq_cli deps

Also:

- Specify ra version with a commit rather than a branch
- Fixup compilation options for erlang 23
- Add missing ra reference in MODULE.bazel
- Add missing flag in oci.yaml
- Reduce bazel rbe jobs to try to save memory
- Use bazel built erlang for erlang git master tests
- Use the same cache for all the workflows but windows
- Avoid using `mix local.hex --force` in elixir rules
  - Fetching seems blocked in CI, and this should reduce hex api usage in
    all builds, which is always nice
- Remove xref and dialyze tags since rules_erlang 3 includes them in
  the defaults
2022-06-08 14:04:53 +02:00
Luke Bakken b172bca19b
Add rabbit_consult module
This will be used to fix rabbitmq/osiris#78

If a RabbitMQ `advanced.config` file contains the following:

```
{customize_hostname_check, [
    {match_fun, public_key:pkix_verify_hostname_match_fun(https)}
]}
```

...`file:consult/1` will fail because it does not evaluate terms in the
file.

The code in `rabbit_consult` was copied from this OTP module:

https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_dist_sup.erl

...and then modified for our use.

Add Bazel suite

Use the same license as Erlang/OTP, add link to source cc @dumbbell

Add test and ensure value returned matches file:consult/1

Add test data file

Ensure that Funs are converted to binaries before jsx:encode is called

Add a check that customize_hostname_check can be JSON encoded

Ensure that customize_hostname_check and match_fun are filtered out from listener data
2022-06-05 06:13:49 -07:00
Michael Klishin 5777dc9d44
Merge pull request #4955 from rabbitmq/switch-from-python-to-python3 2022-06-02 13:37:15 +04:00
Philip Kuryloski b24ab46a1a Switch the default python binary for codegen scripts to python3 2022-06-02 10:58:42 +02:00
Loïc Hoguin dc70cbf281
Update Erlang.mk and switch to new xref code 2022-05-31 13:51:12 +02:00
David Ansari 2d14403dad Reduce expiry limit from 100 to 10 years 2022-05-18 12:11:57 +00:00
David Ansari de4eeb678e Set maximum expiration
When applications accidentally set an unreasonable high value for
the message TTL expiration field, e.g. 6779303336614035452,
before this commit quorum queue and classic queue processes crashed:

```
2022-05-17 13:35:26.488670+00:00 [notice] <0.1000.0> queue 'test' in vhost '/': candidate -> leader in term: 2 machine version: 2
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>   crasher:
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     initial call: ra_server_proc:init/1
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     pid: <0.1000.0>
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     registered_name: '%2F_test'
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     exception error: bad argument
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>       in function  erlang:start_timer/4
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>          called as erlang:start_timer(6779303336614035351,<0.1000.0>,
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                                       {timeout,expire_msgs},
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                                       [])
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>          *** argument 1: exceeds the maximum supported time value
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>       in call from gen_statem:loop_timeouts_start/16 (gen_statem.erl, line 2108)
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     ancestors: [<0.999.0>,ra_server_sup_sup,<0.250.0>,ra_systems_sup,ra_sup,
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                   <0.186.0>]
```

In this commit, we disallow expiry fields higher than 100 years.
This causes the channel to be closed which is better than crashing the
queue process.

This new validation applies to message TTLs and queue expiry.

From the docs of erlang:start_timer:
"The absolute point in time, the timer is set to expire on, must be in the interval
[erlang:convert_time_unit(erlang:system_info(start_time), native, millisecond),
 erlang:convert_time_unit(erlang:system_info(end_time), native, millisecond)].
If a relative time is specified, the Time value is not allowed to be negative.

end_time:
The last Erlang monotonic time in native time unit that can be represented
internally in the current Erlang runtime system instance.
The time between the start time and the end time is at least a quarter of a millennium."
2022-05-18 11:01:17 +00:00
Michael Klishin 949f7e37db
Bump credentials_obfuscation to 3.1.0 2022-05-16 23:54:32 +04:00
Michael Klishin 5cf3a43523
Revert "Make master depend on credentials_obfuscation main branch"
This reverts commit 62819f3bcc.

This commit has served its QA purpose.

Will either update Bazel dependency to use git or pin to
a new release instead.
2022-05-14 02:58:07 +04:00
Michael Klishin 62819f3bcc
Make master depend on credentials_obfuscation main branch 2022-05-14 01:42:09 +04:00
David Ansari 84ff7e6dea Increase routing throughput for direct exchange 2022-05-11 15:25:15 +00:00
Philip Kuryloski 2e62cae69e Use rabbitmqctl await_startup instead if erl eval
when starting background nodes for tests
2022-05-04 13:33:03 +02:00
Michael Klishin a66ac8c347
Bump credentials_obfuscation to 3.0.0 2022-05-02 11:57:55 +04:00
Michael Klishin 1d9ef20adb
Drop -Wrace_conditions from Dialyzer opts in more places
for Erlang 25 compatibility
2022-04-30 01:49:09 +04:00
Michael Klishin 7cb439cda6
Merge pull request #4665 from rabbitmq/rabbitmq-server-4588-follow-up
OAuth 2: expand all scope aliases provided
2022-04-27 22:04:32 +04:00
Michael Klishin ca290f1116
OAuth 2: expand all scope aliases provided
Per discussion with @MarcialRosales.

In follow-up to #4588.
2022-04-27 21:21:40 +04:00
Philip Kuryloski a4da3bb332 Add a MODULE.bazel file and enable bzlmod 2022-04-27 16:07:52 +02:00
Michael Klishin f69fe93136
Correct a double quote introduced in #4603 2022-04-20 16:06:36 +04:00
Michael Klishin 7c47d0925a
Revert "Correct a double quote introduced in #4603"
This reverts commit 6a44e0e2ef.

That wiped a lot of files unintentionally
2022-04-20 16:05:56 +04:00
Michael Klishin 6a44e0e2ef
Correct a double quote introduced in #4603 2022-04-20 16:01:29 +04:00
Michael Klishin cfb1d44920
Correct GitHub repo links in Hex metadata 2022-04-20 11:14:12 +04:00
Luke Bakken fb5068a80e
Begin work migrating to native hex publishing
Use hex for credentials_obfuscation dep
2022-04-19 13:21:52 -07:00
Luke Bakken dba25f6462
Replace files with symlinks
This prevents duplicated and out-of-date instructions.
2022-04-15 06:04:29 -07:00
Philip Kuryloski 2dd9bde891 Bring over PROJECT_APP_EXTRA_KEYS values from make to bazel 2022-04-07 17:39:33 +02:00
Philip Kuryloski a22234f6eb Updates for rules_erlang 2.5.0
rabbitmq_cli uses some private rules_erlang apis that have changed in
the upcoming release

Additionally:
- Avoid including both standard and test versions of amqp_client in
integration test suites
- Eliminate most of the compilation order hints (explicit first_srcs)
in the bazel build
- Fix an include statement - in bazel, an app is not available to
itself as a library at compilation time
2022-04-07 14:54:37 +02:00
Loïc Hoguin 499e0b9197
Remove the CQv1 disabled stats from management/Prometheus 2022-04-05 12:37:54 +02:00
Loïc Hoguin 81c0fa7cc1
CQv1: Disable expensive stats killing v1 performance
In particular:

 - io_file_handle_open_attempt
 - queue_index_journal_write

Neither have proven to be very useful in recent years
and with the move to FHC-less and journal-less v2 index
they will slowly become irrelevant. This should be a
good compromise until we can switch to v2 permanently
or rework the stats module to use counters.
2022-04-05 12:37:49 +02:00
Luke Bakken 9799fc6674
Add necessary items for hex-publish to work for amqp10_client 2022-03-29 10:25:45 -07:00
Michael Klishin c5c730c371
Merge pull request #4324 from felixhuettner/fhcs_write_concurrency
Enable write_concurrency for file handle cache stats
2022-03-22 12:20:08 +04:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Felix Huettner fab514f643 Enable write_concurrency for file handle cache stats
During most of the time the file_handle_cache_stats ets table is
used for writing only.
By enabeling `write_concurrency` on the table we allow different values
to be written concurrently without taking a global lock.

There the only codepath reading from the ets table is run on the
`collect_statistics_interval` interval and reads the whole table.
So we can assume we are not blocking any large amount of concurrent reads.
2022-03-14 14:58:36 +01:00
Karl Nilsson 4b193608bb
Merge pull request #3121 from rabbitmq/quorum-queues-v2
QQ: introduce new machine version (2)
2022-03-08 16:19:04 +00:00
Michael Klishin 8ff862f0f6
Merge pull request #4233 from ansd/nxdomain
Wait between retries if nxdomain
2022-03-04 22:05:41 +06:00
David Ansari 1c17773c91 Add at-least once dead-lettering for quorum queues
and message TTL
2022-02-28 16:27:56 +01:00
Philip Kuryloski d8201726ae Ignore dialyzer warnings for most apps 2022-02-21 09:19:56 +01:00
Michael Klishin 127f39a090
Squash a compilation warning 2022-01-28 23:01:19 +03:00
Michael Klishin 057e033431
Introduce definition hashing during import
as an opt-in feature. The goal is to avoid re-importing the definition
from the definition file/directory/source if we know the content
has not changed. Since this feature won't be appropriate for
every environment (sometimes unconditional reimporting is expected),
the feature is opt-in.

This is still a WIP.
2022-01-28 22:52:00 +03:00
Philip Kuryloski efcd881658 Use rules_erlang v2
bazel-erlang has been renamed rules_erlang. v2 is a substantial
refactor that brings Windows support. While this alone isn't enough to
run all rabbitmq-server suites on windows, one can at least now start
the broker (bazel run broker) and run the tests that do not start a
background broker process
2022-01-18 13:43:46 +01:00
Luke Bakken 95a60fc3be
Replace one use of filelib:is_regular/1
This specific case is called multiple times by the Prometheus plugin. It eventually calls `file:read_file_info/1` which leaks on Windows

See #3936
2022-01-11 09:08:34 -08:00
Michael Klishin d2e0fae1aa
Bump (c) year in node startup banner 2022-01-05 09:03:46 +04:00
Luke Bakken 7f0285834e
Fix all uses of file:read_file/1
This is to address another memory leak on win32 reported here:

https://groups.google.com/g/rabbitmq-users/c/UE-wxXerJl8

"RabbitMQ constant memory increase (binary_alloc) in idle state"

The root cause is the Prometheus plugin making repeated calls to `rabbit_misc:otp_version/0` which then calls `file:read_file/1` and leaks memory on win32.

See https://github.com/erlang/otp/issues/5527 for the report to the Erlang team.

Turn `badmatch` into actual error
2022-01-03 11:33:36 -08:00
Michael Klishin 394ee4880a
delegate: documentation edits 2021-12-26 03:19:33 +03:00
tomyouyou 40db6563b8
Optimisation for 'delegate'
This is copied from https://github.com/rabbitmq/rabbitmq-common/pull/349


If a message is sent to only one queue(in most application scenarios), passing through the 'delegate' is meaningless. Otherwise, it increases the delay of the message and the possibility of 'delegate' congestion.

Here are some test data:
node1: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
node2: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz

Join node1 and node2 to a cluster. Create 100 queues on node2, and start 100 consumers to receive messages from these queues.
Start 100 publishers on node1 to send messages to the queues of node2. Each publisher will send 10k messages at the rate of 100/s(10k/s theoretically in total), and all the messages for all publishers is 1 million.

Before optimisation:
{1,[{msg_time,812312(=<1ms),177922(=<5ms),9507(=<50ms),221(=<500ms),38(=<1000ms),0,0,0,0,1061,1069,0,0}]}

After optimisation:
{1,[{msg_time,902854(=< 1ms),93993(=<5ms),3038(=<50ms),96(=<500ms),19(=<1000ms),0,0,0,0,1049,1060,0,0}]}

Additional information:

Time counted here is the stay time of a message in the cluster, that is, Time(leaving from node2 at) - Time(reaching node1 at).
"812312(=<1ms)" is the number of messages with time consumption less than or equal to 1ms.
Overall, the optimisation is effective.
2021-12-07 17:58:42 +08:00
Sagi Sarussi eff5c063cb
Grammar 2021-11-10 15:31:06 +02:00
Arnaud Cogoluègnes 75b2a53f52
Merge pull request #3503 from rabbitmq/super-stream-cli
Add functions to create/delete super stream in manager
2021-10-14 11:01:58 +02:00
Alexey Lebedeff 23be565a38 Allow having multiple `make run-broker` simulatneously
It was automatically happening for e.g. `make start-cluster`.

But some plugins were not covered by default generated config, and
running rabbit from 2 different worktrees was a bit complicated.
2021-10-13 10:52:02 +02:00
Arnaud Cogoluègnes 6b9589bae4
Handle stream arguments in add_super_stream command
max-age, leader-locator, etc.
2021-10-11 16:50:03 +02:00
Michael Klishin 798be7dcaf
Peer discovery AWS, K8S: more Dialyzer fixes 2021-10-07 03:42:44 +03:00
Michal Kuratczyk 1a2126676d Update CLA URL 2021-09-23 14:29:36 +02:00
Michael Klishin 5fb118e8ef
Merge pull request #3409 from rabbitmq/lh-increase-queue-shutdown-timeout
Increase classic queue shutdown timeout
2021-09-21 16:46:21 +03:00
Philip Kuryloski bcd565f2cb Use the +deterministic compiler flag when building with Make 2021-09-17 09:34:50 +02:00
Loïc Hoguin 09c8cd4f98
Increase classic queue shutdown timeout
A value that is too low will prevent the index from shutting
down in time when there are many queues. This leads to the
process being killed and on the next RabbitMQ restart a
(potentially very long) dirty recovery is needed.

The value of 10 minutes was chosen to mirror the shutdown
timeout of the message store. Since both queues and message
store need to have shut down gracefully in order to have
a clean restart it makes sense to use the same value.

Related: c40c2628a9
2021-09-13 10:59:30 +02:00
Philip Kuryloski 5fd9d1f638 Use Ranch 2.1.0 in bazel build
Matches 063d32626d
2021-09-10 14:46:36 +02:00
Loïc Hoguin 0a2bde4ab1
Use the new function ranch_proxy_header:to_connection_info/1 2021-09-09 13:15:08 +02:00
Paweł Chmielowski 6af41527f1 Fix some edge cases in handling ssl information from PROXY protocol
When we fail to parse name of cipher suite from PROXY protocol
just say that no ssl is used, instead of trying to fill that
with data from connection between proxy and our server.
2021-09-06 19:36:42 +02:00
Jean-Sébastien Pédron 689c56cb04
Logging: Add `single_line` flag support to $RABBITMQ_LOG
A user could already enable single-line logging (the `single_line`
option of `logger_formatter` or RabbitMQ internal formatters) from the
configuration file. For example:

    log.console.formatter.single_line = on

With this patch, the option can be enabled from the `$RABBITMQ_LOG`
environment variable as well:

    make run-broker RABBITMQ_LOG=+single_line
2021-09-01 09:31:54 +02:00
Jean-Sébastien Pédron 33c6cbf239
rabbit_env: Add $RABBITMQ_DEFAULT_{USER,PASS,VHOST} and $RABBITMQ_ERLANG_COOKIE vars
Those environment variables are unset by default. The default values are
set in the `rabbit` application environment and can be configured in the
configuration file. However, the environment variables will take
precedence over them respectively if they are set.
2021-08-11 15:50:36 +02:00
Alexey Lebedeff 87532c4af4 Make test/development related makefile vars lazy
They were trying to run `hostname` and `which`, which produced a bunch
of error messages in a hermetic build environment.

And performance of those `shell` calls is not very important, as they
are caled just a few times during script runtime anyway (there is a
hack to make these lazy, but evaluating only once - but it's hardly
worth it).
2021-08-06 17:32:04 +02:00
Michael Klishin c84115f102
Warn when lock could not be acquired successfully 2021-08-05 11:31:35 +03:00
Michael Klishin 22add3c8ca
Acquire locks when starting mirrored supervisor children
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.
2021-08-05 00:39:16 +03:00
Michael Klishin 9a0f4b17cd
More mirrored supervisor logging 2021-08-04 16:58:44 +03:00
Michael Klishin 4f3d5e5e13
Mirrored supervisor: more logging at debug level 2021-08-04 15:56:45 +03:00
Philip Kuryloski c9e016d545 Remove duplicate compilation options in rabbit_common 2021-08-03 14:31:05 +02:00
Michael Klishin 0617419e75
This *is* a Unicode character, U+060E 2021-07-28 19:04:16 +03:00
Ilya Khaprov 854f26ac18
Do not crash on badarg when env file has an 'unusual' unicode character
closes #3212
2021-07-28 16:39:17 +02:00
Jean-Sébastien Pédron ac7df333b6
Revert "rabbitmq-dist.mk: Install CLI scripts as part of the build"
This has the unfortunate side effect of causing a rebuild of all
applications every time. I need to figure out another place to build and
install the CLI during build time (instead of as part of the dist
target).

This reverts commit 4322cca66e.
2021-07-23 10:46:56 +02:00
Philip Kuryloski ae955d44c6 Avoid building the cli scripts in rabbitmq_stream_common
This isn't an issue in the monorepo, but causes problems externally
projects using rabbitmq-components.mk
2021-07-23 10:40:20 +02:00
Jean-Sébastien Pédron 80b428d5d3
rabbit_runtime: Find erl(1) in the ERTS bin directory
erl(1) might not be in the directory pointed by init's root argument.
This is the case with Erlang releases built with relx for instance.
2021-07-22 10:21:37 +02:00
Jean-Sébastien Pédron 4322cca66e
rabbitmq-dist.mk: Install CLI scripts as part of the build
... instead of the `dist` target. This way, the Erlang release can use
them.
2021-07-22 10:21:33 +02:00
Michael Klishin 29bb9c5b0c
Merge pull request #3175 from processone/proxy_protocol_tls_info
Extract TLS informations that are delivered in PROXY protocol frame
2021-07-13 15:08:40 +03:00
Philip Kuryloski 8f9de08de7 Also assert no missing suites for all other deps 2021-07-12 18:05:55 +02:00
Paweł Chmielowski d5daf7598b Extract TLS informations that are delivered in PROXY protocol frame 2021-07-05 13:29:59 +02:00
Michael Klishin 65ccf7ce42
Mirrored supervisor: make it easier to keep track of group membership changes
in the logs.

Referenes #3148.
2021-07-05 14:02:37 +03:00
Michael Klishin 4f01d450e0
Make sure not to wait for epmd-starter subprocess forever
Per discussion in #3162
2021-06-30 15:20:09 +03:00
Michael Klishin 62e7785a48
Canonicalize a few more paths in the startup banner
References #3149
2021-06-28 13:48:13 +03:00
Pavel Heimlich 020b22f9ea fix hostname(1) calls on Solaris 2021-06-17 13:23:05 +02:00
Philip Kuryloski f9d114ad75 dialyze rabbit 2021-05-28 13:27:21 +02:00
Philip Kuryloski fe2e2cfe78 Use dialyzer on rabbit_common
Only dialyze errors will cause a build failure, similar to Erlang.mk
2021-05-28 13:03:55 +02:00
Michael Klishin 6acee761e0
Handle cases where virtual host config file does not yet exist
This happens during queue migration from a pre-3.7 version.

References #2954.
2021-05-27 17:38:53 +03:00
Philip Kuryloski e02132ee0f Fix rabbitmq-components.mk path when publishing to hex pm 2021-05-25 10:29:51 +02:00
Philip Kuryloski 98e71c45d8 Perform xref checks on many tier-1 plugins 2021-05-21 12:03:22 +02:00
Arnaud Cogoluègnes c42930acb0
Set stream plugin default port to 5552 2021-05-19 15:38:52 +02:00
Philip Kuryloski 9053d96ca0 Fix call to deprecated function
https://erlang.org/doc/general_info/deprecations.html#otp-22
2021-05-19 13:38:17 +02:00
Michael Klishin fc7501c309
Convert policy event keys to atoms
so that they are easier to match on
2021-04-28 12:57:06 +03:00
Michael Klishin 60a9a89940
Allow for more ASN.1 string (sub)types 2021-04-20 01:19:38 +03:00
Michael Klishin 73eb9b56ec
Decode other name using 'OTP-PUB-KEY':decode/2
and assume it is a string-like value ("directory string")
because other values would not make much sense in the
username extraction context.

References #2983.
2021-04-20 01:16:29 +03:00
Michael Klishin e15f2b46f3
SAN of type otherName: strip two leading characters
instead of specific ones since they will vary with the payload
(one of them likely indicates UTF string length).

This is still not perfect because we limit the maximum
allowed length but it works fine with identifiers up to 100
characters long, which should be good enough for this
best effort handling of an abscure SAN type.

References ##2983.
2021-04-20 00:20:44 +03:00
Michael Klishin 1587501733
Pass Dialyzer
x.509 certificate extensions do not really have types in
OTP's public_key, so our hands are tied.
2021-04-19 13:56:39 +03:00
Michael Klishin 81f3005b95
rabbit_common: pass Dialyzer 2021-04-19 13:41:29 +03:00
Jean-Sébastien Pédron 6936f2d8a9 rabbit_env: Fix Bourne shell concatenated literal parsing
The parser didn't handle literals of the form:
    'single-quoted'unquoted'single-quoted-again'"or-even-double-quoted"

In particular, the unquoted parsing assumed that nothing else could
follow it. The testsuite is extended with the issue reporter's case.

While here, improve escaped characters handling. They used to be not
parsed specifically at all.

Fixes #2969.
2021-04-19 12:32:53 +02:00
Michael Klishin 21a6b1ba05
x.509 certificate auth mechanism: support (some) SANS of type otherName
Note that the type by definition contains arbitrary values. According
to the OTP types, they are triplets that represent effectively
a key/value pair. So we assume the pair is a string that needs a bit
massaging, namely stripping the UTF encoding prefix OTP AnotherName
decoder leaves in.

Kudos to @Thibi2000 for providing an example value.

Closes #2983.
2021-04-19 02:33:26 +03:00
Jean-Sébastien Pédron 3d1db4b676 rabbit_env: Fix arguments to the ?LOG_DEBUG format string
Format string arguments must be in a list.
2021-04-13 14:20:19 +02:00
Michael Klishin 7f98bc3d1c
Add more VM memory monitor tests, pass Dialyzer
(cherry picked from commit 57ec1f8768)
2021-04-11 11:36:30 +03:00
Michael Klishin 19b104a22f
Update vm_memory_high_watermark/0 type 2021-04-11 10:43:38 +03:00
Michael Klishin 30cbbba167
High VM watermark: support {relative, N} values set via advanced.config
for usability. It is not any different from when a float value
is used and only exists as a counterpart to '{absolute, N}'.

Also nothing changes for rabbitmq.conf users as that format performs
validation and correct value translation.

See #2694, #2965 for background.
2021-04-11 10:28:35 +03:00
kjnilsson b576242952 Increase rabbit_stream_queue_SUITE timetrap
And set the default of make start-cluster to 3 nodes.
2021-04-06 15:50:22 +01:00
Carl Hörberg aac99700e7 get destination address from PROXY protocol 2021-03-30 12:58:49 +02:00
Philip Kuryloski 768a87980d Remove extra spaces in the RABBITMQ_PLUGINS_DIR during tests 2021-03-29 16:59:53 +02:00
Philip Kuryloski 0e7b537af7 Fix self-referencing recursive make variable
Introduced in 388654c542
2021-03-29 14:18:17 +02:00
Philip Kuryloski 388654c542
Add a partial Bazel build (#2938)
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
2021-03-29 11:01:43 +02:00
Philip Kuryloski b62c5499ce Reinstate the `prepare-dist` tasks for rabbitmq components
The consolidation of `rabbitmq-components.mk` broke the previous
method by which rabbit components were detected. Now we check
$(RABBITMQ_COMPONENTS) directly.
2021-03-23 17:42:23 +01:00
Philip Kuryloski a63f169fcb Remove duplicate rabbitmq-components.mk and erlang.mk files
Also adjust the references in rabbitmq-components.mk to account for
post monorepo locations
2021-03-22 15:40:19 +01:00
David Ansari dc589856f2 Wait between retries if nxdomain
In kind version 0.10.0, when creating a 5-node RabbitMQ cluster
with the new parallel PodManagementPolicy, we observed that some
pods were restarted. Their logs included:

```
10:10:03.794 [error]
10:10:03.804 [error] BOOT FAILED
10:10:03.805 [error] ===========
BOOT FAILED
10:10:03.805 [error] ERROR: epmd error for host r1-server-0.r1-nodes.rabbitmq-system: nxdomain (non-existing domain)
10:10:03.805 [error]
===========
ERROR: epmd error for host r1-server-0.r1-nodes.rabbitmq-system: nxdomain (non-existing domain)
10:10:04.806 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {epmd_error,"r1-server-0.r1-nodes.rabbitmq-system",nxdomain} in context start_error
10:10:04.806 [error] CRASH REPORT Process <0.152.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{epmd_error,"r1-server-0.r1-nodes.rabbitmq-system",nxdomain}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
```

Eventually, after some pods restarted up to 2 times, all pods were running and ready.

In kind, we observed that during the first couple of seconds, nslookup was failing as well for that domain
with nxdomain.
It took up to 30 seconds until nslookup succeeded.

With this commit, pods don't need to be restarted when creating a fresh
RabbitMQ cluster.
2021-03-18 18:21:02 +01:00
kjnilsson 52f745dcde Update rabbitmq-components.mk
use v1.x branch of ra
2021-03-18 15:14:40 +00:00
Loïc Hoguin d5e3bdd623
Add ADDITIONAL_PLUGINS variable
This allows including additional applications or third party
plugins when creating a release, running the broker locally,
or just building from the top-level Makefile.

To include Looking Glass in a release, for example:

$ make package-generic-unix ADDITIONAL_PLUGINS="looking_glass"

A Docker image can then be built using this release and will
contain Looking Glass:

$ make docker-image

Beware macOS users! Applications such as Looking Glass include
NIFs. NIFs must be compiled in the right environment. If you
are building a Docker image then make sure to build the NIF
on Linux! In the two steps above, this corresponds to Step 1.

To run the broker with Looking Glass available:

$ make run-broker ADDITIONAL_PLUGINS="looking_glass"

This commit also moves Looking Glass dependency information
into rabbitmq-components.mk so it is available at all times.
2021-03-12 12:29:28 +01:00
Michael Klishin 97ff62d3b2
Drop trailing newlines from logged messages where possible
Lager strips trailing newline characters but OTP logger with the default
formatter adds a newline at the end. To avoid unintentional multi-line log
messages we have to revisit most messages logged.

Some log entries are intentionally multiline, others
are printed to stdout directly: newlines are required there
for sensible formatting.
2021-03-11 15:17:37 +01:00
Jean-Sébastien Pédron cdcf602749
Switch from Lager to the new Erlang Logger API for logging
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.

The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.

The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.

The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:

    2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Licensed under the MPL 2.0. Website: https://rabbitmq.com

The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).

JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:

    Mar  3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}

For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
  * `-` still means stdout
  * `-stderr` means stderr
  * `syslog:` means syslog on localhost
  * `exchange:` means logging to `amq.rabbitmq.log`

`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.

The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.

From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.

In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):

    ?LOG_NOTICE("Logging: switching to configured handler(s); following "
                "messages may not be visible in this log output",
                #{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),

Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.

At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.

The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-03-11 15:17:36 +01:00
Gerhard Lazu 5ac24dd2be
Make start-cluster work when run in the top-level
Subsequent nodes fail to start since ports are already in use. This
makes it possible to start multiple nodes locally with all plugins
enabled.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-03-10 13:15:44 +00:00
dcorbacho 61f7b2a723 Update to ranch 2.0 2021-03-08 23:11:05 +01:00
Michael Klishin fd86959429
Revert "Make rabbit_log:log/2 return 'ok' unconditionally"
This reverts commit 01c4ca2aa9.
2021-03-04 13:13:00 +03:00
Michael Klishin 01c4ca2aa9
Make rabbit_log:log/2 return 'ok' unconditionally
instead of relying on a Lager transform-driven return value.

This should avoid erlang/otp#4576 on Erlang 24.

Per discussion with @lhoguin.
2021-03-04 13:09:29 +03:00
Michael Klishin 8920f05a15
Revert "Squash one more Erlang 24 warning"
This reverts commit fb4f88e7dd.

See erlang/otp#4576
2021-03-04 06:10:23 +03:00
Michael Klishin fb4f88e7dd
Squash one more Erlang 24 warning 2021-03-04 05:38:38 +03:00
Michael Klishin 3a169cc9df
Drive-by: squash an Erlang 24-specific warning 2021-03-04 04:41:20 +03:00
Michael Klishin b6c4831e75
Bump Lager to 3.9.1 2021-03-04 04:36:39 +03:00
Michael Klishin ad47eba2fa
pg2 => pg for OTP 24 compatibility
there is still one failing queue federation test.
2021-03-04 04:06:40 +03:00
Loïc Hoguin 66ac1bf5e9
Bump observer_cli to 1.6.1
More responsive when the system is overloaded with file calls.
2021-03-01 21:55:27 +03:00
Arnaud Cogoluègnes f53c5dc998
Use port 5551 for streams when starting cluster 2021-03-01 21:55:24 +03:00
Michael Klishin 8fe3df9343
Upgrade Lager to 3.9.0 for OTP 24 compatibility
`lager_util:expand_path/1` use changes are
due to erlang-lager/lager#540
2021-02-26 00:52:15 +03:00
Jean-Sébastien Pédron 561d2e660d
rabbit_env: Use consistent style 2021-02-25 11:13:23 +01:00
Jean-Sébastien Pédron a45e87e57b
mk/rabbitmq-run.mk: Compute rabbitmq_stream TCP port based on $(RABBITMQ_NODE_PORT)
We already do this for other TCP ports RabbitMQ listens on. This fixes
the use of `gmake start-cluster` with the rabbitmq_stream plugin
enabled.
2021-02-25 10:47:50 +01:00
Michael Klishin 98b46b2ffb
rabbit_env: pass Dialyzer again 2021-02-25 06:22:36 +03:00
Michael Klishin 7e93cc8d3b
rabbit_env: remove one more direct call to os:list_env_vars/0 2021-02-25 06:13:41 +03:00
Michael Klishin 26b676f021
Try ignore_xref 2021-02-25 06:11:18 +03:00
Michael Klishin cdd0c1662c
Pass xref on OTP 22 and 23 2021-02-25 06:08:16 +03:00
Michael Klishin 752f16abf7
os:list_env_vars/0 was renamed to os:env/0 in OTP 24 2021-02-25 01:10:40 +03:00
Michael Klishin 00b7a84191
Limit direct reply-to identifier length growth
as node names grow.

Prior to this change, direct reply-to consumer channels
were encoded using term_to_binary/1, which means the result
would grow together with node name (since node name
is one of the components of an Erlang pid type).

This means that with long enough hostnames, reply-to
identifiers could overflow the 255 character limit of
message property field type, longstr.

With this change, the encoded value uses a hash of the node name
and then locates the actual node name from a map of
hashes to current cluster members.

In addition, instead of generating non-predictable "secure"
GUIDs the feature now generates "regular" predictable GUIDs
which compensates some of the additional PID pre- and post-processing
outlined above.
2021-02-24 18:21:26 +03:00
Michael Klishin f73e851f9c
Bump observer_cli to 1.6.0 2021-02-24 12:53:55 +03:00
Michael Klishin a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility 2021-02-24 12:53:30 +03:00
Michael Klishin 88bf1ba754
Don't filter out lz4 and looking_glass from dependency list
Now that dependencies are packaged as directories and not .ez
files, the fact that both LG and LZ4 are NIFs is no longer
an issue. And having it as regular dependencies simplifies
REPL-driven profiling.

Per discussion with @dumbbell.
2021-02-16 17:03:36 +03:00
Michael Klishin b7f01c102b
Use an up-to-date Looking Glass repo name 2021-02-16 16:21:49 +03:00
Michael Klishin caddfd3791
Skip aes_ige256 in config value encryption/decryption tests
it is not supported by some libcrypto versions, including CI.

See [1][2].

1. https://github.com/rabbitmq/credentials-obfuscation/pull/10/files
2. https://bugs.erlang.org/browse/ERL-1478
2021-02-07 23:05:27 +03:00
Michael Klishin e5def7f612
Use credentials_obfuscation master in RabbitMQ master 2021-02-07 20:58:07 +03:00
Michael Klishin b11a79cccf
Bump (c) year in header files 2021-02-04 07:04:58 +03:00
Michael Klishin 394d36ab76
Use a record here
accessing record/tuple elements by index is
increases the risk of code breakage when
the record changes.
2021-02-01 20:19:12 +03:00
Arnaud Cogoluègnes b921ac11a8
Merge pull request #2712 from rabbitmq/rabbitmq-stream-prometheus
Add stream prometheus plugin
2021-01-27 16:46:37 +01:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Michael Klishin f9e2996b51
Refactor #2733 a bit more 2021-01-21 15:09:20 +03:00
Michael Klishin 9176944c95
Use slightly more idiomatic Erlang 2021-01-21 11:56:30 +03:00
tomyouyou ae173f11bb
'get_memory_use(ratio)' will have an exception when MemoryLimit is 'infinity' 2021-01-21 16:14:56 +08:00
Arnaud Cogoluègnes b5315c0166
Merge branch 'master' into rabbitmq-stream-prometheus 2021-01-18 11:26:06 +01:00
Michael Klishin a087621257
Handle a 'noport' clause here
Follow-up to #2722
2021-01-16 18:56:13 +05:00
Michael Klishin 075ee09996
Naming, wording 2021-01-16 01:45:12 +05:00
Gabriele Santomaggio 19d28f260a Add log 2021-01-15 13:04:24 +01:00
Gabriele Santomaggio 9ec5b4bf86 Add spec 2021-01-15 11:17:43 +01:00
Gabriele Santomaggio ce5550b974 Add retry for epdm name (hostname)
fixes https://github.com/rabbitmq/rabbitmq-server/issues/2718
2021-01-15 09:09:19 +01:00
Arnaud Cogoluègnes bf72683eb2
Add stream prometheus plugin 2021-01-11 16:49:56 +01:00
Michael Klishin ccfd6627eb
Remove Ranch dependency from rabbit_common
It is not actually used there and may complicate dependency resolution
for RabbitMQ Erlang client users.

Per discussion with @dumbbell
2021-01-07 17:53:47 +03:00
Arnaud Cogoluègnes cbd3c8dfdd
Merge branch 'master' into rabbitmq-stream-management 2021-01-04 09:50:47 +01:00
Michael Klishin e8cb671633
Bump credentials_obfuscation version 2020-12-21 03:42:42 +03:00
Arnaud Cogoluègnes 41160210ab
Start stream consumer REST endpoint 2020-12-01 18:23:22 +01:00
Arnaud Cogoluègnes 23d7e8114c
Introduce stream management plugin 2020-11-19 14:48:25 +01:00
Jean-Sébastien Pédron 778e8dad5c
rabbit_common: Remove the rabbitmq-github-actions Erlang.mk plugin
This is unused after the switch to the "monorepository".
2020-11-17 15:29:05 +01:00
Jean-Sébastien Pédron 47686ee1f0
Remove unused .github directories
They were valid until the switch to the "monorepository" when everything
was merged into a single Git repository.
2020-11-17 13:33:16 +01:00
Arnaud Cogoluègnes 722dda6eaf Update rabbitmq-components.mk to include stream plugin 2020-11-03 14:26:45 +01:00
Luke Bakken fd73767051 Revert "Handle potential undefined value returned from process dictionary"
This reverts commit 04627ef2ef.
2020-11-02 10:02:46 -08:00
Michael Klishin e6972966bb Part of rabbitmq/rabbitmq-auth-mechanism-ssl#12 2020-10-30 18:46:09 +03:00
Michael Klishin 0284c222e5 Merge branch 'master' into update-cowboy-dep 2020-10-21 09:44:22 +03:00
Michael Klishin 4dfffd312f Remove a (now) unused delegate 2020-10-20 21:14:42 +03:00
Luke Bakken f0c1d17e3a Remove code to guess thread pool size
Part of rabbitmq/rabbitmq-server#2473
2020-10-20 10:23:54 -07:00
Loïc Hoguin 44be0b1114 Update Cowboy to 2.8.0
This will enable stacktraces in the logs again.
2020-10-20 17:07:45 +02:00
Luke Bakken 04627ef2ef Handle potential undefined value returned from process dictionary
CI failures such as this suggest that file handle values can be deleted
mid-operation:

https://github.com/rabbitmq/rabbitmq-server/actions/runs/304216635
2020-10-15 05:49:16 -07:00
Michael Klishin 45158f49ac Merge pull request #409 from rabbitmq/auth-attempt-metrics
Add auth attempt metrics
2020-10-14 23:56:02 +03:00
Jean-Sébastien Pédron 6d1c7dc6d7 Travis CI: Test against Erlang 22.3+23.0 and Elixir 1.10 2020-10-13 11:39:43 +02:00
Jean-Sébastien Pédron b9defc1bff rabbit_env: Fix parsing of $CONF_ENV_FILE output
The `set` command in the implementation of `/bin/sh` included in the
official RabbitMQ Docker image returns multi-line variable values
differently than the tested Bourne shell implementation (GNU Bash, dash
and FreeBSD sh).

I don't know what implementation is used by that Docker image, but here
is the output of `set`, for a variable set to "\n'test'":

    TEST_VAR='
    '"'"'test'"'"

The problem was reported in the following discussion:
https://github.com/rabbitmq/rabbitmq-server/discussions/2458

While here, add a small testcase to check a couple outputs.
2020-10-07 15:33:49 +02:00
kjnilsson db59327963 Move rabbit_mics:confirm_to_sender/3 to server
As it is only used by the server and does not need to be a shared
function.
2020-10-07 13:05:07 +01:00
Nicolas Caille 6f3681210e remove TLSv1.3 from BAD_SSL_PROTOCOL_VERSIONS 2020-10-06 21:27:53 +02:00
Jean-Sébastien Pédron 3a65b3c624 rabbitmq-github-actions.mk: Use Elixir 1.10.4
This is the minimum requirement now, because that's the oldest version
we test against.
2020-10-05 15:46:07 +02:00
Jean-Sébastien Pédron 8bd3bede55 rabbitmq-github-actions.mk: Test with Erlang 23.1
... instead of 23.0.

Erlang 23.1 is the version the Concourse pipelines use. We expect the
Concourse pipelines and the GitHub Actions workflow to be on the same
page.
2020-10-05 15:44:49 +02:00
Jean-Sébastien Pédron e5127eaea3 rabbit_log: Restore alphabetical order in the defintion of category() 2020-10-05 14:21:52 +02:00
kjnilsson e0a210cc67 Dialyzer fixes 2020-10-02 10:22:10 +01:00
kjnilsson b87898185b Take stream queue dir into account
For rabbit_env suite.
2020-09-30 14:41:59 +01:00
Arnaud Cogoluègnes 749faa85fa Add stream plugin port in start-cluster target 2020-09-30 14:41:59 +01:00
kjnilsson 28b6b812b1 Add osiris logger sink 2020-09-30 14:41:59 +01:00
kjnilsson bbd0cc8198 Add osiris logging shim 2020-09-30 14:41:59 +01:00
kjnilsson f7dcd081fa change return message format 2020-09-30 14:41:59 +01:00
dcorbacho 0cec212896 Stream queue data dir 2020-09-30 14:41:59 +01:00
Michael Klishin 5a215e0f03 Merge branch 'master' into lrb-update-supervisor 2020-09-30 11:22:15 +03:00
Michael Klishin 8f7ecf363f Migrate a supervisor2 suite by @lukebakken from rabbitmq-server
References rabbitmq/rabbitmq-server#2457.
2020-09-30 11:00:32 +03:00
Luke Bakken 39ec461331 Fix transient type handling 2020-09-29 13:49:34 -07:00
Luke Bakken a0bd637558 Fix function ordering to restart correctly. Reduce log spam. 2020-09-29 11:52:35 -07:00
Luke Bakken 6ed6573cef Update mix_task_archive_deps version
https://github.com/rabbitmq/mix_task_archive_deps/releases/tag/0.5.0

See this as well:

https://github.com/rabbitmq/mix_task_archive_deps/pull/2

https://groups.google.com/d/topic/rabbitmq-users/0d8TBs_qmGE/discussion
2020-09-28 15:36:02 -07:00
Michael Klishin 2c14e1dd3f Merge branch 'master' into lrb-update-supervisor 2020-09-26 10:00:57 +03:00
Michael Klishin 160742ea8a rpc module calls can return a {badrpc, term()} 2020-09-24 23:15:32 +03:00
dcorbacho 9c56b0cffc Add get_auth_attempts_by_source api 2020-09-23 15:52:50 +01:00
Luke Bakken c1d59f600c Remove tabs 2020-09-22 12:13:44 -07:00
Luke Bakken 111124bc05 Several bug fixes found when running tests
Validate delay value
2020-09-22 12:08:32 -07:00
dcorbacho 8bb1fbdf3d Merge remote-tracking branch 'origin/master' into auth-attempt-metrics 2020-09-22 17:11:08 +01:00
dcorbacho 0d09fb0a85 Split auth attempt metrics into global and detailed
GC collection can then be done by deleting all entries on the ETS table
and total counters per protocol can be kept without individually scanning
all entries
2020-09-22 16:47:10 +01:00
dcorbacho 4c6251d3fb Include protocol in auth metrics 2020-09-22 16:46:52 +01:00
Luke Bakken db7dfdf0cf Remove old supervisor2 module 2020-09-21 15:15:11 -07:00
Luke Bakken 0a87aeace5 Begin migration of code from supervisor2 to the 22.3.4.10 version
Moved a lot of code from old supervisor to new one

All compilation errors fixed

Use the macro, Luke
2020-09-21 15:14:49 -07:00
Philip Kuryloski c1a4790c7b Erlang 21.3 -> 22.3 for `make github-actions`
This has no direct effect until GitHub Actions workflows are
regenerated using make
2020-09-02 10:21:20 +02:00
Luke Bakken 4c9d67bb9d Do not change the behavior of rpc_call 2020-09-02 03:42:58 +03:00
Luke Bakken bf199aa36c Set RPC_TIMEOUT to 15 seconds 2020-09-02 03:42:58 +03:00
Luke Bakken 3f1c26d951 Add function to allow setting timeout on multicall
A timeout will be handled as an empty result.

@michaelklishin - should that be logged?
2020-09-02 03:42:58 +03:00
dcorbacho 4ad6396475 Add auth attempt metrics 2020-08-28 13:21:13 +01:00
Michael Klishin 8f2df3bad0 Bump credentials_obfuscation to 2.2.0 2020-08-20 14:27:01 +03:00
Jean-Sébastien Pédron 94de4c07ba rabbit_nodes_common: Disable Dialyzer warning for diagnostics_node/1
net_adm:name/1 returns a new value, 'noport', in Erlang 24. This value
being absent in the function spec in previous versions of Erlang, we get
a warning from Dialyzer until we start to the yet-to-be-release Erlang
24 in CI. Therefore we disable this specific warning.
2020-08-20 14:27:01 +03:00
Jean-Sébastien Pédron 2f779e8668 rabbit_nodes_common: Handle `noport` return value from net_adm:names/1
This is a new return value in Erlang 24 when the hostname passed to
net_adm:names/1 couldn't be resolved.
2020-08-20 14:27:01 +03:00
Jean-Sébastien Pédron 32be18d42a rabbitmq-dist.mk: Exclude `ebin/dep_built` from plugin packaging
This is a state file for Erlang.mk only.
2020-08-20 14:27:01 +03:00
Jean-Sébastien Pédron f59db9f8a6 rabbitmq-dist.mk: Package plugins as directories by default
... instead of .ez archives.

The benefits for doing this:

* We can use native code, as is the case for lz4 and zstd bindings in
  the Tanzu RabbitMQ version for instance. Indeed, Erlang does not
  support loading native code (NIF or port drivers) from .ez archives.

* We can remove custom code to handle .ez archives. We have special
  cases in Erlang.mk plugins as well as the `rabbit_plugins` module, in
  particular the code to extract .ez archives (even though Erlang knows
  how to use them directly).

* Prevent hard to debug situations when the .ez archive name does not
  match the top-level directory inside the archive. In this case, Erlang
  says it can't load the application but doesn't tell much more.

* Debugging and "hot-patching" plugins become easier: we just have to
  copy the recompiled .beam file in place of the existing one. There
  is no need to unpack the plugin, replace the file and recreate the
  archive.

* Release packages can be smaller. gzip, bzip2 and xz, common
  compression algorithm for Unix packages, give much better result if
  they compress the .beam files directly instead of "compressing" zip
  files (the .ez archives are plain zip archives). For instance, the
  generic-unix package goes from 15 MiB when using .ez archives to just
  12 MiB when using directory.

I would also like to experiment with Erlang releases in the future.
Using directories for Erlang applications instead of .ez archives is
mandatory for this to work according to my latest tests.

Of course, this change doesn't break support for .ez archives (and we
will keep support for this). End users can still download third-party
plugins as .ez archives and drop them in the plugins directory.
2020-08-20 14:27:01 +03:00
Luke Bakken d9b352a8ff Avoid using os:find_executable to find erl
On Windows, the current working directory is also searched, which can
lead to problems. Instead, use `init:get_argument(root)` to get the root
of the Erlang release, then we know `bin/erl` will always be present.
2020-08-20 14:27:01 +03:00
Luke Bakken 866b810d0e rabbitmq-components.mk: Improve top-level DEPS_DIR detection for rabbit_prelaunch 2020-08-20 14:27:00 +03:00
Jean-Sébastien Pédron efda8c587e rabbitmq-components.mk: Improve top-level DEPS_DIR detection
In addition to the `rabbitmq-components.mk` existence check, we now
verfy that the directory is named `deps`.

This is to increase the chance that, if we find a
`rabbitmq-componentS.mk` file in the upper directories, this project is
indeed inside a DEPS_DIR.

For instance, in our GitHub Actions workflows, when we prepared the
secondary umbrellas for mixed-version testing, it happened that the
secondary umbrellas were under a clone of rabbitmq-server. Therefore
the first (and only) condition was met and the Makefile erroneously
considered it was inside a DEPS_DIR. As a consequence, dependencies of
the umbrellas were fetched in the wrong place.
2020-08-20 14:27:00 +03:00
Luke Bakken 700fbd7873 Update method to determine dependency directories
This new method by @dumbbell will work with any sub-component, not just the umbrella
2020-08-20 14:27:00 +03:00
Michael Klishin 2aa5d04a9f Bump credentials_obfuscation to 2.1.1 2020-08-20 14:27:00 +03:00
Jean-Sébastien Pédron 9bec817372 GitHub Actions: Default to Erlang 21.3 and 23.0 2020-08-20 14:27:00 +03:00
dcorbacho cbd99c9b4c Update erlang.mk 2020-08-20 14:27:00 +03:00
Michael Klishin bd6c8932a9 Bump stdout_formatter to 0.2.4 2020-08-20 14:27:00 +03:00
Michael Klishin 839f7ca7d1 Bump sysmon_handler to 1.3.0 2020-08-20 14:26:59 +03:00
Michael Klishin 362f0edc06 Bump JSX to 2.11.0 2020-08-20 14:26:59 +03:00
dcorbacho 09c2760bb4 Revert drop of Exhibit B on MPL 2.0 2020-08-20 14:26:59 +03:00
Michael Klishin 4deee618ab Bump credentials_obfuscation to 2.2.0 2020-08-14 08:02:13 +03:00
Jean-Sébastien Pédron d82cf55e3e rabbit_nodes_common: Disable Dialyzer warning for diagnostics_node/1
net_adm:name/1 returns a new value, 'noport', in Erlang 24. This value
being absent in the function spec in previous versions of Erlang, we get
a warning from Dialyzer until we start to the yet-to-be-release Erlang
24 in CI. Therefore we disable this specific warning.
2020-08-13 15:02:51 +02:00
Jean-Sébastien Pédron 9c2f7ee01f rabbit_nodes_common: Handle `noport` return value from net_adm:names/1
This is a new return value in Erlang 24 when the hostname passed to
net_adm:names/1 couldn't be resolved.
2020-08-13 14:36:04 +02:00
Jean-Sébastien Pédron ebd88bc7e8 rabbitmq-dist.mk: Exclude `ebin/dep_built` from plugin packaging
This is a state file for Erlang.mk only.
2020-08-11 16:19:19 +02:00
Michael Klishin 406fe48fce Merge branch 'master' into lrb-find-erl-safely 2020-08-09 04:12:43 +03:00
Jean-Sébastien Pédron 9d62a6df30 rabbitmq-dist.mk: Package plugins as directories by default
... instead of .ez archives.

The benefits for doing this:

* We can use native code, as is the case for lz4 and zstd bindings in
  the Tanzu RabbitMQ version for instance. Indeed, Erlang does not
  support loading native code (NIF or port drivers) from .ez archives.

* We can remove custom code to handle .ez archives. We have special
  cases in Erlang.mk plugins as well as the `rabbit_plugins` module, in
  particular the code to extract .ez archives (even though Erlang knows
  how to use them directly).

* Prevent hard to debug situations when the .ez archive name does not
  match the top-level directory inside the archive. In this case, Erlang
  says it can't load the application but doesn't tell much more.

* Debugging and "hot-patching" plugins become easier: we just have to
  copy the recompiled .beam file in place of the existing one. There
  is no need to unpack the plugin, replace the file and recreate the
  archive.

* Release packages can be smaller. gzip, bzip2 and xz, common
  compression algorithm for Unix packages, give much better result if
  they compress the .beam files directly instead of "compressing" zip
  files (the .ez archives are plain zip archives). For instance, the
  generic-unix package goes from 15 MiB when using .ez archives to just
  12 MiB when using directory.

I would also like to experiment with Erlang releases in the future.
Using directories for Erlang applications instead of .ez archives is
mandatory for this to work according to my latest tests.

Of course, this change doesn't break support for .ez archives (and we
will keep support for this). End users can still download third-party
plugins as .ez archives and drop them in the plugins directory.
2020-08-07 17:22:47 +02:00
Luke Bakken b499da835e Avoid using os:find_executable to find erl
On Windows, the current working directory is also searched, which can
lead to problems. Instead, use `init:get_argument(root)` to get the root
of the Erlang release, then we know `bin/erl` will always be present.
2020-08-07 08:06:43 -07:00
Luke Bakken a127b7fada rabbitmq-components.mk: Improve top-level DEPS_DIR detection for rabbit_prelaunch 2020-08-04 08:55:08 -07:00
Jean-Sébastien Pédron 4934e2b01e rabbitmq-components.mk: Improve top-level DEPS_DIR detection
In addition to the `rabbitmq-components.mk` existence check, we now
verfy that the directory is named `deps`.

This is to increase the chance that, if we find a
`rabbitmq-componentS.mk` file in the upper directories, this project is
indeed inside a DEPS_DIR.

For instance, in our GitHub Actions workflows, when we prepared the
secondary umbrellas for mixed-version testing, it happened that the
secondary umbrellas were under a clone of rabbitmq-server. Therefore
the first (and only) condition was met and the Makefile erroneously
considered it was inside a DEPS_DIR. As a consequence, dependencies of
the umbrellas were fetched in the wrong place.
2020-07-30 12:01:44 +02:00
Luke Bakken 8f4f0c9618 Update method to determine dependency directories
This new method by @dumbbell will work with any sub-component, not just the umbrella
2020-07-29 10:01:42 -07:00
Michael Klishin 2473d9e62c Bump credentials_obfuscation to 2.1.1 2020-07-29 04:42:02 +03:00
Jean-Sébastien Pédron 782bead4c0 GitHub Actions: Default to Erlang 21.3 and 23.0 2020-07-24 16:03:04 +02:00
dcorbacho f9228fb071 Update erlang.mk 2020-07-21 14:31:38 +01:00
Michael Klishin 1b89b2203d Bump stdout_formatter to 0.2.4 2020-07-21 13:12:36 +03:00
Michael Klishin a27969c2f2 Bump sysmon_handler to 1.3.0 2020-07-21 03:42:37 +03:00
Michael Klishin 3e668819e3 Bump JSX to 2.11.0 2020-07-21 03:42:37 +03:00
dcorbacho 749e5c9ee1 Revert drop of Exhibit B on MPL 2.0 2020-07-20 16:55:58 +01:00
Anupama Singh 9495a5f8cb user_limits feature flag implementation 2020-07-17 15:55:47 +01:00
Ayanda-D acb586e0a9 Per-user connection and channel tracking records, definitions, types 2020-07-17 15:55:47 +01:00
Anupama Singh 3ce3b9d995 New field limits in #internal_user to store the user limits 2020-07-17 15:54:18 +01:00
Michael Klishin 8780e4eee0 Update MPL2 license file, drop Exhibit B
and add a VMware copyright notice.

We did not mean to make this code Incompatible with Secondary Licenses
as defined in [1].

1. https://www.mozilla.org/en-US/MPL/2.0/FAQ/
2020-07-17 14:53:09 +03:00
Michael Klishin d1f27b08b8 Drive by change: squash a compiler warning 2020-07-14 03:50:09 +03:00
Michael Klishin 2b80223ed6 Initial API bits for marking a node as being drained (or not)
Part of #2321.
2020-07-14 03:50:09 +03:00
Michael Klishin 58dc58d846 Introduce node maintenance state record 2020-07-14 03:50:08 +03:00
Michael Klishin 62c08ca4c6 Merge branch 'master' into switch-to-MPL-2.0 2020-07-10 13:01:20 +03:00
Jean-Sébastien Pédron 368586ec1b Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-07 18:06:39 +02:00
Jean-Sébastien Pédron 33acee94cc rabbit_env: Give precedence to $RABBITMQ_* prefixed variables in the output of $CONF_ENV_FILE
When we source the $CONF_ENV_FILE script, we set a few variables which
this script expects. Those variables are given without their prefix. For
instance, $MNESIA_BASE.

The $CONF_ENV_FILE script can set $RABBITMQ_MNESIA_BASE. Unfortunately
before this patch, the variable would be ignored, in favor of the
default value which was passed to the script ($MNESIA_BASE).

The reason is that variables set by the script are handled in the
alphabetical order. Thus $MNESIA_BASE is handled first, then
$RABBITMQ_MNESIA_BASE.

Because the code didn't give any precedence, the first variable set
would "win". This explains why users who set $RABBITMQ_MNESIA_BASE in
$CONF_ENV_FILE, but using RabbitMQ 3.8.4+ (which introduced
`rabbit_env`), unexpectedly had their node use the default Mnesia base
directory.

The patch is rather simple: when we check if a variable is already set,
we give precedence to the $RABBITMQ_* prefixed variables. Therefore, if
the $CONF_ENV_FILE script sets $RABBITMQ_MNESIA_BASE, this value will be
used, regardless of the value of $MNESIA_BASE.

This didn't happen with variables set in the environment (i.e. the
environment of rabbitmq-server(8)) because the prefixed variables
already had precedence.

Fixes rabbitmq/rabbitmq-common#401.
2020-07-07 16:28:18 +02:00
Jean-Sébastien Pédron 9ab7942d83 rabbit_log: Add Logger handler's log/2 API
This allows RabbitMQ to configure `rabbit_log` as a Logger handler.

See a related commit in rabbit_prelaunch_early_logging in
rabbitmq-server, where `rabbit_log` is being configured as a Logger
handler. The commit message explains the reason behind this.
2020-07-06 14:18:05 +02:00
Jean-Sébastien Pédron 878c5e23cd Update erlang.mk 2020-06-23 17:12:59 +02:00
Jean-Sébastien Pédron 061f306ced GitHub Actions: Fix mentions of "rabbitmq-cli" 2020-06-10 17:47:33 +02:00
Jean-Sébastien Pédron 78585ad70a GitHub Actions: Trigger rabbitmq-server workflows after a commit
... to this repository's `master` branch.

The idea is to make sure rabbitmq-server is tested against this new
version of rabbitmq-common.
2020-06-10 16:35:15 +02:00
Michael Klishin a5923705f7 Bump Recon to 2.5.1
for Erlang 23 compatibility of 'rabbitmq-diagnostics observer'

References zhongwencool/observer_cli#68.
2020-06-09 08:22:15 +03:00
Michael Klishin 0e577ee358 Merge branch 'master' into rabbitmq-cli-424 2020-06-05 17:22:08 +03:00
Michael Klishin 5a74a54dd4 Introduce a way to list available NICs in a more presentable format
Part of rabbitmq/rabbitmq-cli#424
2020-06-05 17:21:39 +03:00
Jean-Sébastien Pédron 76a789fbac rabbit_env_SUITE: Prevent load of `$CONF_ENV_FILE` for the entire testsuite
It avoids any pollution from the environment.
2020-06-05 11:43:22 +02:00
Jean-Sébastien Pédron 1ca5c3e72e rabbit_env_SUITE: Test context_to_code_path() for Windows as well 2020-06-05 11:43:14 +02:00
Jean-Sébastien Pédron 474ab2204c rabbit_env: Use the context's OS type in get_user_lib_dirs() 2020-06-05 10:21:06 +02:00
Jean-Sébastien Pédron b002ad6eed rabbit_env: Organize Unix' do_load_conf_env_file as the Window version 2020-06-05 10:21:06 +02:00
Luke Bakken d6a16caa9b rabbit_env: Add support for RABBITMQ_CONF_ENV_FILE on Windows
Fixes #392

Fixes from ERL-1269

match the map

deal with line endings
2020-06-05 10:21:00 +02:00
Michael Klishin 9f6087acc6 Message store settings we already have use the "msg_store" prefix 2020-06-03 20:36:17 +03:00
Philip Kuryloski c40c2628a9 Add a specific shutdown timeout macro and property for message stores
The default timeout of 30 seconds was not sufficient to allow graceful shutdown of a message store with millions of persistent messages. Rather than increase the timeout in general, introduce a new macro with a default of 600 seconds
2020-06-02 14:37:13 +02:00
Michael Klishin c3db0a1beb Introduce rabbit_types:error/2
Part of #2356.
2020-05-30 04:41:29 +03:00
Jean-Sébastien Pédron e6f383dd94 GitHub Actions: Pass files between jobs using artefacts
... instead of the cache action.

The cache action is quite unstable (failing to download the cached
files). In this commit, we try to use the artefacts instead. At this
point, we don't know if it is more reliable, but we'll see with time.

As an added bonus, we can download the archives passed between jobs for
inspection if we need.
2020-05-25 10:18:16 +02:00
Michael Klishin e629102397 Update type specs in rabbit_pbe
In follow-up to rabbitmq/rabbitmq-server#2351, #389.
2020-05-22 16:05:35 +03:00
Luke Bakken fe6312f0ca Add function heads to rabbit_pbe to take credentials-obfuscation 2.0 into account 2020-05-20 19:04:28 -07:00
Luke Bakken 846ac6e957 Update to credentials_obfuscation 2.0
Part of the following:
https://github.com/rabbitmq/credentials-obfuscation/pull/5
2020-05-20 16:08:26 -07:00
Jean-Sébastien Pédron 8d5ddda02a rabbitmq-build.mk: Don't add rabbitmq_cli to compiler path in amqp_client
Otherwise, for instance, running Dialyzer in the Erlang client fails with the
following error if it was cloned directly (i.e. outside of the Umbrella):

dialyzer: Bad directory for -pa: .../amqp_client/deps/rabbitmq_cli/_build/dev/lib/rabbitmqctl/ebin
2020-05-20 17:37:12 +02:00
Jean-Sébastien Pédron 64975ffe47 Revert switch to sys:get_log/1
It  does not exist in Erlang 21.
2020-05-19 17:06:50 +02:00
Jean-Sébastien Pédron 148a40a095 Address deprecation of erlang:get_stacktrace/0 and sys:get_debug/3 2020-05-19 16:48:59 +02:00
Jean-Sébastien Pédron 228aaf5885 GitHub Actions: Run Dialyzer with the latest Erlang version 2020-05-11 12:59:50 +02:00
Jean-Sébastien Pédron fae348f0ed GitHub Actions: Recreate secondary umbrellas in case of cache failure
We don't want the job to fail just because GitHub Actions failed to
restore the cache of the secondary umbrellas. We can just recreate them.
2020-05-11 12:58:41 +02:00
Jean-Sébastien Pédron 681bd126e0 GitHub Actions: Improve caching of secondary umbrellas
The cache key is based on the list of umbrellas included and the version
of Erlang because we now run `make test-dist` in the relevant project.
2020-05-07 12:57:34 +02:00
Jean-Sébastien Pédron 29856aad84 rabbit_env: Add get_used_env_vars/0 to fetch variables used by rabbit_env
... and their value.

Both prefixed and non-prefixed variables are returned by this function.

While here, fix a conflict between $RABBITMQ_HOME and $HOME in
var_is_used/1: the latter shouldn't be considered as used.
2020-05-06 18:32:21 +02:00
Gerhard Lazu eb29dd4dd2 Trigger test workflows on new-commit-to-dep-release-branch events
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-05-01 13:00:45 +01:00
Jean-Sébastien Pédron 0d27b9ad20 GitHub Actions: Add mixed-version cluster testing
When we generate the workflows, we pick the latest tag of each release
branch. That list of tags is used to clone secondary umbrellas in the
workflows and run the testsuites against each of them.

When generating workflows for `master`, we take the latest tag of each
release branch.

When generating workflows for a release branch, we take the latest tag
of each older release branch, plus the first tag of the same release
branch.

Some examples:
* `master` is tested with 3.8.3 and 3.7.25
* `v3.8.x` is tested with 3.8.0 and 3.7.25
2020-04-30 17:12:34 +02:00
Jean-Sébastien Pédron a6297a6589 GitHub Actions: Move `make bats` to rabbitmq-server
This is specific to rabbitmq-server and won't work in any other
repository.
2020-04-30 17:12:09 +02:00
Jean-Sébastien Pédron d409fd268a GitHub Actions: Rename template chunks to leave room 2020-04-30 16:59:10 +02:00
Jean-Sébastien Pédron 287fdefd15 GitHub Actions: Remove '/' from workflow names 2020-04-30 16:59:10 +02:00
Jean-Sébastien Pédron 7987702cdb GitHub Actions: Pass FAIL_FAST=1 and SKIP_AS_ERROR=1 to `make ct`
With this variable passed, testing will stop at the first failure
(instead of trying all testcases) and a skipped testcase is considered a
failure.
2020-04-30 16:59:10 +02:00
Jean-Sébastien Pédron a442dc597c GitHub Actions: Set vim shiftwidth & expandtab in headers 2020-04-30 15:48:25 +02:00
Jean-Sébastien Pédron 876552c95e rabbitmq-plugin.mk: Fix copy-paste error 2020-04-30 12:35:24 +02:00
Jean-Sébastien Pédron a8a47a42e3 GitHub Actions: Upload rabbitmq-deps.mk to S3 only for `master` & release branches 2020-04-28 13:19:38 +02:00
Jean-Sébastien Pédron 8006d36c04 rabbitmq-github-actions.mk: Set `DO_COMMIT=yes` to automatically commit
... the generated workflows.
2020-04-28 13:16:37 +02:00
Jean-Sébastien Pédron cf7041421a rabbitmq-github-actions.mk: Use $(base_rmq_ref) from rabbitmq-components.mk
..in templates.
2020-04-28 13:16:17 +02:00
Jean-Sébastien Pédron 1f623b1c07 GitHub Actions: Replace a hard-coded "21.3" by $(ERLANG_VERSION) 2020-04-27 17:56:10 +02:00
Jean-Sébastien Pédron 3c6a4c1f15 GitHub Actions: Use GitHub Actions "run_id" when uploading rabbitmq-deps.mk to S3
We need a monotonically increasing number for the version used by the
Concourse S3 resource. A Git commit hash does not work because they do
not have this property.
2020-04-27 14:46:13 +02:00
Jean-Sébastien Pédron 2b1e0f4bfc GitHub Actions: Don't cache `ebin` for now
It messes with Erlang.mk when a workflow is restarted, leading to a
failure in `make xref`.
2020-04-27 14:45:59 +02:00
Jean-Sébastien Pédron 7bf6f736a3 rabbitmq-github-actions.mk: New Erlang.mk plugin to help manage GitHub Actions workflows
The main entry point is `make github-actions` which generates the
workflows.

Currently, it handles workflows to test the project with different
versions of Erlang.
2020-04-27 13:22:34 +02:00
Jean-Sébastien Pédron 2d4b898b23 rabbitmq-tools.mk: Add project name & commit hash as a comment in rabbitmq-deps.mk
The comment is on the first line of the `$(PROJECT)-rabbitmq-deps.mk`
file.
2020-04-27 12:52:54 +02:00
Michael Klishin a8017e8675 rabbit_event:notify/{2,3}: support map events 2020-04-25 21:48:47 +03:00
Jean-Sébastien Pédron 509a218013 rabbitmq-tools.mk: New `rabbitmq-deps.mk` target
It generates a file called `$(PROJECT)-rabbitmq-deps.mk` which has a
dependency definition line of the form expected by Erlang.mk, for each
RabbitMQ component the project depends on.

Therefore the line indicates:
* `git` as the fetch method
* the repository URL
* the Git commit hash the dependency is on

Here is an example for rabbitmq-server:

    dep_rabbit_common := git https://github.com/rabbitmq/rabbitmq-common.git d9ccd8d9cdd58310901f318fed676aff59be5afb
    dep_rabbitmq_cli := git https://github.com/rabbitmq/rabbitmq-cli.git f6eaae292d27da4ded92b7c1b51a8ddcfefa69c2
    dep_rabbitmq_codegen := git https://github.com/rabbitmq/rabbitmq-codegen.git 65da2e86bd65c6b6ecd48478ab092721696bc709
2020-04-22 11:57:38 +02:00
Jean-Sébastien Pédron 2e06989877 Update erlang.mk 2020-04-21 15:52:57 +02:00
Luke Bakken af7466c1c8 Use PLATFORM to determine hostname command 2020-04-20 07:50:57 -07:00
Luke Bakken 30dbad3214 Use "hostname -s" only on Darwin
Fixes #374
2020-04-17 12:31:08 -07:00
Jean-Sébastien Pédron f818953072 rabbitmq-dist.mk: Fix incorrect quoting in install-cli-scripts
The double-quoting was requited in the flock(1)/lockf(1) blocks because
of the use of `sh -c`. However it's incorrect in the `else` block.

Follow-up to commit 3f32a36e50.
2020-04-15 13:56:05 +02:00
Jean-Sébastien Pédron e3cd5fad8d rabbitmq-run.mk: Replace two CLI calls with fast equivalents
The CLI has a high startup time. To speed up the
`start-background-broker` and `stop-node` recipes, two CLI calls are
replaced by two more basic commands which achieve the same goal.
2020-04-14 14:20:04 +02:00
Jean-Sébastien Pédron 3f32a36e50 rabbitmq-dist.mk: Defer computation of `$rabbit_scripts_dir` to install-cli-scripts recipe
The problem with the previous approach was that the `$(wildcard ...)`
directives might be evaluated too early: `deps/rabbit` might not be
available yet.

Moving the computation to the body of the recipe fixes the problem
because dependencies are available at this point.
2020-04-14 14:18:07 +02:00
Jean-Sébastien Pédron b93b89187b rabbitmq-dist.mk: Fix `install-cli-scripts` when rabbit is top-level
In other words, if instead of cloning the Umbrella, one cloned
rabbitmq-server directly, the `install-cli-scripts` recipe would fail to
copy the scripts because it assumed `rabbit` was under `$(DEPS_DIR)`.

Now expected places are checked and an error is emitted if the recipe
can't find the right one.
2020-04-06 13:07:58 +02:00
Philip Kuryloski 7ef99b8e25 Avoid the dependency on rabbit_ct_helpers in worker_pool_SUITE
This breaks the cyclic dependency between rabbitmq_ct_helpers and
rabbit_common.
2020-03-25 10:33:06 +01:00
Michael Klishin 435e493491 Add rabbitmq_ct_helpers to test dependencies
Requried as of #368.
2020-03-25 01:15:49 +03:00
Philip Kuryloski 4c73437a33 Move over worker_pool_SUITE from rabbitmq-server
to consolidate worker pool tests in a single location
2020-03-23 15:26:31 +01:00
Philip Kuryloski 3c0617eef0 use is_process_alive for a cleaner test
according to Michael's suggestion
2020-03-23 15:26:31 +01:00