Commit Graph

1921 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron a070290864 rabbitmq-tools.mk: Add compress-ct-logs target
If there are common_test logs (i.e. `logs` exists), it creates an archive
(compressed with xz(1)) in the top-level directory.

The archive is named `$(PROJECT)-ct-logs-$timestamp.tar.xz` by default.
The name can be changed by setting `$(CT_LOGS_ARCHIVE)`. The file
extension must be `.tar.xz`.
2020-03-17 19:30:48 +01:00
Jean-Sébastien Pédron bb3f355b37 rabbitmq-run.mk: Build RabbitMQ once when using start-{brokers,cluster}
... instead of once per started nodes.
2020-03-17 18:42:12 +01:00
Jean-Sébastien Pédron 13bbfa0dfd rabbitmq-run.mk: Use := instead of ?= in target-specific var. assignment
The documentation says we should be able to use ?=, but apparently it
affects the way variables are passed to sub-make.

The issue we had is that using: `make start-cluster RABBITMQ_CONFIG_FILE=...`
didn't work as expected: `$(RABBITMQ_CONFIG_FILE)` made it to the
sub-make but not to the sub-make's recipe.

Using := fixes the problem.

Doing that is ok because assigning `$(RABBITMQ_CONFIG_FILE)` in the
environment or on make(1)'s command line will override the
target-specific variable anyway.
2020-03-17 18:38:20 +01:00
Jean-Sébastien Pédron b175b2e667 rabbitmq-run.mk: Re-use $(comma) from Erlang.mk 2020-03-17 18:34:54 +01:00
Luke Bakken d59d332bd1 Fix leading tabs 2020-03-16 07:52:23 -07:00
Michael Klishin 47e8053a41 (c) updates for 2020
Pair: @dumbbell.
2020-03-16 15:00:48 +03:00
Michael Klishin 982df58b0f rabbit_nodes_common:make/1: support node parts that are not strings
Such as atoms and binaries.

Pair: @dumbbell.
2020-03-16 15:00:48 +03:00
Gerhard Lazu 382565c507 Double-escape \ so that the config file is generated correctly
Thanks @lukebakken!

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-16 10:52:39 +00:00
Gerhard Lazu 7bfbdba2df Use a better colour for all debug logs
They were plain by default & are now blue which works really well with
Gruvbox Dark. I couldn't change just the debug color, had to redefine
them all.

cc @dumbbell @lukebakken

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-13 23:21:03 +00:00
Gerhard Lazu 1da5f922fe Keep test_rabbitmq_config_with_tls in sync with the default one
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-13 23:19:39 +00:00
Gerhard Lazu f54691f4b9 Enable colourful debug logging by default
When running the broker locally, in dev, this is what most of us want.
To change this, use e.g. RABBITMQ_LOG=info (previous default).

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-11 12:02:04 +00:00
Jean-Sébastien Pédron fa4b552a9b Update copyright (year 2020) 2020-03-10 15:26:49 +01:00
Jean-Sébastien Pédron 6d48b5f7d3 rabbitmq-run.mk: Set Ra's wal_sync_method to `sync`
This turns off WAL preallocation and saves 400+ MiB per node directory.

This setting only applies to nodes started with `make run-broker` or
from our testsuites. RabbitMQ default configuration remains unaffected.
2020-03-09 13:03:12 +01:00
Jean-Sébastien Pédron 979b6f6972 rabbitmq-dist.mk: Change the condition again to match $(PORJECT) instead
Using dependencies seemed sensible in the first place, but they are also
special cases like `rabbit` itself. In the end, it looks simpler to just
list rabbitmq-common and rabbitmq-amqp1.0-common in a blacklist and
install CLI for everything else.
2020-03-06 14:04:22 +01:00
Jean-Sébastien Pédron 7a8c74f617 rabbitmq-dist.mk: Consider $TEST_DEPS when installing CLI (or not)
Follow-up to commit 0e5e25d961.
2020-03-06 12:41:08 +01:00
Jean-Sébastien Pédron 0e5e25d961 rabbitmq-dist.mk: Don't install CLI if the project dost not depend on `rabbit`
This is the case of rabbitmq-common and rabbitmq-amqp1.0-common for
instance.
2020-03-06 12:25:12 +01:00
Gerhard Lazu 46ef666075 Use dev prometheus.erl in RabbitMQ master (3.9.x)
We want to test PRs such as
https://github.com/deadtrickster/prometheus.erl/pull/102
in RabbitMQ master (3.9.x) so that we can test fixes against other
master components, like OTP 23 (erlang-git).

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-06 09:04:07 +00:00
Gerhard Lazu 8fb9ce1450 Merge pull request #359 from rabbitmq/erlang-mk-query-deps
Add erlang.mk query-deps
2020-03-06 09:01:13 +00:00
Gerhard Lazu 24eb242135 Add erlang.mk query-deps* family of targets
After checking out this branch, run the following command in the
umbrella:

    make update-erlang-mk

This will enable the following command across all RabbitMQ deps:

    make query-deps

And this is what the output for one such dependency looks like:

    pwd
    /Users/gerhard/github.com/rabbitmq/3.9.x/deps/rabbitmq_management

    make query-deps
    rabbitmq_management: ranch hex https://hex.pm/packages/ranch 1.7.1
    rabbitmq_management: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    rabbitmq_management: rabbit git_rmq https://github.com/rabbitmq/rabbitmq-server master
    rabbitmq_management: amqp_client git_rmq https://github.com/rabbitmq/rabbitmq-erlang-client master
    rabbitmq_management: cowboy hex https://hex.pm/packages/cowboy 2.6.1
    rabbitmq_management: cowlib hex https://hex.pm/packages/cowlib 2.7.0
    rabbitmq_management: rabbitmq_web_dispatch git_rmq https://github.com/rabbitmq/rabbitmq-web-dispatch master
    rabbitmq_management: rabbitmq_management_agent git_rmq https://github.com/rabbitmq/rabbitmq-management-agent master
    rabbit_common: rabbitmq_codegen git_rmq https://github.com/rabbitmq/rabbitmq-codegen master
    rabbit_common: lager hex https://hex.pm/packages/lager 3.8.0
    rabbit_common: jsx hex https://hex.pm/packages/jsx 2.9.0
    rabbit_common: ranch hex https://hex.pm/packages/ranch 1.7.1
    rabbit_common: recon hex https://hex.pm/packages/recon 2.5.0
    rabbit_common: credentials_obfuscation hex https://hex.pm/packages/credentials_obfuscation 1.1.0
    lager: goldrush git https://github.com/DeadZen/goldrush.git 0.1.9
    rabbit: rabbitmq_cli git_rmq https://github.com/rabbitmq/rabbitmq-cli master
    rabbit: syslog git https://github.com/schlagert/syslog 3.4.5
    rabbit: cuttlefish hex https://hex.pm/packages/cuttlefish 2.2.0
    rabbit: ranch hex https://hex.pm/packages/ranch 1.7.1
    rabbit: lager hex https://hex.pm/packages/lager 3.8.0
    rabbit: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    rabbit: ra git https://github.com/rabbitmq/ra.git master
    rabbit: sysmon_handler hex https://hex.pm/packages/sysmon_handler 1.2.0
    rabbit: stdout_formatter hex https://hex.pm/packages/stdout_formatter 0.2.2
    rabbit: recon hex https://hex.pm/packages/recon 2.5.0
    rabbit: observer_cli hex https://hex.pm/packages/observer_cli 1.5.3
    rabbitmq_cli: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    rabbitmq_cli: observer_cli hex https://hex.pm/packages/observer_cli 1.5.3
    observer_cli: recon hex https://hex.pm/packages/recon 2.5.0
    cuttlefish: getopt hex https://hex.pm/packages/getopt 1.0.1
    cuttlefish: lager hex https://hex.pm/packages/lager 3.7.0
    ra: elvis_mk git https://github.com/inaka/elvis.mk.git master
    ra: aten hex https://hex.pm/packages/aten 0.5.3
    ra: gen_batch_server hex https://hex.pm/packages/gen_batch_server 0.8.2
    amqp_client: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    cowboy: cowlib git https://github.com/ninenines/cowlib 2.7.0
    cowboy: ranch git https://github.com/ninenines/ranch 1.7.1
    rabbitmq_web_dispatch: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    rabbitmq_web_dispatch: rabbit git_rmq https://github.com/rabbitmq/rabbitmq-server master
    rabbitmq_web_dispatch: cowboy hex https://hex.pm/packages/cowboy 2.6.1
    rabbitmq_management_agent: rabbit_common git_rmq https://github.com/rabbitmq/rabbitmq-common master
    rabbitmq_management_agent: rabbit git_rmq https://github.com/rabbitmq/rabbitmq-server master

re https://github.com/ninenines/erlang.mk/pull/875

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-03-05 15:10:37 +00:00
Jean-Sébastien Pédron cb432fd664 rabbitmq-tools.mk: Only update `.travis.yml` if branches match
... between the current project and rabbitmq-common.

Like with `rabbitmq-components.mk`, this avoids to use an incorrect copy
if the current project uses a different branch or does not have e.g. a
`v3.8.x` branch (unlike rabbitmq-common).
2020-03-04 16:15:48 +01:00
Jean-Sébastien Pédron 54e290683d Travis CI: Set $current_rmq_ref based on Travis variables
We need to communicate this information to rabbitmq-components.mk so it
selects the right branch for each dependency.

