Commit Graph

2199 Commits

Author SHA1 Message Date
Volker Schlecht 5086e283bd
Allow building CLI with elixir 1.18.x
Tested with elixir 1.18.0-rc0
2024-12-12 19:30:04 +01:00
Michael Klishin 9b6ab77f87
CLI: test/diagnostics cosmetics #12894 2024-12-04 13:44:29 -05:00
Michael Davis 430cd2f578
CLI: Compile and test with --warnings-as-errors 2024-12-04 11:19:55 -05:00
Michael Davis 9f60325563
CLI: Silence `status` command test
This check is expected to succeed and the status is expected to be
printed to stdout rather than stderr. This change silences the status
output. The status text was printed mistakenly previously because we
captured stderr rather than stdout.
2024-12-04 11:10:46 -05:00
Michael Davis c328922a2a
CLI: Fix match of discover peers command test
This previously emitted a warning because Elixir will rebind `this_node`
by default, so the `this_node` binding in the line above was unused.
(As opposed to Erlang which would treat this as a match - rejecting
the binding if `this_node` was not equal to the value being matched.)
The node needed to be adjusted as well - `node()` returned the ExUnit
runner's node while the command returned the remote node, which is
stored in the context under `opts.node`.
2024-12-04 11:07:46 -05:00
Michael Davis d58d874a0b
CLI: Resolve elixirc warnings 2024-12-04 11:07:34 -05:00
Jean-Sébastien Pédron 112ff3f3f5
rabbitmq_cli: Prepare tests to run against a node with Khepri enabled by default 2024-12-02 13:55:41 +01:00
Jean-Sébastien Pédron 58c609c4e7
rabbitmq_cli: Fix typo in an error message in `join_cluster` 2024-12-02 11:51:24 +01:00
Jean-Sébastien Pédron 0411864670
rabbitmq_cli: Honor $RABBITMQ_METADATA_STORE when starting test node
[Why]
Two reasons:
1. We need to set the correct feature flags on the test node we have to
   start.
2. We can skip Mnesia- or Khepri-specific tests if they are marked.
2024-11-29 17:01:05 +01:00
Jean-Sébastien Pédron e480513297
rabbitmq_cli: Use `make start-background-broker` to start test node
[Why]
The `run-background-broker` does not wait for the node to be ready,
leading to some transient errors in the testsuite.

[How]
The `start-background-broker` does wait.

While here, export the value of `$(MAKE)`. Otherwise, nested uses of
make(1) may use the wrong make command.
2024-11-29 16:57:59 +01:00
Michael Klishin d0b66b8c8f
check_certificate_expiration_command.ex: squash a compiler warning 2024-11-27 18:26:34 -05:00
Michael Klishin 1cae417dbf
Merge pull request #12821 from rabbitmq/rabbitmq-server-12776
Definition export: inject default queue type into virtual host metadata
2024-11-27 14:53:25 -05:00
Michael Klishin f377e8f9f0
Cosmetics 2024-11-27 12:44:17 -05:00
Michael Klishin 3e9c6a95df
Explain why list_vhosts does not list metadata such as DQT by default 2024-11-27 07:27:54 -05:00
Michael Klishin 93fd1dcda1
Drop release_series_support_status from overview and status
This undocumented key used to use a simple date-based
formula and used to help support and the core
team.

Nodes no longer have the context to return
a correct response, so all we can do is drop this
key.
2024-11-24 17:56:57 -05:00
Michael Klishin d5063c7076
Merge pull request #12675 from rabbitmq/fix-check_if_any_deprecated_features_are_used-cli-command
CLI: Finish `check_if_any_deprecated_features_are_used` implementation
2024-11-14 13:57:40 -05:00
Michael Klishin 94c8f01699
rabbitmq-diagnostics status: handle output of 3.13.x and previously released 4.0.x nodes
In a mixed cluster environment,
'rabbitmq-diagnostics status' can hit a node
that does not return any node tags.

Be more defensive and handle such cases
by simply displaying "(none)" for such
values.
2024-11-11 17:41:33 -05:00
Simon Unge 3d35416635 Node tags local to broker, add to /api/overview output and ctl status command 2024-11-11 20:49:21 +00:00
Jean-Sébastien Pédron ddaea6facb
CLI: Finish `check_if_any_deprecated_features_are_used` implementation
[Why]
The previous implementation bypassed the deprecated features subsystem.
It only cared about classic mirrored queues and called some
queue-related code directly to determine if this specific feature was
used.

[How]
The command code is simplified by calling the deprecated subsystem to
list used deprecated features instead.

References #12619.
2024-11-11 10:13:25 +01:00
Simon Unge eeea517da5 Store tags in global parameters 2024-11-08 21:41:49 +00:00
Simon Unge f5ef64ad06 Add cluster tag config that is exposed via HTTP /api/overview and CTL cluster_status 2024-11-08 21:05:02 +00:00
Diana Parra Corbacho 8dc712543e Tests: set disk monitor as active in set_disk_free_limit_command_test 2024-11-06 16:59:19 +01:00
Simon Unge 012ba79129 Dependency CSV updated from 3.2.0 to 3.2.1 2024-10-07 18:27:05 +00:00
Michael Klishin 80f4797e76 Remove multiple mentions of global prefetch
As suggested by @johanrhodin in #12454.

