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)
`rabbit_mgmt_util:direct_request/6` is always called with an
`ErrorMsg` which expects one format argument as a string. Convert the
arbitrary reason term into a string to avoid a crash like the below:
```
warning: FORMATTER CRASH: {"Delete exchange error: ~ts",[{'EXIT',{{badmatch,{error,...
```
(cherry picked from commit 0a144e7698)
This prevents the below harmless crash when multiple parallel API
requests arrive soon after starting the node.
```
exception error: no match of right hand side value
{error,{already_started,<0.1593.0>}}
in function rabbit_mgmt_db_cache:fetch/4 (rabbit_mgmt_db_cache.erl, line 68)
in call from rabbit_mgmt_db:submit_cached/4 (rabbit_mgmt_db.erl, line 756)
in call from rabbit_mgmt_util:augment/2 (rabbit_mgmt_util.erl, line 412)
in call from rabbit_mgmt_util:run_augmentation/2 (rabbit_mgmt_util.erl, line 389)
in call from rabbit_mgmt_util:augment_resources0/6 (rabbit_mgmt_util.erl, line 378)
in call from rabbit_mgmt_util:with_valid_pagination/3 (rabbit_mgmt_util.erl, line 302)
in call from rabbit_mgmt_wm_queues:to_json/2 (rabbit_mgmt_wm_queues.erl, line 44)
in call from cowboy_rest:call/3 (src/cowboy_rest.erl, line 1583)
```
(cherry picked from commit f4a9edfd2f)
Avoid the following crash
```
** Reason for termination ==
** {mqtt_unexpected_cast,{shutdown,"Closed via management plugin"}}
crasher:
initial call: rabbit_mqtt_reader:init/1
pid: <0.1096.0>
registered_name: []
exception exit: {mqtt_unexpected_cast,
{shutdown,"Closed via management plugin"}}
in function gen_server:handle_common_reply/8 (gen_server.erl, line 1208)
```
when closing MQTT or Stream connections via HTTP API endpoint
```
/connections/username/:username
```
(cherry picked from commit f44c851293)
Scan queues, exchanges and bindings before attempting
to import anything on boot. If they miss the virtual
host field, fail early and log a sensible message.
(cherry picked from commit 62fffb6634)
The default is 20 MiB, which is enough to upload
a definition file with 200K queues, a few virtual host
and a few users. In other words, it should accomodate
a lot of environments.
(cherry picked from commit b7b3514bb1)
Using GET /api/queues?disable_stats=true&enable_queue_totals=true is far more efficient than the standard GET /api/queues and in many cases will suffice for monitoring and operating purposes.
(cherry picked from commit 9d8a537073)
A direct client operation fails if the queue is exclusive. This
API should behave like the rabbitmqctl that can delete the queue
even in that case
(cherry picked from commit 78f901a224)
- Separate pure management ui suites from authnz
- Run full management ui suite on every commit to main or
release brances
- Fun full management ui suite on every change done to
rabbitmq_management plugin on any PR
(cherry picked from commit 7fb55881a4)