By default, it would query git(1), but after Travis clones and possibly
merges branches, it does not have access to the information anymore.
Forunately, the Travis environment has everything we need.

$base_rmq_ref was already set properly in a previous commit.

If Travis is building a tag, $TRAVIS_BRANCH will contain the appropriate
value, so this works in this case as well.

We now also check if `rabbitmq-components.mk` is up-to-date.
2020-03-04 13:32:57 +01:00
Jean-Sébastien Pédron ec93c7dce3 Travis CI: Ensure Elixir is installed
To do so, we set the language to Elixir, even though almost all our
projects are written in Erlang. But we need Elixir for the RabbitMQ CLI.

Specifying Elixir as the language in Travis allows us to:
1. make sure Elixir is installed by Travis
2. specify the versions of both Erlang/OTP and Elixir

We also set an explicit install step. Not that we care about `mix
local.hex`, but we need to override the default Travis install step
which assumes this is an Elixir (mix) based project.

We take this opportunity to add Erlang/OTP 22.2 to the build matrix.

While here, we bring two fixes:
* Warnings reported by Travis are solved: the OS is set explicitly and
  `sudo` is removed.
* The "git checkout" gymnastic is replaced by simply setting
  `$base_rmq_ref`. This is a better solution to make sure the
  appropriate dependencies' branch is selected.
2020-03-04 10:51:21 +01:00
Jean-Sébastien Pédron 5dc227a6eb rabbitmq-run.mk: Skip builds in `make run-broker NOBUILD=1`
This can allow for faster RabbitMQ startup time when we know there is
nothing to compile.
2020-03-03 18:33:46 +01:00
Jean-Sébastien Pédron 15c47804ec rabbitmq-tools.mk: Don't add .travis.yml is there none in the first place
One has to manually add it the first it is used in a project.
2020-03-03 18:32:48 +01:00
Michael Klishin 2305b23cd9 Avoid using erlang:get_stacktrace/0 for improved OTP 23/24 compat 2020-02-27 22:25:46 +03:00
Jean-Sébastien Pédron dea423ad36 rabbit_env: Add `$RABBITMQ_CONFIG_FILES`
It is used to specify additional configuration files when using the
Cuttlefish format.

