Commit Graph

54535 Commits

Author SHA1 Message Date
Simon Unge a64f3936a5 Better variable names, and comments
(cherry picked from commit 3044201f7d)
2024-02-03 01:22:03 +00:00
Simon Unge fa21f28e29 Check consumer size for clean strats
(cherry picked from commit a2ff5a0b7b)

# Conflicts:
#	deps/rabbit/src/rabbit_channel.erl
2024-02-03 01:22:03 +00:00
Michael Klishin 24b06773af
Merge pull request #10473 from rabbitmq/mergify/bp/v3.12.x/pr-10471
rabbitmq_federation: Handle `shutdown` from upstream (backport #10471)
2024-02-02 18:03:49 -05:00
Jean-Sébastien Pédron 36cf8c9f4c rabbitmq_federation: Handle `shutdown` from upstream
[Why]
The downstream process was already handling a `{shutdown, Term}`
termination reason from upstream gracefully: it would log a message an
close the connection.

However it didn't handle the more common `shutdown` reason, which
happens with a regular stop of the upstream node. It led to the log of a
giant scary crash message.

[How]
We handle `shutdown` the same as `{shutdown, Term}`.

(cherry picked from commit 2a23ccbcd9)
2024-02-02 22:35:26 +00:00
Michael Klishin 828288f36e
Merge pull request #10461 from rabbitmq/mergify/bp/v3.12.x/pr-10457
Check whether EPMD is running before starting it (backport #10457)
2024-02-01 21:23:38 -05:00
Michael Klishin 8f23068aa6
Merge pull request #10460 from rabbitmq/mergify/bp/v3.12.x/pr-10458
CLI: allow building with Elixir 1.17 (backport #10458)
2024-02-01 21:23:15 -05:00
Michael Klishin 2b66fa7e66
Resolve a conflict #10458 #10460 2024-02-01 20:21:49 -05:00
Michael Davis 4942604367 Check whether EPMD is running before starting it
`rabbit_nodes_common:ensure_epmd/0` unconditionally starts EPMD by
spawning `erl` with nodename options. Spawning `erl` can be quite slow
though (around 250ms for me locally), so we should try to avoid it when
we detect that EPMD is already running.

We can relatively cheaply check whether EPMD is already running with
`net_adm:names/0`, a function that asks the daemon on localhost to list
any registered names, the same as `epmd -names` on the comand line. If
we can successfully get the list of names from the daemon then we don't
need to start EPMD. `net_adm:names/0` is relatively cheap compared to
running `erl`, costing around 8ms when EPMD is running and less than a
millisecond when it is not.

This improves the CLI's total run time for commands that read the
`enabled_plugins_file` and `plugins_dir` config options. Those options
try to consult a running node and so they start distribution and ensure
that EPMD is running. `rabbitmqctl --help` saves nearly 500ms when EPMD
is already running as it reads both options, since previously it
spawned and blocked on `erl` when reading each option.

(cherry picked from commit 46ca3269e3)
2024-02-01 23:57:00 +00:00
Alex Valiushko ad76b8bebb bump elixir to 1.17
(cherry picked from commit 70ac0cf3c5)

# Conflicts:
#	deps/rabbitmq_cli/mix.exs
2024-02-01 23:55:43 +00:00
Michael Klishin d889d20aef
Merge pull request #10441 from rabbitmq/mergify/bp/v3.12.x/pr-10437
Update Cowboy to 2.11 (backport #10437)
2024-01-29 20:10:57 -05:00
Loïc Hoguin b707546b0a Update Cowboy to 2.11
(cherry picked from commit 865bc22fb8)
2024-01-30 00:54:49 +00:00
David Ansari f21628a17a Fix MQTT test flake
Prior to this commit test block_connack_timeout
flaked when 2 new ports got created instead of only 1
in line
```
[NewPort] = Ports -- Ports0,
```

This commit filters for tcp_inet ports.
This will always return the port of the new MQTT connection.

(cherry picked from commit bedcae18c2)
2024-01-27 17:47:08 +01:00
Michael Klishin 824d0281bf
Merge pull request #10418 from rabbitmq/mergify/bp/v3.12.x/pr-10417
An alternative to #10415, closes #10330 (backport #10417)
2024-01-25 20:14:07 -05:00
Michael Klishin 73188f4a26 An alternative to #10415, closes #10330
Per discussion in #10415, this introduces a new module,
rabbit_mgmt_nodes, which provides a couple of helpers
that can be used to implement Cowboy REST's
resource_exists/2 in the modules that return
information about cluster members.

(cherry picked from commit 0c0e2ca932)
2024-01-26 00:06:34 +00:00
Michael Klishin 0e69c417f1 CLI: mix format 2024-01-22 20:07:59 -05:00
Michael Klishin ae403a8d1e Manually backport one test stability change from #10364 #10392 2024-01-22 16:55:00 -05:00
Michael Klishin 8f59c823c1
Merge pull request #10387 from rabbitmq/mergify/bp/v3.12.x/pr-10385
HTTP auth example dotnetcore: Update to .NET 8 (backport #10385)
2024-01-22 09:49:21 -05:00
yoyo890121 1eb7921276 Update README.md
(cherry picked from commit 4e52b81b34)
2024-01-22 14:47:21 +00:00
yoyo890121 39c64983a7 Update to .NET 8
(cherry picked from commit 271790000d)
2024-01-22 14:47:20 +00:00
Michael Klishin 339dbdddd1
Bump (c) year
(cherry picked from commit 80615755be)
2024-01-20 14:52:28 -05:00
Michael Klishin 52a73ef26f
Merge pull request #10366 from rabbitmq/mergify/bp/v3.12.x/pr-10353
Do not contact disconnected nodes in rabbit_nodes:list_running/0 (backport #10353)
2024-01-18 16:20:48 -05:00
Michael Klishin 47a33d2035
Merge pull request #10360 from rabbitmq/mergify/bp/v3.12.x/pr-10351
Add channel limit per node (backport #10351)
2024-01-18 15:52:46 -05:00
Michael Klishin 385ae9bfae
Resolve a conflict #10366 #10353 2024-01-18 13:40:35 -05:00
Karl Nilsson d56c488a5e Ensure node reconnections are done as before in rabbit_node_monitor
The behaviour of this module is to fragile to potentially allow a regression
here so we explicitly ping_all/0 before filtering running nodes.

(cherry picked from commit d74821581b)
2024-01-18 14:37:01 +00:00
Karl Nilsson 18677889d0 Explicity try to reconnect to all members after doing cluster rename.
(cherry picked from commit 85f08f02f1)
2024-01-18 14:37:00 +00:00
Karl Nilsson a954e9b6d8 Remove clustering test that assert on ram nodes.
Ram nodes are a deprecated feature and the actual assertion is
quite a complicated once that isn't easy to reason about as it
asserts on the cluster view of nodes that that have their
rabbit app stopped.

(cherry picked from commit 87664e9fcb)

# Conflicts:
#	deps/rabbit/test/clustering_management_SUITE.erl
2024-01-18 14:37:00 +00:00
Karl Nilsson 75a1baf9b6 Do not attempt to contact disconnected nodes in rabbit_nodes:list_running/1
As this will force erlang to attempt to set up a distribution connection
to the down node. This can take some time, especially in cloud environments.

(cherry picked from commit 8aa217613c)
2024-01-18 14:37:00 +00:00
Michael Klishin 460d0868f7
Correct a log message wording #10351
(cherry picked from commit ed56614a76)
2024-01-17 22:37:10 -05:00
Simon Unge 4e5fdcd2bf Use infinity as config instead of 0
(cherry picked from commit 66a3cbcc94)
2024-01-18 03:31:37 +00:00
Simon Unge 8e452f70bd Use ets table size instead of count the elements
(cherry picked from commit 30368ffe1f)
2024-01-18 03:31:37 +00:00
Simon Unge 07d96819c4 Add channel limit per node
(cherry picked from commit d137edc23a)
2024-01-18 03:31:37 +00:00
Michael Klishin f3f740849e
Merge pull request #10321 from rabbitmq/mergify/bp/v3.12.x/pr-10320
Avoid repeat vhost existance checks and extend vhost deletion logging (backport #10320)
2024-01-11 13:52:01 -05:00
Ayanda Dube efa5947d49 add more logging on vhost deletion procedure steps
(cherry picked from commit 4be40ca6e2)
2024-01-11 17:30:07 +00:00
Ayanda Dube 704415059e avoid repeat vhost existance checks when adding vhosts
(cherry picked from commit b9b6b3da42)
2024-01-11 17:30:07 +00:00
Michael Klishin 78e539d54f
Merge pull request #10317 from rabbitmq/mergify/bp/v3.12.x/pr-10303
#2634 - if ASCII disabled, remove escape codes (backport #10303)
2024-01-10 18:28:41 -05:00
Michael Klishin f892113c0e
Merge pull request #10316 from rabbitmq/mergify/bp/v3.12.x/pr-10305
Fix undef internal call in supervisor2 (backport #10305)
2024-01-10 16:40:07 -05:00
Michael Klishin a5f05bf3ea
Merge pull request #10302 from rabbitmq/mergify/bp/v3.12.x/pr-10229
[#8557/CLI] Removed ANSI escape codes from JSON output (backport #10229)
2024-01-10 16:22:20 -05:00
Ariel Otilibili 1da1127a2a Removed ASCII escape codes if not enabled; fixes #2634
https://hexdocs.pm/elixir/IO.ANSI.html#format/2
(cherry picked from commit 09b4be92f6)
2024-01-10 20:55:41 +00:00
Péter Gömöri 6ad7d8b175 Fix undef internal call in supervisor2
Must be a leftover from the refactoring in commit 0a87aea

This should prevent the below crash that was seen with an exchange
federation link

```
{undef,
    [{supervisor2,try_again_restart,
         [<0.105395.0>,
          {upstream,
              [{encrypted,
                   <<"...">>}],
              <some mirrored supervisor data>},
          {upstream,
              [{encrypted,
                   <<"...">>}],
              <some mirrored supervisor data>}],
         []}]}
```

(cherry picked from commit b6f782fd0d)
2024-01-10 20:37:39 +00:00
Michael Klishin ab0bea69fc Resolve a conflict #10229 #10302 2024-01-09 19:24:55 -05:00
Ariel Otilibili c475d212cf Fix for #8557, removed ANSI codes in JSON output
Add missing newline chars

(cherry picked from commit a9e488dbed)

# Conflicts:
#	deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/cluster_status_command.ex
2024-01-09 20:29:02 +00:00
Michael Klishin c7549fd148
3.12.12 release notes: a typo
(cherry picked from commit 3cd832b638)
2024-01-08 10:08:59 -05:00
Michael Klishin 84d5a2495c 3.12.12 release notes: formatting
(cherry picked from commit e56b479dd8)
2024-01-05 15:15:11 -05:00
Michael Klishin 714ec5a3c8
Merge pull request #10285 from rabbitmq/mergify/bp/v3.12.x/pr-10284
3.12.12 release notes (backport #10284)
2024-01-05 15:08:34 -05:00
Michael Klishin 9623ac7fa7 3.12.12 release notes
(cherry picked from commit 98949b3f4f)
2024-01-05 20:07:14 +00:00
Michael Klishin 1bf4291302
The standalone macOS package is long gone
(cherry picked from commit 649ae7065b)
2024-01-05 13:12:33 -05:00
Jean-Sébastien Pédron e821aebefd
Merge pull request #10280 from rabbitmq/mergify/bp/v3.12.x/pr-10279
rabbit_feature_flags: Trap `exit` signal in the controller (backport #10279)
2024-01-04 18:11:41 +01:00
Jean-Sébastien Pédron 0723018e50
rabbit_feature_flags: Trap exit signal in the controller
[Why]
We need to do this for the `terminate/3` to be called. Without this, the
process exits without calling it.

(cherry picked from commit a472982d26)
2024-01-04 16:32:33 +01:00
Michael Klishin ac23476386
Retroactively add #8328 to 3.12.0 release notes
That PR had no milestone set and this important
change has slipped through the cracks.

(cherry picked from commit 36c7d26595)
2024-01-04 09:14:52 -05:00
Michael Klishin f6f8aab0f9
Merge pull request #10277 from rabbitmq/mergify/bp/v3.12.x/pr-10271
Return error atom according to specification (backport #10271)
2024-01-04 04:59:40 -05:00