This keeps the Prometheus plugin part but
marks it as deprecated. We can remove it in
4.1.
2024-10-04 20:47:37 -04:00
Loïc Hoguin 6b3b0e5c3f
CLI: Make a test more reliable 2024-09-30 12:35:43 +02:00
Loïc Hoguin 1c797387f7
cli: Add 4.1.0 to mock plugin's versions 2024-09-30 12:35:43 +02:00
Loïc Hoguin 71ec3396f6
cli: Start a background node to run the tests 2024-09-30 12:35:43 +02:00
Michael Klishin 47210c8307
cli enable_feature_flag: alias --experimental as --opt-in
--experimental is no longer particularly fair to Khepri,
which is not enabled by default because of its enormous
scope, and because once enabled, it cannot be disabled.

--opt-in would be a better name but --experimental
remains for backwards compatiblity.

When both are specified, we consider that the
user opts in if at least one of the flags is
set to true.
2024-09-17 19:08:28 -04:00
David Ansari f78f14ab1d Display container-id in the UI and CLI 2024-09-13 17:05:46 +02:00
Loïc Hoguin f0932e3d42
Merge pull request #11778 from rabbitmq/loic-make-it-big
Make cleanups and ct-master introduction
2024-09-02 13:54:39 +02:00
Loïc Hoguin 7ad8e2856b
make: Restrict Erlang.mk plugin inclusion
This has no real impact on performance[1] but should
make it clear which application can run the broker
and/or publish to Hex.pm. In particular, applications
that we can't run the broker from will now give up
early if we try to.

Note that while the broker can't normally run from the
amqp_client application's directory, it can run from
tests and some of the tests start the broker.

[1] on my machine
2024-08-29 15:19:50 +02:00
Michal Kuratczyk 9b828c08b7
Remove HiPE 2024-08-28 09:18:28 +02:00
Michael Klishin f47daee915 Wording #12113 2024-08-24 19:07:09 -04:00
Michal Kuratczyk b48d4bf29a
Don't return khepri status when khperi_db is disabled
When khepri_db feature flag is disabled, Khepri servers
are running but are not clustered. In this case `rabbit_khepri:status/0`
shows that all nodes are leaders, which is confusing and scary
(even though actually harmless). Instead, we now just print that mnesia
is in use.
2024-08-22 11:01:46 +02:00
Michael Davis dce8135d30
Add test cases for the '--experimental' flag 2024-08-20 16:23:17 -04:00
Michael Davis dc611dd45c
Non-zero exit code for failing to enable an experimental feature flag
With the prior behavior it can be unclear whether the text was a warning
and the feature flag was enabled anyways. We can use a non-zero exit
code and the `{:error, code, text}` return value to make it clear that
the flag wasn't enabled.
2024-08-20 16:03:29 -04:00
Michael Davis f0c0cf8052
enable_feature_flag CLI: Fix typo in usage message 2024-08-20 15:25:20 -04:00
Michal Kuratczyk 396ad7af1a Reject `--experimental all` 2024-08-19 13:41:37 -04:00
Michal Kuratczyk ddb117f810 `-f` -> `-e`; drop unneeded cases; typos
Also, remove the `undef` case which was only needed for
RabbitMQ 3.7 and older.
2024-08-19 13:41:37 -04:00
Michal Kuratczyk e3302f2f9a Rename --force to --experimental
Plus, a slightly more scary error message
2024-08-19 13:41:37 -04:00
Michal Kuratczyk 58e0c1600f Require --force to enable experimental FF 2024-08-19 13:41:37 -04:00
Michael Klishin bd1e953b95 Configuration value encryption CLI commands: unconditionally print stack traces 2024-08-13 14:31:55 -04:00
Michael Klishin 9dc899441f Validation tests for the new command 2024-08-13 14:29:14 -04:00
Michael Klishin e1490c6d9c More CLI commands for tagged values 2024-08-13 14:26:02 -04:00
Michael Klishin c2fdd73c4b Secret encoding: refine CLI tools
'ctl encode' is unfortunately name and targets
advanced.config commands.

This introduce a command that targets 'rabbitmq.conf'
values and has a more specific name.

Eventually 'ctl encode' will be aliased and deprecated,
although we still do not have an aliasing mechanism
and it won't be in scope for 4.0.
2024-08-13 12:29:28 -04:00
Michael Klishin 5a56e326d9
Merge pull request #11741 from rabbitmq/retry-register-projections-during-boot
rabbit_khepri: Retry register_projections during boot
2024-07-25 15:39:15 -04:00
Michael Davis 52a0d70e15
Handle database timeouts when declaring exchanges
The spec of `rabbit_exchange:declare/7` needs to be updated to return
`{ok, Exchange} | {error, Reason}` instead of the old return value of
`rabbit_types:exchange()`. This is safe to do since `declare/7` is not
called by RPC - from the CLI or otherwise - outside of test suites, and
in test suites only through the CLI's `TestHelper.declare_exchange/7`.
Callers of this helper are updated in this commit.

Otherwise this commit updates callers to unwrap the `{ok, Exchange}`
and bubble up errors.
2024-07-22 16:02:03 -04:00
Michael Klishin 40903581ef Bump version to 4.0 in a few places 2024-07-19 01:21:30 -04:00
Diana Parra Corbacho cdff2ae66a Handle timeout_waiting_for_khepri_projections on cli commands 2024-07-18 16:08:21 +02:00
Michael Klishin 5346339655 Squash two more deprecated CMQ-related CLI command warnings 2024-07-15 12:38:01 -04:00