[#171491267]
2020-02-26 15:35:57 +01:00
Jean-Sébastien Pédron 3aa7dd1adb rabbit_env: Add $RABBITMQ_{PRODUCT_NAME,PRODUCT_VERSION,MOTD_FILE}
They are used to override the product name and version, and expand the
banners which are printed and logged on startup.

[#170054940]
2020-02-20 17:48:54 +01:00
Jean-Sébastien Pédron 7638a5439f rabbitmq-run.mk: Set console log level to debug
Exactly as we previously set the file log level to debug.

Note that it does not enable logging on the console, it only changes the
default log level if the user of `make run-broker` enables console
logging (using `make run-broker RABBITMQ_LOGS=-`).

[#171131596]
2020-02-13 09:54:45 +01:00
Gerhard Lazu f80c456370 Bump prometheus.erl & observer_cli to latest
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-02-11 15:57:23 +00:00
Jean-Sébastien Pédron ca844d994b Merge pull request #354 from rabbitmq/extract_sd_notify
Remove systemd_notify_socket
2020-02-10 15:24:33 +01:00
Michael Klishin cf52b22f37 Transitonal step for OTP 23 [master] compat 2020-02-09 23:47:46 +03:00
Michael Klishin 4be3ff3f14 rabbit_misc:sort_field_table/1: support map arguments
This is convenient when working with objects deserialised
from JSON definitions.
2020-02-08 01:22:10 +03:00
Philip Kuryloski bc7e8e19f2 Remove systemd_notify_socket
The env var is now handled directly by rabbitmq_prelaunch rabbit_boot_state_systemd
2020-02-07 10:46:17 +01:00
Jean-Sébastien Pédron 994d0d4116 rabbit_env_SUITE: Check if $RABBITMQ_FEATURE_FLAGS is overridden
This happens when testing mixed-versions cluster in CI. This fixes the
test after commit 23a0a07e3a.

[#170149339]
2020-02-04 15:19:37 +01:00
Jean-Sébastien Pédron 780dd0de40 rabbit_env: Set $RABBITMQ_ENABLED_PLUGINS to an empty string to disable all plugins
The previous value accepted for this behavior was "NONE". But it's more
intuitive to set it to nothing.

`rabbitmq-run.mk` is also updated to allow `$RABBITMQ_ENABLED_PLUGINS`
to be overriden e.g. on the command line.
2020-01-24 12:54:43 +01:00
Jean-Sébastien Pédron ad8dbdaed6 rabbit_nodes_common: New name_type/1 function
It guesses the node name type, based on the host part of a node name.
I.e., if it contains at least a `.` character, it's a longname.

This matches the verification `net_kernel` does to make sure the node
name corresponds to the shortnames/longnames option.
2020-01-22 12:05:15 +01:00
Jean-Sébastien Pédron 82192ad881 rabbit_env: Improve how we locate the plugins directory
There are two changes in this patch:

1. In `get_default_plugins_path_from_node(), we base the search on
   `rabbit_common.app` instead of `code:lib_dir(rabbit_common)`.
   The latter only works if the application directory is named
   `rabbit_common` or `rabbit_common-$version`. This is not the case
   with a default Git clone of the repository because the directory will
   be named `rabbitmq-common`.

   Using `rabbit_common.app` is fine because it is inside the `ebin`
   directory, as all modules. It also brings another benefit: it is not
   subject to cover-compilation or preloading (which both get rid of the
   original module location).

2. The code to determine the plugins directory based on the directory
   containing the module (or `rabbit_common.app`) now takes into account
   plugin directories (as opposed to .ez archives). In this case, there
   is one less path component compared to an .ez archive.
2020-01-21 14:50:07 +01:00
Jean-Sébastien Pédron 23a0a07e3a rabbit_env: Record variables' origin
I.e. we record the fact that a particular value:
  * is the default value, or
  * comes from an environment variable, or
  * comes from querying a remote node

This required a significant refactoring of the module, which explains
the large diff.

At the same time, the testsuite was extended to cover more code and
situations.

This work permits us to move remaining environment variables checked by
`rabbit` to this module. They include:
  * $RABBITMQ_LOG_FF_REGISTRY
  * $RABBITMQ_FEATURE_FLAGS
  * $NOTIFY_SOCKET

[#170149339]
2020-01-21 12:46:06 +01:00
Jean-Sébastien Pédron 972643a99d rabbit_env: Fix an error reported by Dialyzer
value_is_yes() is always called with a string as argument.
2020-01-21 12:02:54 +01:00
Jean-Sébastien Pédron 006c4f3895 rabbitmq-dist.mk: Don't install CLI when testing rabbitmq-common
We don't need the CLI in this case and this would be a dependency
circle: rabbitmq-common <- rabbitmq-cli <- rabbitmq-common.
2020-01-21 12:02:54 +01:00
Jean-Sébastien Pédron 6331123a54 include/rabbit.hrl: Plugins' dependencies are a list of atom()
... not a list of tuples.
2020-01-16 11:48:37 +01:00
Jean-Sébastien Pédron 96ffc4bc3b Sort feature_flags/federation log categories alphabetically 2020-01-13 18:37:07 +01:00
Jean-Sébastien Pédron 39064b3d64 Add `rabbit_log_feature_flags` log category 2020-01-13 17:01:27 +01:00
Jean-Sébastien Pédron 5e4d4af150 rabbit_misc: Add `rabbitmq_related_module_attributes/0`
Compared to `all_module_attributes/0`, it only scans applications which
are related to RabbitMQ: either a RabbitMQ core application or a plugin
(i.e. an application which depends on `rabbit`).

On my laptop, this significantly reduce the time to query module
attributes in the case of feature flags: it goes from 830 ms to 235 ms
just by skipping all Erlang/OTP applications are third-party
dependencies.

This makes a small improvement to RabbitMQ startup time, which is
visible for developers mainly, not for a production instance.
2020-01-13 16:59:07 +01:00
Michael Klishin 818362766d (c) bump
(cherry picked from commit 013ba83abcce06c52c12e2a41e728c1e2399be60)
2019-12-29 05:55:51 +03:00
Michael Klishin 4e5123c1de rabbit_writer state: gc_threshold => writer_gc_threshold, references #343 2019-12-24 23:40:42 +03:00
Michael Klishin d64dcc0a29 Bump default GC threshold to the same 1GB 2019-12-20 08:03:28 +03:00
Michael Klishin d5f67e1f9f Merge branch 'configurable_gc_threshold' of https://github.com/nyczol/rabbitmq-common into nyczol-configurable_gc_threshold 2019-12-20 03:34:11 +03:00
Jean-Sébastien Pédron 6ba6dd63f5 Merge pull request #344 from rabbitmq/lrb-mqtt-stomp-start-cluster
Add MQTT and STOMP port calc to start-cluster
2019-12-18 11:41:34 +01:00
Luke Bakken 101371778a Remove RABBITMQ_GENERATED_CONFIG_DIR
No longer applies after merge of rabbitmq/rabbitmq-server#2180
2019-12-16 11:00:12 -08:00
Jean-Sébastien Pédron e0ea1432ca rabbitmq-tools.mk: Add `sync-gitignore-from-master` helper
To be used in branches other than `master`. It will take `.gitignore`
from master and replace the current copy with it.

Like a few other targets, it supports `DO_COMMIT=yes` to commit the
change as well.
2019-12-13 14:40:59 +01:00
Luke Bakken edf8f892d4 Add MQTT and STOMP port calc to start-cluster 2019-12-12 07:35:38 -08:00
Jean-Sébastien Pédron 179d1657a8 rabbitmq-components.mk: Locate Umbrella relative to $(APPS_DIR)/my_app as well
When we are running Makefile recipes from an application under
`$(APPS_DIR)`, we want to locate the Umbrella correctly to:
- set `$(DEPS_DIR)` accordingly
- prevent `make distclean` from removing `$(DEPS_DIR)`

Before this change and after `rabbit/apps/rabbitmq_prelaunch` was added,
running `make distclean` in `rabbit` removed everything under
`$(DEPS_DIR)`.
2019-12-12 13:04:23 +01:00
Jean-Sébastien Pédron 0fb6f466e4 rabbit_env: Fix typo in comment about Dialyzer 2019-12-12 13:01:09 +01:00
Jean-Sébastien Pédron e5b3d45726 rabbit_env: Fix Dialyzer warnings
There was one legitimate warning in `get_enabled_plugins()`:
`get_prefixed_env_var()` already takes care of converting an empty
string to false.

The other warning is because `loading_conf_env_file_enabled()` returns a
boolean when compiled for tests, but always true when compiled for
production. Dialyzer only sees the second case and thinks the cases
where the function returns false will never happen.
2019-12-12 12:18:41 +01:00
ANycz e31131dca1 make garbage collector threshold configurable 2019-12-11 21:35:53 +01:00
Jean-Sébastien Pédron a7a305dca2 include/rabbit.hrl: Move Erlang/OTP required versions to `rabbitmq_prelaunch` 2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron 90d5c28445 rabbitmq-dist.mk: Empty `$(DIST_AS_EZS)` to distribute plugins as dirs
... instead of `.ez` archives.

The default is still to create `.ez` archives for all RabbitMQ
components & plugins.

However if `$(USE_RABBIT_BOOT_SCRIPT)` is set (experimental and
undocumented for now), they are distributed as directories.
2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron e2f4fc3e04 rabbitmq-run.mk: Don't run rabbitmq-plugins(8) to enable plugins
This is handled by the `rabbitmq_prelaunch` application now, based on
the value of `$RABBITMQ_ENABLED_PLUGINS`.

`$(RABBITMQ_ENABLED_PLUGINS_FILE)` depended on `dist`. This dependency
was moved to individual `run-*` and `start-*` targets.

While here, re-use `test-dist` instead of `dist` if the build was
already done for tests.

The testsuites default to run `make test-dist` as a first step.
Therefore later, when it starts a node, it should re-use that instead of
depending on `make dist` which will rebuild the tested project and
remove test dependencies from plugins.

This is useful (and mandatory in fact) now that `rabbit` is packaged
like plugins because, in the case of rabbitmq-erlang-client for
instance, the broker is a `$(TEST_DEPS)`: if starting a node runs `make
dist`, the broker will be removed.
2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron 12d48ff717 rabbitmq-dist.mk: Fix concurrent runs of `make {,test-}dist` and `make install-cli`
The fix depends on the presence of lockf(1) or flock(1).
2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron 5840834fa8 rabbitmq-dist.mk, rabbitmq-run.mk: Copy scripts & escripts
... to the plugin being worked on, instead of locating `rabbit` and
taking the scripts there.

It greatly simplifies the use of RabbitMQ and plugins inside a
development working copy because the layout is closer to what we would
have in a package. I.e. there are far less special cases.
2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron 405f86f39b rabbitmq-dist.mk: Create an .ez archive for `rabbit` too
The goal is to distribute RabbitMQ core (the `rabbit` Erlang
application) exactly as we distribute plugins. This simplifies the
startup script and CLI tools when we have to setup Erlang code search
path.
2019-12-11 14:45:39 +01:00
Jean-Sébastien Pédron 11c29bfb29 Add `rabbit_log_prelaunch` log category
While here, sort categories alphabetically and add missing ones to the
declared type().
2019-12-11 14:45:38 +01:00
Jean-Sébastien Pédron 77b655bc71 rabbit_env: New module to prepare context based on environment
... and default values.

It can also query a remote node for some specific values. The use case
is the CLI which should know what the RabbitMQ node it controls uses
exactly.

It supports several new environment variables:

  RABBITMQ_DBG:
    Used to setup `dbg` for some simple tracing scenarios.

  RABBITMQ_ENABLED_PLUGINS:
    Used to list plugins to enable automatically on node startup.

  RABBITMQ_KEEP_PID_FILE_ON_EXIT:
    Used to indicate if the PID file should be removed or kept when the
    node exits.

  RABBITMQ_LOG:
    Used to configure the global and per-category log levels and enable
    ANSI colors.
2019-12-11 14:45:35 +01:00
Jean-Sébastien Pédron 5b13de0927 rabbitmq-dist.mk: Ensure `make test-dist` is not always out-of-date
`ebin/test` is always touch(1)'d by Erlang.mk, which made the list of
dependencies of an .ez archive newer than the archive itself. This caused the
archive to be recreated.

While here, set `TEST_DIR` to something random in the case of `make
test-dist`: this way, rebuilding all testsuites is skipped by Erlang.mk.
Yes, this is a hack.
2019-12-05 14:54:16 +01:00
Jean-Sébastien Pédron ba498049ed rabbit_misc: Use PowerShell to check process aliveness on Windows
At least on the Windows Server 2019 AWS EC2 image, the `tasklist`
command is unavailable.

If that's the case, we fallback to using a PowerShell oneliner. It's not
the default, just in case PowerShell is unavailable.
2019-12-05 12:29:41 +01:00
Jean-Sébastien Pédron da3e784a7a rabbitmq-build.mk: Don't add Elixir lib dir to `$ERL_LIBS`
This is now done in xrefr (`mk/xrefr`) and rabbimq-ct-helpers when
needed.

This has several benefits:
  * This fixes `make run-broker` on Windows because the computed
    `$ERL_LIBS` was invalid there.
  * This saves a lot of Makefile processing time, because elixir(1) is
    quite slow to startup. On my laptop, a complete build in
    rabbitmq-server-release from 8.5 seconds to 3 seconds.
2019-12-05 12:29:30 +01:00
Michael Klishin 388f514e1a rabbit_misc:append_rpc_all_nodes/4: wrap non-list return values
into a list, as the function implies.

All current call sites use it to call functions that return lists.
However, rabbitmq/rabbitmq-cli#389 breaks this cycle.
2019-12-05 06:50:15 +03:00
Luke Bakken decd320133 Merge pull request #340 from rabbitmq/lrb-epmd-starter-tweak
epmd-starter improvements
2019-11-19 10:18:22 -08:00
Michael Klishin 5784240b99 Extract parse_bool/1 and parse_int/1 from rabbit_mgmt_util
A follow-up to rabbitmq/rabbitmq-management#749.
2019-11-19 19:10:48 +03:00
Michael Klishin 4361cd6ddf Merge pull request #339 from rabbitmq/rabbitmq-management-749
Move some helpers from rabbitmq-management
2019-11-19 02:27:13 +03:00
Luke Bakken b4b7549ad3 Special-case x-queue-type classic/undefined
Fixes #341
2019-11-15 13:33:43 -08:00
Luke Bakken 7eb5b3c5d5 epmd-starter improvements
* Use `noinput`
* Use `-s erlang halt` to skip small `eval` overhead
* Use `no_dot_erlang` boot file since we do not want user customizations to interfere
2019-11-14 10:40:44 -08:00
Michael Klishin 5aef852257 Move some helpers from rabbitmq-management
Part of rabbitmq/rabbitmq-management#749.
2019-11-12 03:07:14 +03:00
Michael Klishin d0384fabfe Merge branch 'master' into reserve-qq-file-handles 2019-10-24 11:57:40 +03:00
Yury.Alioshinov 80dc973aae add forgotten ldap type 2019-10-20 23:38:52 +03:00
Michael Klishin f03f4886c3 Naming 2019-10-17 00:07:42 +03:00
dcorbacho 2c56e75158 Reserve the 3 fixed ra file handles
[#169063174]
2019-10-16 10:44:21 +01:00
dcorbacho df0f34d1cb Reserve file handles for quorum queues
These should be taken into account into the limits, but always be granted.
Files must be reserved by the queues themselves using `set_reservation/0` or
`set_reservation/1`. This is an absolute reservation that increases or
decreases the number of files reserved to reach the given amount on every
call.

[#169063174]
2019-10-15 15:16:10 +01:00
Michael Klishin 6798bc3575 Make license line in startup banner more specific 2019-10-04 20:12:44 +03:00
Jean-Sébastien Pédron 2625f43086 rabbitmq-run.mk: Fix generated rabbitmq-server configuration
To configure the AMQP TCP listener, the key is `tcp_listeners`, not
`listeners`.
2019-09-13 13:47:16 +02:00
kjnilsson 353382c94e Change Ra dep back to git master
To more easily align RabbitMQ and Ra developement
2019-09-13 09:23:33 +01:00
kjnilsson 44d01eb9d0 update ra dep 2019-09-04 11:02:03 +01:00
Jean-Sébastien Pédron ad52a23bb5 rabbitmq-run.mk: Set $RABBITMQ_BASE
Otherwise on Windows, the broker may read system files: this would
pollute the test environment.
2019-09-03 18:14:38 +02:00
Jean-Sébastien Pédron 3dd58ae12a rabbitmq-run.mk: Bump `rabbitmqctl wait` timeout from 10 to 60 seconds
... when we wait for a node started in the background.

This helps when the PID is written asynchronously by the Erlang node
instead of the rabbitmq-server(8) script: in this case, the `rabbitmqctl
wait` command may start to wait earlier in the former situation than the
latter one, and thus timeout earlier.
2019-09-03 18:10:48 +02:00
Jean-Sébastien Pédron f6780f1bec rabbitmq-dist.mk: Sort files inside the .ez archives
This helps with reproducible builds.
2019-09-03 18:10:39 +02:00
Jean-Sébastien Pédron bb5022ccec rabbitmq-dist.mk: Ensure rsync(1) arg is a Unix-like path
On Windows, if we pass it a Windows-native path like `C:\User\...` or
even something with forward slashes, rsync(1) will consider that `C`
(before the colon) is a hostname and it should try to connect to it.

Using `cygpath.exe` on Windows converts the Windows path to a Unix-like
one (e.g. `/c/Users/...`).
2019-09-03 12:02:20 +02:00
Michael Klishin c5df5043e9 rabbit_types:vhost/0 now delegates to vhost:name/0
[#166298298]
2019-08-30 10:58:34 +02:00
Diana Corbacho b94e01c90c The vhost record moved to a versioned record in rabbitmq-server
Add metadata to virtual hosts

[#166298298]

rabbit_vhost: use record defaults

The vhost record moved to a versioned record in rabbitmq-server

Co-Authored-By: Michael Klishin <mklishin@pivotal.io>
2019-08-30 10:19:50 +02:00
Jean-Sébastien Pédron a1fb3fcc37 Update erlang.mk 2019-08-29 20:44:37 +02:00
Michael Klishin 735c47eca9 Depend on credentials_obfuscation 1.1.0 2019-08-20 13:21:40 +10:00
Michael Klishin 91dd7dd1ab A typo 2019-08-20 13:13:07 +10:00
Michael Klishin b4990145de Use credentials_obfuscation from Hex 2019-08-20 13:10:07 +10:00
Michael Klishin b7f3114ebd Merge pull request #334 from rabbitmq/optimise-erlang-timers
Replace timer:send_after/3 by erlang:send_after/3
2019-08-17 08:45:29 +10:00
Michael Klishin 485888bbcd Switch to eunit macros for assertions 2019-08-17 05:47:42 +10:00
codeadict 5fb17b0943 Add stop{1,3} functions to gen_server2
These functions utilize proc_lib:stop, which in turn utilizes sys:terminate.

They were introduced in
9d7d1207ff.

Closes: #266
2019-08-16 12:14:48 -04:00
Diana Corbacho b580595ea4 Replace timer:send_after/3 by erlang:send_after/3
[#167926549]
2019-08-16 15:29:38 +01:00
Michael Klishin 65675b5f1f Merge pull request #332 from rabbitmq/rabbitmq-erlang-client-123-crypted-password-in-state
Enable credential obfuscation
2019-08-16 12:14:33 +10:00
Jean-Sébastien Pédron 57c14b1214 rabbitmq-{build,run,tools}.mk: Pass several variables to sub-makes
This saves a lot of time because:
1. we don't spawn a shell each time to compute the same value;
2. elixir(1) has a long startup time.

In my tests, a no-op gmake in `rabbit` goes from 2.5 seconds to 0.9
seconds.
2019-08-14 11:29:07 +02:00
Jean-Sébastien Pédron 79d7969c16 rabbitmq-run.mk: No need to find erl_call(1)
We don't use it anymore in the Makefiles. This speeds up the build
because we don't spawn a shell for something useless in the end.
2019-08-14 11:27:06 +02:00
Jean-Sébastien Pédron 16b702e0ca rabbitmq-run.mk: Use GNU Make functions to prepare $(DIST_ERL_LIBS)
... instead of Unix commands and a one-liner which assumes that `:` is
the path separator. This speeds up the build because we don't spawn a
shell.

While here, also remove `$(APPS_DIR)` from `$(ERL_LIBS)`.
2019-08-14 11:25:27 +02:00
Arnaud Cogoluègnes e4a935c49f Use credentials obfuscation application
rabbit_pbe is now delegating calls to the credentials obfuscation
app/library.

[#167070941]

References rabbitmq/rabbitmq-erlang-client#123
2019-08-13 09:50:25 +02:00
Arnaud Cogoluègnes dceeee8e31 Merge branch 'master' into rabbitmq-erlang-client-123-crypted-password-in-state 2019-08-12 14:02:09 +02:00
Michael Klishin 407cbfd503 Bump Lager to 3.8.0 2019-08-11 01:47:34 +10:00
Jean-Sébastien Pédron 0b20c2dd6b rabbitmq-tools.mk: Fix tags counting in `commits-since-release`
We have to apply the same tag filtering when counting them as the one
done by git-describe(1).

This fixes the following error:

    fatal: No names found, cannot describe anything

This issue was hit when there were tags in the project, but they were
all filtered out by git-describe(1).
2019-08-09 11:00:15 +02:00
Jean-Sébastien Pédron 205042d593 Update erlang.mk 2019-08-02 09:53:18 +02:00
Michael Klishin f2e147b025 Bump observer_cli and sysmon_handler deps 2019-08-01 17:11:57 +03:00
Arnaud Cogoluègnes 9f98340fd2 Add credentials obfuscation module
WIP, the secret is hardcoded, which is obviously not secured. It is
enough though to see if modules/applications manipulating credentials
can use it to avoid those credentials to end up in logs when the state
of crashed processes is dumped.

[#167070941]

References rabbitmq/rabbitmq-erlang-client#123
2019-07-29 16:09:40 +02:00
Jean-Sébastien Pédron 4af40e2d25 rabbitmq-run.mk: Compute MQTT and STOMP TCP ports for `run-broker`
They are based on `$(RABBITMQ_NODE_PORT)`, like the management plugin's
computed port.
2019-07-26 13:20:57 +02:00
Arnaud Cogoluègnes d01011d0f5 rabbitmq-tools.mk: Handle RabbitMQ components without tags
... in `commits-since-release`.

Before this change, the script was expecting at least one tag so that
git-describe(1) worked. Without that, it would fail with:

fatal: No names found, cannot describe anything.

Now, if a component has no tag, it will display "New in this release!".

Patch from @dumbbell
2019-07-12 16:53:05 +02:00
Arnaud Cogoluègnes b9a7be7e64 Add OAuth 2 plugin to rabbitmq-components.mk 2019-07-09 16:04:48 +02:00
Arnaud Cogoluègnes 80c8a09c3b Merge pull request #331 from rabbitmq/oauth2-credential-expiration-support
Support client-driven refresh of expiring credentials
2019-07-04 10:57:24 +02:00
Jean-Sébastien Pédron ed3dba3670 rabbitmq-dist.mk: Don't assume the plugin lives in `$(DEPS_DIR)`
The application to "package" as a plugin (an .ez archive) might be under
`$(APPS_DIR)`. Therefore now, the all the variables and recipes are
created from the path to the application not just its name.
2019-07-01 14:41:53 +02:00
Arnaud Cogoluègnes 55e7881c4a Merge branch 'master' into oauth2-credential-expiration-support 2019-07-01 11:42:37 +02:00
Jean-Sébastien Pédron e887709ada rabbitmq-dist.mk: Exclude `ebin/dep_built` from the files to distribute in plugins
This file is useful at build time only (for Erlang.mk) and it breaks the
build of the .ez archive otherwise.
2019-06-28 23:48:43 +02:00
Jean-Sébastien Pédron 8d1e9ce40a Update erlang.mk 2019-06-28 16:01:30 +02:00
Jean-Sébastien Pédron 095294be04 rabbitmq-components.mk: Force rebuild of all RabbitMQ components
With the update of Erlang.mk, dependencies are not rebuilt anymore by
default, except if `FULL=1` is set.

This behavior is not adapted to the work on RabbitMQ where many
components are split into many repositories, and we work on several of
them at the same time.

Therefore, the idea of this commit is to tell Erlang.mk to always visit
dependencies which are RabbitMQ components. Other dependencies are only
built once the first time.

[#166980833]
2019-06-28 15:54:23 +02:00
Jean-Sébastien Pédron 89a188c4e9 rabbitmq-mix.mk: Moved to rabbitmq-server-release 2019-06-26 18:49:40 +02:00
Jean-Sébastien Pédron f12002e2f3 rabbitmq-*test.mk: Fix latest regressions on our side w.r.t *-on-concourse
Unfortunately, the *-on-concourse targets still don't work: fly(1), the
Concourse CLI, looks to have regressed even more: it doesn't upload all
inputs. Half of them are just empty directories.

Obviously, compiling anything fails because if this.
2019-06-25 18:23:54 +02:00
Michael Klishin 10b4cb1c48 WIP: credential expiration support prototyping 2019-06-22 18:40:01 +03:00
D Corbacho 683bed4802 Merge pull request #329 from rabbitmq/rabbitmq-server-2030
Make default worker pool size configurable
2019-06-13 15:14:43 +01:00
Michael Klishin 29c933a4cd Make default worker pool size configurable
Part of rabbitmq/rabbitmq-server#2030.
2019-06-13 16:55:16 +03:00
Michael Klishin dd6e521204 New Lager sink for Shovel
References rabbitmq/rabbitmq-shovel#60.

[#166627333]
2019-06-12 18:33:21 +03:00
Michael Klishin cb42235776 Merge branch 'master' into rabbitmq-server-1767-protocol-specific-ctx-in-authn-authz 2019-06-07 19:53:26 +03:00
Gerhard Lazu a4b5953d78 Update rabbitmq-components.mk 2019-06-03 02:24:18 +01:00
Arnaud Cogoluègnes a930be7489 Modify authz to propagate protocol-specific context
References rabbitmq/rabbitmq-server#1767
2019-05-29 10:35:48 +02:00
Jean-Sébastien Pédron 6b16a1f2f5 rabbitmq-components.mk: Take observer_cli from Hex.pm 2019-05-17 15:17:48 +02:00
Michael Klishin b4feede8b2 observer_cli 1.5.0 2019-05-17 08:38:02 +03:00
Michael Klishin ef0d843ba5 Bump Recon 2.5.0 for Erlang 22 compat, depend on our fork of observer_cli that uses it 2019-05-16 23:22:26 +03:00
Michael Klishin 8ff556bde2 Depend on observer_cli 1.4.5 2019-05-14 11:46:38 +03:00
Michael Klishin 69598d36fb rabbitmq-components.mk: add observer_cli dependency
For rabbitmq/rabbitmq-cli#353 and rabbitmq/rabbitmq-server#2006.
2019-05-13 16:40:02 +03:00
Gerhard Lazu 05b3f9dedd Fix start-brokers / start-cluster make target
`-ra data_dir` is not necessary. It was also missing a \
2019-05-09 18:02:14 +01:00
Gerhard Lazu df416530ce Update prometheus to v4.3.0 to benefit from global_labels
deadtrickster/prometheus.erl#91
2019-05-01 13:13:58 +01:00
Luke Bakken 70d2020f81 Update rabbitmq-components.mk 2019-04-30 16:22:59 -07:00
Jean-Sébastien Pédron a0a044ce5e rabbit_pretty_stdout: Remove module
It was replaced by the external library, `stdout_formatter`, which is
based on this module.

[#164931055]
2019-04-30 14:33:27 +02:00
Jean-Sébastien Pédron 72cb6bbe6d rabbitmq-components.mk: Pin stdout_formatter version to 0.2.2
[#164931055]
2019-04-30 14:28:46 +02:00
Michael Klishin 9eb9686795 Merge branch 'master' into rabbitmq-erlang-client-91 2019-04-25 21:10:36 +03:00
Daniil Fedotov e9cd793eb4 Move rabbit_queue_collector to rabbit_common repo.
Collector is used by a connection supervisor, which may be on
the client side for direct connections.

Addresses rabbitmq-erlang-client#91
2019-04-23 16:47:23 -04:00
Michael Klishin a8495e1c30 channel_exchange_metrics now has one more metric: dropped unroutable messages
Part of rabbitmq/rabbitmq-server#1904.

[#165548314]
2019-04-23 23:22:58 +03:00
Gerhard Lazu 3bed6894d7 Merge branch 'rabbitmq-prometheus'
[#164376052]
2019-04-22 21:51:47 +01:00
Jean-Sébastien Pédron b0b2963023 rabbit_pbe: Default cipher's name depends on Erlang version
In Erlang 22, the name is now `aes_256_cbc`.

The default cipher/hash/iterations are also set in rabbit's application
default environment. I'm going to remove those default values there
because the code already queries this module if they are missing from
the application environment.
2019-04-19 16:03:52 +02:00
Jean-Sébastien Pédron 3d93ed3d90 rabbit_pbe: Use the new `crypto:supports/1` function in Erlang 22
This fixes a crash of the call to `crypto:cipher_info/1` later because
the ciphers list returned by `crypto:supports/0` contains more ciphers:
"old aliases" are added to that list and those aliases are unsupported
by `crypto:cipher_info/1`.
2019-04-19 11:28:40 +02:00
Michael Klishin 39528ba08b rabbit_misc: introduce rabbitmq_and_erlang_versions/0
Combines version/0 and otp_release/0 so that both can be retrieved
by rabbitmqctl cluster_status in one shot.
2019-04-19 04:10:42 +03:00
Gerhard Lazu fbe2ac4cdb Allow RABBITMQ_CONFIG_FILE make variable to be overwritten 2019-04-17 13:27:31 +01:00
Michael Klishin 6adeb6a220 rabbit_resource_monitor_misc:parse_information_unit/1: coerce input to a list
Elixir passes them in as Erlang binaries.
2019-04-16 17:10:02 +04:00
Michael Klishin a66df54b1a Revert "Clarify"
This reverts commit 7c9f170cee.

CLI tools cannot use this function as it logs errors.
`rabbit_resource_monitor_misc:parse_information_unit/1` is a better fit.
2019-04-16 16:11:22 +04:00
Michael Klishin 7c9f170cee Clarify 2019-04-16 16:02:10 +04:00
Gerhard Lazu 0e7a68cfc9 Add rabbitmq_prometheus dep
[#164376052]
2019-04-16 12:06:44 +01:00
Jean-Sébastien Pédron 052697a3e7 Merge pull request #323 from rabbitmq/blacklist-tls1.3-until-client-implementation-is-finished
rabbit_ssl_options: Blacklist TLS 1.3 until Erlang client implementation is finished
2019-04-11 14:11:58 +02:00
Jean-Sébastien Pédron 858bd20704 rabbit_ssl_options: Blacklist TLS 1.3 until Erlang client implementation is finished
Erlang 22 will introduce TLS 1.3, but at the time of this commit, only
the server side is implemented. If the Erlang client requests TLS 1.3, the
server will accept but the client will either hang or crash.

So for now, just blacklist TLS 1.3 to avoid any issues, even on the
server side, just to be safe.

[#165214130]
2019-04-11 14:02:52 +02:00
Loïc Hoguin 1755b82ca1 Don't support aes_ctr ciphers until OTP-22+ 2019-04-09 12:21:12 +02:00
Jean-Sébastien Pédron b90088f63c rabbit_misc: Generate a `NEW_PID_EXT`-based binary in compose_pid/4
The `creation` field might not fit into one byte which makes the
`PID_EXT` format unsuitable for this case.

The `NEW_PID_EXT` format is supported since Erlang 19.0, so it is safe
to always use it, no matter the value of `creation`, because RabbitMQ
3.7+ requires at least Erlang 19.3+.

References #313.
2019-04-08 11:35:31 +02:00
Michael Klishin f90e81610f Merge pull request #319 from rabbitmq/rabbit-common-318
Handle missing getconf command
2019-04-03 08:43:11 +03:00
Luke Bakken affc3b3991 Handle missing getconf command
Previous behavior is to crash, this is more forgiving

Fixes #318
2019-04-02 10:09:39 -07:00
Loïc Hoguin d077ea6a20 Support both PID_EXT and NEW_PID_EXT simultaneously 2019-04-02 14:23:04 +02:00
Michael Klishin 35cf0b48c3 Merge pull request #311 from rabbitmq/rabbitmq-auth-backend-cache-20
Cache vhost access requests using client IP address only
2019-04-01 02:29:07 +03:00
Jean-Sébastien Pédron d8dd5c623a Merge pull request #316 from rabbitmq/lxv-vm-memory-monitor-fix
vm_memory_monitor: handle KB as well as kB
2019-03-29 14:08:16 +01:00
kjnilsson c206aa0819 vm_memory_monitor: handle KB as well as kB
There are cases (e.g. inside LXC) where the unit reported in /proc/meminfo uses
KB instead of kB. Handle this case.
2019-03-29 11:12:47 +00:00
Michael Klishin 49b02019eb Dialyzer: disable no_match for decompose_pid/1
which has code matching on a constant conditional to OTP version.

Follow-up to #313.
2019-03-26 15:25:56 +03:00
Loïc Hoguin c0d58226c5 We don't support aes_ctr before OTP-22
The cipher was not available via the EVP interface before
Erlang/OTP-22.
2019-03-26 10:55:56 +01:00
Michael Klishin 16d4e55d90 Merge branch 'master' into new_pid_ext-otp22 2019-03-26 11:56:19 +03:00
Michael Klishin 42b8c32cf5 Merge pull request #308 from rabbitmq/improve-rabbit-pbe-otp22
Make rabbit_pbe work for OTP-22
2019-03-26 11:56:01 +03:00
Michael Klishin 774d92cc00 gen_server2: don't emit deprecation warnings on OTP 22
This is a transitional step to get rabbit_common to compile
on OTP 22.
2019-03-26 11:52:29 +03:00
Loïc Hoguin a35d8567b0 Support the NEW_PID_EXT format introduced in OTP-22
In OTP-22 the Creation field has been increased to be 32 bits.
For now we only need to handle it when using term_to_binary
and parsing the result manually.
2019-03-26 08:59:57 +01:00
Luke Bakken 1789c5fc5c Update authz_data type to include binaries 2019-03-25 14:46:52 -07:00
Luke Bakken 7889ad3425 Finish converting check_vhost_access/3 to new API 2019-03-22 13:10:27 -07:00
Luke Bakken a4767a772a Modify check_vhost_access/3 to use map of data
Part of rabbitmq/rabbitmq-auth-backend-cache#20
2019-03-22 07:21:59 -07:00
Jean-Sébastien Pédron 0d0cbadf6b rabbitmq-hexpm.mk: Always download the latest hexpm-cli
As of this commit, it should still be version 0.3.0.
2019-03-21 15:51:08 +01:00
Michael Klishin fb44b03d3b Update test expectations to match the change in 882876297b 2019-03-20 12:22:02 +03:00
Spring Operator 882876297b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://erlang.org/doc/apps/erts/erl_ext_dist.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.org/doc/apps/erts/erl_ext_dist.html) result ConnectTimeoutException).
* http://erlang.org/doc/man/erlang.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.org/doc/man/erlang.html) result ConnectTimeoutException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://host (UnknownHostException) with 1 occurrences migrated to:
  https://host ([https](https://host) result UnknownHostException).
* http://host:port/foo (UnknownHostException) with 2 occurrences migrated to:
  https://host:port/foo ([https](https://host:port/foo) result UnknownHostException).
* http://www.cs.indiana.edu/~burger/fp/index.html (301) with 1 occurrences migrated to:
  https://cs.indiana.edu/~burger/fp/index.html ([https](https://www.cs.indiana.edu/~burger/fp/index.html) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://en.wikipedia.org/wiki/X86-64 with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/X86-64 ([https](https://en.wikipedia.org/wiki/X86-64) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://lukego.livejournal.com/6753.html with 1 occurrences migrated to:
  https://lukego.livejournal.com/6753.html ([https](https://lukego.livejournal.com/6753.html) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://semver.org/ with 1 occurrences migrated to:
  https://semver.org/ ([https](https://semver.org/) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.erlang.org/ with 2 occurrences migrated to:
  https://www.erlang.org/ ([https](https://www.erlang.org/) result 200).
* http://www.mail-archive.com/asn1@asn1.org/msg00460.html with 1 occurrences migrated to:
  https://www.mail-archive.com/asn1@asn1.org/msg00460.html ([https](https://www.mail-archive.com/asn1@asn1.org/msg00460.html) result 200).
* http://www.rabbitmq.com/ with 2 occurrences migrated to:
  https://www.rabbitmq.com/ ([https](https://www.rabbitmq.com/) result 200).
* http://www.rabbitmq.com/amqp-0-9-1-errata.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/amqp-0-9-1-errata.html ([https](https://www.rabbitmq.com/amqp-0-9-1-errata.html) result 200).
* http://www.rabbitmq.com/memory.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/memory.html ([https](https://www.rabbitmq.com/memory.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://code.google.com/p/clink/issues/detail?id=141 with 1 occurrences migrated to:
  https://code.google.com/p/clink/issues/detail?id=141 ([https](https://code.google.com/p/clink/issues/detail?id=141) result 301).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://msdn.microsoft.com/en-us/library/aa366778 with 1 occurrences migrated to:
  https://msdn.microsoft.com/en-us/library/aa366778 ([https](https://msdn.microsoft.com/en-us/library/aa366778) result 301).
* http://msdn.microsoft.com/en-us/library/bb540814 with 1 occurrences migrated to:
  https://msdn.microsoft.com/en-us/library/bb540814 ([https](https://msdn.microsoft.com/en-us/library/bb540814) result 301).
* http://rabbitmq.com/documentation.html with 1 occurrences migrated to:
  https://rabbitmq.com/documentation.html ([https](https://rabbitmq.com/documentation.html) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.erlang.org/doc/system_principles/versions.html with 1 occurrences migrated to:
  https://www.erlang.org/doc/system_principles/versions.html ([https](https://www.erlang.org/doc/system_principles/versions.html) result 301).
* http://www.mozilla.org/MPL/ with 66 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:13:48 -05:00
Michael Klishin 9f6d2b449f Require Erlang 21.3 2019-03-20 10:24:51 +03:00
Loïc Hoguin 944f0087bf Make rabbit_pbe work for OTP-22 2019-03-19 15:02:24 +01:00
Jean-Sébastien Pédron 3eb5ae110a rabbitmq-hexpm.mk: Switch to hexpm-cli 0.3.0
This version should work with the latest `rebar3_hex` plugin (6.5.0).
2019-03-18 13:40:25 +01:00
Jean-Sébastien Pédron 844c591027 Revert "rabbitmq-run.mk: Increase lager message rate threshold from 50 to 5000"
We don't need this anymore, now that the high watermark is bumped
automatically when the log level is set to `debug` in rabbit_lager.

This reverts commit 49956c6423.
2019-03-18 11:41:28 +01:00
Michael Klishin 80c867763d Recon 2.4.0
[#164450566]
2019-03-15 05:32:16 +03:00
Michael Klishin cdf2a5afc0 Lager 3.6.9
[#164603900]
2019-03-15 05:17:19 +03:00
kjnilsson 1e6fed8e4e Replace use of erl_call with rabbitmqctl
The stop-node command is the only make target still using erl_call who
is prone to breakage (broken in OTP 21.3) and can readily be replaced
with rabbitmqctl stop.
2019-03-14 15:26:24 +00:00
Jean-Sébastien Pédron 517e1ff45c rabbit_pretty_stdout: Honor the `UseColors` flag in `*_table()`
To fix this, introduce a new helper, `ascii_color/2`, which takes a the
same flag (`UseColors`) as its second argument. If that flag is false,
it returns an empty string.

While here, move the `isatty()` function in this module.
2019-03-01 15:53:56 +01:00
Jean-Sébastien Pédron d216e67183 rabbitmq-run.mk: Set `$LEAVE_PLUGINS_DISABLED` to start broker without plugins
I.e, plugins are available but left disabled at broker start. It is
still possible to enable them using rabbitmq-plugins(1).
2019-03-01 15:52:38 +01:00
Jean-Sébastien Pédron ef6aa904c9 rabbitmq-run.mk: Allow to set `$RABBITMQ_PLUGINS_DIR` when starting a broker 2019-03-01 15:50:14 +01:00
Loïc Hoguin 9501caaf12 Fix rabbit_pbe for OTP-22
Some new ciphers have been added. Others will be added once
crypto exposes an interface to get cipher information.
2019-02-27 17:07:42 +01:00
Michael Klishin d8079705e2 Introduce rabbit_runtime:gc_all_processes/0 2019-02-21 19:10:57 +03:00
Michael Klishin 6736eb3629 Try to make node name mismatch message clearer, provide a hint
Per recent rabbitmq-users feedback.
2019-02-20 01:27:30 +03:00
Michael Klishin a14097173b Fix a typo in rabbitmq-components.mk 2019-02-12 22:34:01 +03:00
Michael Klishin dce6094507 Merge branch 'spelling' of https://github.com/jsoref/rabbitmq-common into jsoref-spelling 2019-02-12 22:33:25 +03:00
Daniil Fedotov 1dfb335217 Bump erlang version requirement.
RabbitMQ depends on `ra`, which uses persistent_term, only available in 21.2
2019-02-12 10:26:38 -05:00
Josh Soref 75d372c427 spelling: synchronization 2019-02-12 00:21:44 -05:00
Josh Soref 3874970790 spelling: subsequently 2019-02-12 00:21:30 -05:00
Josh Soref 2b33b0bb30 spelling: significant 2019-02-12 00:20:34 -05:00
Josh Soref 808cd4584b spelling: requests 2019-02-12 00:18:15 -05:00
Josh Soref 4a6db60311 spelling: registered 2019-02-12 00:17:40 -05:00
Josh Soref a86a748ae7 spelling: protocol 2019-02-12 00:16:34 -05:00
Josh Soref cceee735c3 spelling: originally 2019-02-12 00:15:43 -05:00
Josh Soref 5fd7ff1b9b spelling: occurring 2019-02-12 00:00:36 -05:00
Josh Soref 41d90889f9 spelling: messages 2019-02-12 00:14:01 -05:00
Josh Soref d741ee8630 spelling: javascript 2019-02-12 00:12:43 -05:00
Josh Soref c094d03324 spelling: implicitly 2019-02-12 00:11:55 -05:00
Josh Soref 5c9d996190 spelling: grammar 2019-02-12 00:10:49 -05:00
Josh Soref bf0b7560ed spelling: function 2019-02-12 00:09:37 -05:00
Josh Soref cf4be045c1 spelling: explicitly 2019-02-12 00:08:51 -05:00
Josh Soref eeb4f2150f spelling: during 2019-02-12 00:07:18 -05:00
Josh Soref 7bdd37a393 spelling: chosen 2019-02-12 00:04:24 -05:00
Josh Soref dc8988d366 spelling: asynchronous 2019-02-12 00:02:25 -05:00
Josh Soref fe1f2a3250 spelling: aggregator 2019-02-12 00:01:34 -05:00
Josh Soref f01c794511 spelling: additional 2019-02-12 00:01:01 -05:00
Michael Klishin 49a57986cd Merge pull request #301 from Haster2004/add-lager-sink-for-ldap
Add lager sink for ldap
2019-02-08 04:44:30 +03:00
Yury.Alioshinov a3d44e3fe4 fix whitespaces 2019-02-08 01:51:20 +03:00
Yury.Alioshinov 0e1e260446 rabbit_log_ldap external sink was added 2019-02-08 01:42:11 +03:00
Arnaud Cogoluègnes c8726cf2ac Handle empty binary payload when delivering message
Fixes #299
2019-02-07 14:47:50 +01:00
Loïc Hoguin a1b8b8fbbc Fix many Dialyzer warnings 2019-02-05 16:31:14 +01:00
kjnilsson 5d8cfdc134 Rename rabbit_log_ra
and add new sink to rabbitmq-build.mk

[#163724857]
2019-02-05 11:52:28 +00:00
Jean-Sébastien Pédron 9613cfafe0 Fix errors reported by Dialyzer
In particular, we drop support for Erlang R13B and older in
`rabbit_cert_info`. This fixes an error reported by Dialyzer now that
the list of dependencies (`$(LOCAL_DEPS)`) is more correct.
2019-02-01 10:45:30 +01:00
Jean-Sébastien Pédron 16d171c26d Makefile: Add missing dependencies to `$(LOCAL_DEPS)`
Dialyzer reports less missing types and unknown functions.
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron 49956c6423 rabbitmq-run.mk: Increase lager message rate threshold from 50 to 5000
Otherwise, it drops too many messages and the log file becomes useless
when debugging.
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron 43e40f3370 rabbitmq-run.mk: Log debug messages when using `make run-broker` 2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron dca9cad83a rabbitmq-run.mk: Configure `$RABBITMQ_FEATURE_FLAGS`
[#159298729]
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron b4c944c880 rabbit_misc: Consider 3.7.x and 3.8.x+ compatible
... in version_minor_equivalent().

Note that we'll need a special case to exclude 3.7.x versions which
don't have the feature flags modules.

At the same time, we introduce the `strict_version_minor_equivalent()`
function which has the behavior the initial function had before. This is
used in the context of plugin compatibility checks: plugins can specify
a `broker_version_requirements` property and at this point, plugins
compatible with 3.7.x should not be considered as compatible with 3.8.x.

[#159298729]
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron 01ef2d29dd Make #amqqueue{} a private record
See the corresponding commit in rabbitmq-server for all the
explanations.

Now, all accesses to the #amqqueue{} record are made through the
`amqqueue` module (available in rabbitmq-server). The new type name is
`amqqueue:amqqueue()`.

The `amqqueue.hrl` header also provides some macros to help with pattern
matching and guard expressions.

To help with this, code and modules were moved from rabbitmq-common to
rabbitmq-server.

[#159298729]
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron 00ce6ffdf8 rabbit_pretty_stdout: New module to pretty-print a table
It supports ANSI colors and line drawing.
2019-02-01 10:45:25 +01:00
kjnilsson 881ebd1e02 fix dialyzer error 2019-01-31 14:58:18 +00:00
kjnilsson a9430e5d6e Add rabbit_log_ra shim
And make a new logging category for Ra logs

[#163518117]
2019-01-30 13:03:42 +00:00
Arnaud Cogoluègnes 7a624fec9b Add activity status field to consumer created
[#163298456]

References rabbitmq/rabbitmq-server#1838
2019-01-28 17:22:21 +01:00
Karl Nilsson d89ebb57c1 Merge pull request #292 from rabbitmq/rabbitmq-management-649-single-active-consumer
Integrate single active consumer with metrics
2019-01-17 10:53:16 +00:00
Michael Klishin 26cca70307 Merge pull request #294 from rabbitmq/mk-heartbeat-timeout-type-specs
Introduce a new type, heartbeat_timeout, for documentation purposes
2019-01-16 04:14:16 +03:00
Michael Klishin 1da03bf38a Use heartbeat_timeout/0 in more places 2019-01-16 04:04:10 +03:00
Michael Klishin 2704b40804 Introduce a new type, heartbeat_timeout, for documentation purposes
Per discussion with @lukebakken.
2019-01-16 04:01:21 +03:00
Luke Bakken 39bbe89259 Debug the start of heartbeat senders 2019-01-15 16:22:20 -08:00
Arnaud Cogoluègnes 74c57aced8 Integrate single active consumer with metrics
* Add single active consumer flag in consumer metrics
 * Add function to update consumer metrics when a consumer is promoted
to single active consumer

[#163089472]

References rabbitmq/rabbitmq-management#649
2019-01-15 15:15:45 +01:00
Michael Klishin 0e8d48fc70 Bump (c) year in startup banner
References rabbitmq/rabbitmq-server#1830.
2019-01-14 01:33:03 +03:00
Michael Klishin ce47d85a93 Update rabbitmq-components.mk 2019-01-10 02:08:44 +03:00
Michael Klishin 38858e62b3 Merge pull request #288 from rabbitmq/rabbitmq-server-1799-single-active-consumer-in-qq
Single active consumer in quorum queue
2019-01-09 03:03:34 +03:00
Michael Klishin bf8ac8f262 Merge branch 'master' into rabbitmq-server-1799-single-active-consumer-in-qq 2019-01-08 23:23:45 +03:00
Luke Bakken c0a2e3baec Merge branch 'rabbitmq-server-952' 2019-01-08 11:31:40 -08:00
Jean-Sébastien Pédron cbe3cc9ccc Travis CI: Use Ubuntu Xenial image
It comes with Elixir 1.7.4, therefore we don't need to install Elixir
from a Debian package.
2019-01-08 12:46:40 +01:00
Jean-Sébastien Pédron df6bb46b90 Travis CI: Test against Erlang 21.2 only
This is the minimum requirement in `master`.
2019-01-08 09:01:57 +01:00
Jean-Sébastien Pédron e1e76f25b3 Travis CI: Use Elixir 1.6.6 2019-01-08 09:01:37 +01:00
Jean-Sébastien Pédron c3628055ab Makefile: Remove the Hex.pm `maintainers` field from .app
It is now deprecated by Hex.pm.
2019-01-08 08:57:51 +01:00
Luke Bakken e33487ab63 Add sysmon_handler dependency
Fixes rabbitmq/rabbitmq-server#952
2019-01-07 12:52:06 -08:00
Michael Klishin 8fb32bd259 Be more defensive when requesting connection parameters
References #1538.
2019-01-02 14:05:36 +03:00
Michael Klishin e29005d617 Wording 2019-01-02 02:58:10 +03:00
Daniil Fedotov e7cce3b95d Reduce max message size to 512MB. 2018-12-27 19:24:57 +04:00
Arnaud Cogoluègnes 0b8841ad51 Merge branch 'master' into rabbitmq-server-1799-single-active-consumer-in-qq 2018-12-14 14:11:50 +01:00
Loïc Hoguin bf9e786749 Remove a macro related to the removed truncate module 2018-12-11 17:04:30 +01:00
Arnaud Cogoluègnes 0613d10a08 Merge branch 'master' into rabbitmq-server-1743-exclusive-consumer 2018-12-11 17:03:57 +01:00
Michael Klishin d8f5c2da24 Stop microstate accounting after sampling 2018-12-07 18:42:29 +03:00
Michael Klishin 723d1494e9 Merge branch 'master' into msacc-command 2018-12-07 15:39:51 +03:00
Jean-Sébastien Pédron 2d116f96d6 rabbitmq-hexpm.mk: Switch to hexpm-cli 0.2.0
This version should work with the latest `rebar3_hex` plugin.
2018-12-06 18:32:53 +01:00
Michael Klishin 733bcb6507 rabbitmq-components.mk: remove SockJS, rabbitmq_clusterer, rabbitmq_management_visualiser
They've been discontinued in 3.7.0.
2018-12-06 18:27:46 +03:00
Michael Klishin 1738b0aefa Merge branch 'master' into msacc-command 2018-12-05 21:52:14 +03:00
Michael Klishin 7c3d347b14 Introduce rabbit_runtime 2018-12-05 21:51:43 +03:00
Michael Klishin 05e721d1cb Support rabbit_proxy_socket tuples in rabbit_net:getstat/2
References #279.
2018-12-05 20:31:51 +03:00
Michael Klishin 93ff47fbbd Merge branch 'master' into ranch_proxy_header 2018-12-05 15:04:24 +03:00
Michael Klishin 56a4741b38 Merge pull request #283 from noxdafox/master
rabbit_backing_queue: extend is_duplicate callback return values
2018-12-05 00:04:00 +03:00
Loïc Hoguin ed7802233d Use the built-in Ranch PROXY protocol support 2018-12-04 12:29:29 +01:00
Loïc Hoguin ea18cd032b Update Ranch to 1.7.1 and Cowboy to 2.6.1 2018-11-28 15:53:03 +01:00
Matteo Cafasso 7cfb017889 rabbit_backing_queue: extend is_duplicate callback return values
Allow the backing queue implementation to inform the amqqueue process
how to proceed when a message duplicate is encountered.

 * {true, drop} the message is a duplicate and should be ignored
 * {true, reject} the message is a duplicate and the publisher should
   receive a rejection
 * false the message is not deemed a duplicate
 * true kept for backward compatibility, equivalent to {true, drop}

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
2018-11-23 23:01:33 +02:00
Arnaud Cogoluègnes 8fa1ba43f0 Merge branch 'master' into rabbitmq-server-1743-exclusive-consumer 2018-11-22 09:35:07 +01:00
Loïc Hoguin 3a9b2134c4 Update Cowboy to 2.6 and Ranch to 1.7 2018-11-20 14:34:59 +01:00
John Eckersberg 69b4d311da rabbitmq-run.mk: Fix stop-brokers with NODES > 1
The seq command should include a -1 increment to stop nodes in reverse
order.  Previously, as an example with NODES=2, will run `seq 2 1`
which produces no items to iterate, so the entire stop-node loop does
not execute and the brokers are left running.
2018-11-16 08:52:59 -05:00
Jean-Sébastien Pédron ecc8c4e670 rabbitmq-run.mk: Add AMQP and management TCP ports to `test_rabbitmq_config`
This helps when we want to start multiple nodes on the same host with
the management plugin enabled.
2018-11-05 14:16:12 +01:00
kjnilsson 7242b2f98b add Ra as external dependency 2018-10-29 12:41:41 +00:00
Karl Nilsson c18bcb27e1 Merge pull request #274 from rabbitmq/quorum-queue
Quorum queue
2018-10-29 09:45:31 +00:00
Arnaud Cogoluègnes b204adab45 Add member/2 to priority_queue module
To check whether a value is in the queue or not. Handle both
non-priority and priority queue. Based on lists:member/2, does not take
into account the priority of the value in the queue to check equality.

References rabbitmq/rabbitmq-server#1743
2018-10-24 16:06:51 +02:00
Luke Bakken 1838b50277 Update socket stats after running handler
When a heartbeat handler is run, the socket stats should be re-collected because the act of running the handler can affect the stats (like sent bytes).

See https://groups.google.com/d/topic/rabbitmq-users/djNpSuQoznY/discussion
2018-10-22 19:39:20 -07:00
kjnilsson 0918ca4a22 remove created_at from amqqueue record 2018-10-19 16:33:38 +01:00
kjnilsson 97a17ec55a modernise pmon 2018-10-18 15:12:10 +01:00
Loïc Hoguin 4c40b6adf9 Remove dependency on erlang-src
It has been reported that in order to use the Erlang client, the
Erlang/OTP source must be available. This is due to one include
file that rabbit_net required. This dependency has been removed.

Instead of calling is_record(sslsocket) the macro ?IS_SSL will
now perform the same test manually (check that it is a tuple,
that the size is correct and that the first element equals sslsocket).

The tuple has not changed in a very long time so doing this
manually is at least as safe as including this private header
file (it could be removed or moved at any time).

Once Erlang/OTP 22 gets out and we know how sockets will be
represented with the NIF implementation, we could revise this
and check whether the socket is one that gen_tcp accepts
(currently it's a port, but this will probably change when
a NIF is used).
2018-10-17 12:30:13 +01:00
Diana Corbacho 5fd7888b8a Increase queue churn metrics when queues are deleted in bulk by node down
[#160943831]
2018-10-17 12:30:13 +01:00
Diana Corbacho d21b745d08 New connection churn metrics table
Rate metrics for monitoring of high connection churn scenarios
[#160943831]
2018-10-17 12:30:13 +01:00
Jean-Sébastien Pédron 8e0d0a0a2e include/rabbit.hrl: Bump Erlang requirement to 21.0
With the quorum queue code, RabbitMQ probably still works with Erlang
20.x, but it is not thoroughly tested. Thus, bump the requirement to
Erlang 21.0.
2018-10-11 12:36:40 +02:00
Michael Klishin 26492f4925 Merge pull request #277 from rabbitmq/rabbitmq-server-1723
Report connection/channel/queue churn
2018-10-11 02:16:55 +03:00
Loïc Hoguin adeffe8ad4 Remove dependency on erlang-src
It has been reported that in order to use the Erlang client, the
Erlang/OTP source must be available. This is due to one include
file that rabbit_net required. This dependency has been removed.

Instead of calling is_record(sslsocket) the macro ?IS_SSL will
now perform the same test manually (check that it is a tuple,
that the size is correct and that the first element equals sslsocket).

The tuple has not changed in a very long time so doing this
manually is at least as safe as including this private header
file (it could be removed or moved at any time).

Once Erlang/OTP 22 gets out and we know how sockets will be
represented with the NIF implementation, we could revise this
and check whether the socket is one that gen_tcp accepts
(currently it's a port, but this will probably change when
a NIF is used).
2018-10-09 14:48:25 +02:00
Diana Corbacho 38280262eb Increase queue churn metrics when queues are deleted in bulk by node down
[#160943831]
2018-10-09 13:16:02 +01:00
Diana Corbacho ac62721854 New connection churn metrics table
Rate metrics for monitoring of high connection churn scenarios
[#160943831]
2018-10-08 15:02:16 +01:00
Luke Bakken 02cc25124d Merge branch 'master' into quorum-queue 2018-09-28 11:45:27 -07:00
Luke Bakken 9e421db16c rabbit_pbe: re-format NotSupportedByUs list 2018-09-28 11:43:46 -07:00
Luke Bakken 3c0d95e641 rabbit_pbe: add function clauses to match sha3 hashes 2018-09-28 11:05:54 -07:00
kjnilsson 8a7441cbca Add a few applications to PLT_APPS 2018-09-28 12:59:02 +01:00
Luke Bakken d89a166a02 Improve error case if erl / erl.exe is not in PATH
Improves rabbitmq/rabbitmq-server#1654

Reported via:

https://groups.google.com/d/msg/rabbitmq-users/YgtY4R_heI0/AZFs5RPTCgAJ

VESC-906
2018-09-27 12:26:41 -07:00
Michael Klishin cbb7c38a13 Merge branch 'master' into get-empty-stats 2018-09-21 14:13:23 +02:00
Diana Corbacho f7bb8baff3 Revert "Configure ra metrics handler"
This reverts commit 1d946c91635f250677968949d79abd5b40974201.
2018-09-21 08:51:16 +01:00
Diana Corbacho baadbe8701 Configure ra metrics handler
[#157193081]
2018-09-21 08:51:16 +01:00
kjnilsson 8ce0dd6fb2 remove quorum_mapping table 2018-09-21 08:51:16 +01:00
Diana Corbacho dd82830642 Export block/unblock for flow control
[#157000583]
2018-09-21 08:51:16 +01:00
kjnilsson f76039d3da dialyzer fix 2018-09-21 08:51:16 +01:00
Diana Corbacho 5ee1757551 Revert "Add quorum_leader to amqqueue record"
This reverts commit 7eff8a551426c03725f30db8516150c1c2c127b2.
2018-09-21 08:51:16 +01:00
Diana Corbacho 4cac30b209 Add quorum_leader to amqqueue record
[#154472407]
2018-09-21 08:51:16 +01:00
Diana Corbacho 3a5e9b99a1 Add quorum_nodes to amqqueue record
[#154472231]
2018-09-21 08:51:16 +01:00
Diana Corbacho 978d7747c0 Add created_at field to amqqueue record
[#155458625]
2018-09-21 08:51:16 +01:00
Daniil Fedotov f6d18f8247 Revert Revert "Extend amqqueue record to include queue type" 2018-09-21 08:51:16 +01:00
Diana Corbacho d145becaee Use RABBITMQ_QUORUM_DIR as ra data_dir when starting a node
[#154472152]
2018-09-21 08:51:16 +01:00
Diana Corbacho a31a8329fe Create quorum_mapping table to obtain queue name from a ra id
[#154472241]
2018-09-21 08:51:16 +01:00
Diana Corbacho 3e66da916c Set the ra data_dir when starting a node
Ra is now a dependency of rabbit application, and it must be started
and configured on every rabbitmq node

[#154472152]
2018-09-21 08:51:16 +01:00
Jean-Sébastien Pédron 63661e083b rabbit_pbe: Mark AES-CCM as unsupported
This seems to be a new cipher in Erlang 22.
2018-09-19 15:40:21 +02:00
Jean-Sébastien Pédron 26cd7e4980 rabbitmq-components.mk: Bump Ranch to 1.6.2
... and ranch_proxy_protocol to 2.1.1.

Ranch 1.6.2 fixes ninenines/ranch#205 which was discovered in the
rabbitmq-stomp testsuite.

[#160270896]
2018-09-19 11:00:56 +02:00
Diana Corbacho 269434f322 Add basic.get_empty stats
The delivery stats tuple has now one more element
[#160280626]
2018-09-17 11:25:27 +01:00
Jean-Sébastien Pédron 54ddd93df5 rabbit_pbe: Mark ChaCha20 as unsupported
This seems to be a new cipher in Erlang 22.
2018-09-11 14:32:00 +02:00
Jean-Sébastien Pédron 158d07485b rabbitmq-components.mk: Bump 3rd-party dependencies' pinning
* Lager: 3.6.4 -> 3.6.5
* Ranch: 1.5.0 -> 1.6.1
* ranch_proxy_protocol: 1.5.0 -> 2.1.0-rc.1

Note that ranch_proxy_protocol 2.1.0-rc.1 is not an official release
from upstream: it was published by us (the RabbitMQ team) because we
don't have feedback from upstream about a pull request to update Ranch
to 1.6.x (heroku/ranch_proxy_protocol#49). Hopefully upstream will merge
the pull request and cut a new official release.

Fixes rabbitmq/rabbitmq-common#269.
[#160270896]
2018-09-11 14:25:16 +02:00
Daniil Fedotov 58d955fe33 Make dialyzer ignore missing gen_event:start_link/2 2018-08-21 12:52:32 +01:00
Daniil Fedotov 8f6c838a42 Remove -Wunmatched_returns from default dialyzer options. 2018-08-14 17:34:19 +01:00