Commit Graph

54372 Commits

Author SHA1 Message Date
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
Arnaud Cogoluègnes aaeaf524ea Return error atom according to specification
In stream topology function call. This would
trigger an exception in the frame creation
when the stream was not available because the atom
was unexpected.

(cherry picked from commit 6a330563ce)
2024-01-04 09:05:50 +00:00
Michael Klishin 3fbb810e1d
Merge pull request #10270 from rabbitmq/mergify/bp/v3.12.x/pr-10268
Ensure `-noinput` is applied correctly (backport #10268)
2024-01-03 12:46:05 -05:00
Luke Bakken 766f85fc8a Ensure `-noinput` is applied correctly
Follow-up to:
* #10131
* #10257

The following `rabbitmqctl` commands may require `stdin` input:
* `add_user`
* `authenticate_user`
* `change_password`
* `decode`
* `encode`
* `eval`
* `hash_password`

The following `rabbitmq-diagnostics` commands may require `stdin` input:
* `observer`
* `remote_shell`

(cherry picked from commit 7da7d4e1e7)
2024-01-03 14:49:46 +00:00
Michael Klishin 5b4dc00bf1
Merge pull request #10245 from rabbitmq/mergify/bp/v3.12.x/pr-10243
Use correct user to test authentication via various messaging protocols (backport #10243)
2024-01-02 10:22:07 -05:00
Marcial Rosales 560ee42635 Do not expect permission check to create a queue
for the last-will feature given that MQTT plugin
in 3.12.x does not support that feature
2024-01-02 11:25:47 +01:00
Michael Klishin 8b26fdc510
(c) year bump 2024-01-01 22:04:04 -05:00
Michael Klishin 5552f45299
Merge pull request #10258 from rabbitmq/mergify/bp/v3.12.x/pr-10257
Add -noinput via `rabbitmq-env` (backport #10257)
2024-01-01 12:49:22 -05:00
Luke Bakken c07af9a51c Add -noinput via `rabbitmq-env`
Follow-up to #10131

(cherry picked from commit 3f33dfa227)
2024-01-01 09:43:44 +00:00
Michael Klishin 91b2964f5d
Merge pull request #10252 from rabbitmq/mergify/bp/v3.12.x/pr-10244
Allow MQTT QoS 0 subscribers to reconnect (backport #10244)
2023-12-28 08:42:44 -05:00
David Ansari 9ff53e9880 Resolve conflict 2023-12-28 13:54:20 +01:00
David Ansari a9b420b851 Allow MQTT QoS 0 subscribers to reconnect
The solution in #10203 has the following issues:
1. Bindings can be left ofter in Mnesia table rabbit_durable_queue.
One solution to 1. would be to first delete the old queue via
`rabbit_amqqueue:internal_delete(Q, User, missing_owner)`
and subsequently declare the new queue via
`rabbit_amqqueue:internal_declare(Q, false)`
However, even then, it suffers from:
2. Race conditions between `rabbit_amqqueue:on_node_down/1`
and `rabbit_mqtt_qos0_queue:declare/2`:
`rabbit_amqqueue:on_node_down/1` could first read the queue records that
need to be deleted, thereafter `rabbit_mqtt_qos0_queue:declare/2` could
re-create the queue owned by the new connection PID, and `rabbit_amqqueue:on_node_down/1`
could subsequently delete the re-created queue.

Unfortunately, `rabbit_amqqueue:on_node_down/1` does not delete
transient queues in one isolated transaction. Instead it first reads
queues and subsequenlty deletes queues in batches making it prone to
race conditions.

Ideally, this commit deletes all rabbit_mqtt_qos0_queue queues of the
node that has crashed including their bindings.
However, doing so in one transaction is risky as there may be millions
of such queues and the current code path applies the same logic on all
live nodes resulting in conflicting transactions and therefore a long
database operation.

Hence, this commit uses the simplest approach which should still be
safe:
Do not remove rabbit_mqtt_qos0_queue queues if a node crashes.
Other live nodes will continue to route to these dead queues.
That should be okay, given that the rabbit_mqtt_qos0_queue clients auto
confirm.
Continuing routing however has the effect of counting as routing result
for AMQP 0.9.1 `mandatory` property.
If an MQTT client re-connects to a live node with the same client ID,
the new node will delete and then re-create the queue.
Once the crashed node comes back online, it will clean up its leftover
queues and bindings.

(cherry picked from commit 78b4fcc899)

# Conflicts:
#	deps/rabbitmq_mqtt/src/rabbit_mqtt_qos0_queue.erl
2023-12-28 12:37:58 +00:00
Michael Klishin e7c98a8b33
Merge pull request #10247 from rabbitmq/mergify/bp/v3.12.x/pr-10246
Defined "tags" as list in /api/users/name (backport #10246)
2023-12-27 22:31:02 -05:00
Ariel Otilibili dec52c68d4 Defined "tags" as list
Typo spotted in #4050

(cherry picked from commit 0b24d3c0bb)
2023-12-28 01:23:27 +00:00