Michael Klishin
a5373d71d6
Make it possible to update virtual host tags
...
Currently they can only be specified at creation time
2021-05-01 21:48:50 +03:00
dcorbacho
2998234f48
Move stream_status command to streams
...
Keeps the alias to diagnostics and queues
2021-04-30 11:33:05 +02:00
dcorbacho
310a483221
CLI command to for stream details
...
rabbitmq-queues stream_status [--tracking] <queue>
If the --tracking option is enabled, it returns a table with all offset tracking
for that queue.
2021-04-13 15:29:40 +01:00
Michael Klishin
7aa0fd6215
CLI: format infinity high VM memory watermark in status
...
High VM memory watermark cannot actually be set to 'infinity' (and beyond :P)
but it can be returned as a fallback value. See #2733 for some additional
context.
We format 'infinity' as "100% of available memory". This seems to be
a reasonable way to do it because the status command will try to
present a final interpreted limit value.
Generally a limit of infinity won't be returned except very early in node
boot when the monitor(s) haven't yet started.
Per discussion with @evaskova.
2021-04-10 17:33:29 +03:00
Michael Klishin
8566524d3c
CLI: handle {:relative, val} cases when formatting memory watermark
...
It can be exposed to CLI tools when relative watermark value is
configured via advanced.config.
Closes #2964 .
2021-04-10 16:54:12 +03:00
Philip Kuryloski
388654c542
Add a partial Bazel build ( #2938 )
...
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
2021-03-29 11:01:43 +02:00
Michael Klishin
6ad235cc64
Update rabbitmq-diagnostics {drain, revive} tests
...
to enable the feature flag they depend for
their functionality.
2021-03-24 21:22:40 +03:00
Michael Klishin
43ab84a248
CLI tools: bump dependencies
2021-03-24 13:30:39 +03:00
Michael Klishin
6843bb681e
CLI tools: gitignore ./sbin
2021-03-24 13:30:39 +03:00
Philip Kuryloski
a63f169fcb
Remove duplicate rabbitmq-components.mk and erlang.mk files
...
Also adjust the references in rabbitmq-components.mk to account for
post monorepo locations
2021-03-22 15:40:19 +01:00
Michael Klishin
4bceae0c21
Use the standard domain for quorum queue doc guides
2021-03-22 13:40:42 +03:00
kjnilsson
d6e96c238c
fix missing Ra deps updates
2021-03-19 13:54:43 +00:00
Michael Klishin
2fcb282633
Make 'rabbitmq-queues await_online_quorum_plus_one' a no-op for single node clusters
...
since it does not make sense in that case
2021-03-13 00:47:23 +03:00
Jean-Sébastien Pédron
cdcf602749
Switch from Lager to the new Erlang Logger API for logging
...
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.
The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.
The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.
The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:
2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0> Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0> Licensed under the MPL 2.0. Website: https://rabbitmq.com
The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).
JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:
Mar 3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}
For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
* `-` still means stdout
* `-stderr` means stderr
* `syslog:` means syslog on localhost
* `exchange:` means logging to `amq.rabbitmq.log`
`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.
The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.
From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.
In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):
?LOG_NOTICE("Logging: switching to configured handler(s); following "
"messages may not be visible in this log output",
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.
At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.
The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-03-11 15:17:36 +01:00
Michael Klishin
d7e1336741
rabbitmq-diagnostics remote_shell: squash a compiler warning
2021-03-11 04:12:23 +03:00
Michael Klishin
af50305d5d
Merge pull request #2860 from rabbitmq/cli-remote_shell
...
Add rabbitmq-diagnostics remote_shell
2021-03-05 05:59:31 +03:00
Michael Klishin
a310687478
Sync rabbitmq-components.mk
2021-03-05 02:52:23 +03:00
Michael Klishin
0d29cbb116
Cosmetics
2021-03-03 17:17:59 +03:00
Loïc Hoguin
5c829ff599
Add rabbitmq-diagnostics remote_shell
2021-03-03 11:28:54 +01:00
Michael Klishin
17b082abeb
Merge pull request #2843 from rabbitmq/consumer-capacity
...
Rename consumer_utilisation to consumer_capacity
2021-02-25 16:17:09 +03:00
Michael Klishin
93721bfa2d
Whitelist consumer_capacity in 'rabbitmqctl list_queues'
2021-02-24 21:26:46 +03:00
Michael Klishin
a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility
2021-02-24 12:53:30 +03:00
Michael Klishin
17526987c6
Bump (c) year
2021-02-14 00:54:01 +03:00
Michael Klishin
68c04358a5
Drive-by change: improve wording used by 'rabbitmq-queues rebalance'
2021-02-09 21:02:52 +03:00
Michael Klishin
83ae131dea
Refactor this test in attempt to help a scoping issue on Concourse
2021-02-01 23:09:07 +03:00
Michael Klishin
e735025b2c
Use await_condition/2 in these tests
2021-02-01 20:19:39 +03:00
Michael Klishin
3f6a42e82b
Wording
2021-02-01 20:19:22 +03:00
Michal Kuratczyk
ea1f4a355a
New command: `rabbitmqctl close_all_user_connections`
2021-02-01 16:04:16 +01:00
Michal Kuratczyk
5a967affdd
WIP: close_all_user_connections command
2021-01-28 12:57:18 +01:00
Jean-Sébastien Pédron
47686ee1f0
Remove unused .github directories
...
They were valid until the switch to the "monorepository" when everything
was merged into a single Git repository.
2020-11-17 13:33:16 +01:00
Michael Klishin
400f6f1188
Wording and additional usage docs
...
(cherry picked from commit 3e3ef927b2
)
2020-11-17 14:17:43 +03:00
Michal Kuratczyk
ce65586405
Allow "all" as a feature flag name
...
`rabbitmqctl enable_feature_flag all` enables all currently disabled feature flags.
While https://github.com/rabbitmq/rabbitmq-cli/issues/455 asked for
`--all`, I decided to just use "all" for consistency with
`rabbitmq-queues rebalance all`.
Closes rabbitmq/rabbitmq-cli#455
(cherry picked from commit af9e877848
)
2020-11-17 14:17:35 +03:00
Philip Kuryloski
44b77e8b1e
Monorepo GitHub Actions
...
Add GitHub Actions workflows for Erlang/OTP 22.3 & 23.0.
The workflows run tests for each component that is now part of this
repo, with test suite parallelization specifically for the rabbit
erlang application.
2020-11-13 14:41:22 +01:00
Arnaud Cogoluègnes
6c24522651
Update rabbitmq-components.mk
2020-11-03 14:27:36 +01:00
Michael Klishin
4f7db32452
Provide an extra hint in 'rabbitmqctl add_user' output
...
to give the user an idea that she would have to
grant permissions to the newly added user.
2020-10-25 16:43:37 +03:00
Arnaud Cogoluègnes
82e7cb95a1
Merge pull request #460 from rabbitmq/queue-type-info-keys
...
Add relevant info keys for stream and quorum queues
2020-10-22 13:52:47 +02:00
Michael Klishin
57a013e2b3
Update rabbitmq-components.mk
2020-10-21 12:55:33 +03:00
Michael Klishin
864bc3ab26
Avoid Elixir compiler warnings about unknown modules
...
Note that JSON and CSV are listed under deps/0 but the compiler
seemingly fails to discover them.
2020-10-20 13:48:01 +03:00
Michael Klishin
d7824289f4
List Elixir 1.11 as supported
2020-10-20 13:28:58 +03:00
Michael Klishin
053104258c
Simplify node ID generation to just a random number [0, 1024]
2020-10-20 09:18:49 +03:00
Luke Bakken
1a7df254c3
mix format
2020-10-19 17:31:03 -07:00
Luke Bakken
02e234c2de
Use the current epoch seconds to generate CLI name
...
This will limit the number of CLI node names to 1024 by taking the
current epoch seconds modulo a random number between 1 and 1024.
Follow-up to the following:
rabbitmq/rabbitmq-server#552
https://groups.google.com/d/msg/rabbitmq-users/aSnlC5hSvMk/sIWtv5fxCgAJ
2020-10-19 17:27:43 -07:00
dcorbacho
d7aaf7bccb
Add relevant info keys for stream and quorum queues
2020-10-19 15:57:08 +01:00
Michael Klishin
b5bdfe701b
Don't consider nodes in maintenance mode to be quorum critical
...
they should have transferred their QQ replicas to its peers
and won't be considered for new replica placement
or Raft leader elections.
Closes #2469 .
2020-10-19 17:29:12 +03:00
Michael Klishin
5a95b3b847
Merge pull request #450 from rabbitmq/auth-attempt-metrics
...
Add enable/disable and list auth attempt metrics
2020-10-14 23:56:47 +03:00
Michael Klishin
c43db9d4d9
Auth attempt command naming, add JSON --formatter support
2020-10-14 23:32:16 +03:00
Luke Bakken
6232f18eed
mix format
2020-10-12 10:07:04 -07:00
Jean-Sébastien Pédron
fcd487f93f
Travis CI: Update config from rabbitmq-common
2020-10-12 18:10:32 +02:00
Jean-Sébastien Pédron
d8dd6c190a
Travis CI: Update config from rabbitmq-common
2020-10-12 17:42:54 +02:00
Jean-Sébastien Pédron
15eef0b52a
test: Remove assertions around `mnesia_dir_not_found`
...
... when no Mnesia directory is specified. The reason is that the
default behavior changed: if the node is unavailable and no Mnesia
directory is configured, we use the default directory.
2020-10-12 17:42:50 +02:00
Luke Bakken
69a51a9c89
mix format
2020-10-12 07:29:00 -07:00
Luke Bakken
a9a2164026
Handle offline remote node in rename_cluster_node
...
If the remote node is unavailable, we use the default values of
`mnesia_dir` and `feature_flags_file`
2020-10-12 07:27:53 -07:00
Michael Klishin
12ec3716e6
Squash a compiler warning
2020-10-05 17:48:55 +03:00
Jean-Sébastien Pédron
1925e2970f
mix.exs: Bump requirement to 1.10.4
...
We only test against 1.10.4, so there is no way we can claim
compatibility with older versions.
2020-10-05 15:43:35 +02:00
Luke Bakken
95170e037f
Update minimum required Elixir version
...
See https://github.com/rabbitmq/rabbitmq-ci/pull/33
Part of an effort to use Elixir 1.9 as the minimum.
cc @dumbbell
2020-10-01 08:34:01 -07:00
dcorbacho
a40f08fbc4
Fix stream commands
2020-09-30 16:34:53 +01:00
dcorbacho
eaacd594f5
Move set stream retention policy to rabbitm-streams
...
Add forgotten tests
2020-09-30 16:34:53 +01:00
dcorbacho
fb8610ff44
Add/delete stream replica commands
...
New ctl utility for stream queues
[#171207068 ]
2020-09-30 16:34:50 +01:00
dcorbacho
b2698901d3
Set stream retention policy command
...
[#171207092 ]
2020-09-30 16:34:13 +01:00
dcorbacho
ece0aa7609
Shrink quorum queues on forget cluster node command
...
When the node is offline we can only offer a warning - operator
must use the shrink command once the node is restarted
2020-09-25 15:06:39 +01:00
dcorbacho
49616a709a
Add --by-source option to list auth attempts command
2020-09-24 12:29:52 +01:00
dcorbacho
156df91ae2
Rename auth attempt commands
2020-09-23 11:49:13 +01:00
Michael Klishin
c691658476
Squash a couple of compiler warnings
2020-09-22 05:55:56 +03:00
Michael Klishin
664db6c28f
Handle cases when there's no message to peek at
2020-09-21 12:33:45 +03:00
Michael Klishin
446e164f27
'rabbitmq-queues peek': tighter position validation, basic JSON formatter support
2020-09-21 12:00:45 +03:00
Michael Klishin
09f60618db
'rabbitmq-queues peek': use MergesDefaultVirtualHost
2020-09-20 20:14:49 +03:00
Michael Klishin
e9919a9651
peek command: limit to rabbitmq-queues
2020-09-20 20:13:31 +03:00
Michael Klishin
aa2b985461
Merge branch 'master' into qq-peek-command
2020-09-20 20:02:53 +03:00
Michael Klishin
28a5f4fc45
Improve error handling, including with --formatter=json
2020-09-18 11:58:15 +03:00
Michael Klishin
f16166d29b
rabbitmq-queues reclaim_quorum_memory: restore --vhost mention in usage
...
apparently quite a few commands have it, even though it's
documented in the general/global parameters section.
2020-09-18 10:18:11 +03:00
Michael Klishin
a6e17863fb
Introduce RabbitMQ.CLI.Core.MergesDefaultVirtualHost
...
Despite being the implicit default, the "/" virtual host
may be required in function assertions, so an explicit
merge can still be necessary.
Lets introduce a reusable macro module for this.
2020-09-18 10:00:52 +03:00
Michael Klishin
9ba1f594f7
Wording
2020-09-18 08:15:42 +03:00
dcorbacho
dd5bed6308
Reclaim quorum memory command
2020-09-16 12:38:55 +01:00
kjnilsson
53a5839ae7
Quorum queue peek command
2020-09-14 12:05:46 +01:00
dcorbacho
bb005b1ce6
Add enable/disable and list auth attempt metrics
2020-08-28 15:22:19 +01:00
Michael Klishin
bf12dc98fa
set_user_limits: mention <username> in parameter docs
2020-08-25 20:24:18 +03:00
Michael Klishin
9b8b7436e8
Wording
2020-08-25 19:09:00 +03:00
Michael Klishin
185b6d5352
Avoid double spacing between command lines
...
when no arguments are provided. This makes the output
consistent with that of `help' and `--help'.
2020-08-20 14:27:31 +03:00
Luke Bakken
b3a139fbfe
Update rabbitmq-components.mk
2020-08-20 14:27:31 +03:00
Michael Klishin
3d621a5984
Include total amount of memory used into 'rabbitmq-diagnostics status' output
...
--formatter=json already reports that value.
Spotted by Jon P on rabbitmq-users and @lukebakken.
2020-08-20 14:27:31 +03:00
Jean-Sébastien Pédron
c7dc8a2958
Update rabbitmq-components.mk
2020-08-20 14:27:31 +03:00
Luke Bakken
3fb7a9f689
Update rabbitmq-components.mk
2020-08-20 14:27:31 +03:00
dcorbacho
8ae539f3f8
Update erlang.mk
2020-08-20 14:27:30 +03:00
Michael Klishin
812e6dee38
Update rabbitmq-components.mk
2020-08-20 14:27:30 +03:00
Michael Klishin
d0972006b2
Update rabbitmq-components.mk
2020-08-20 14:27:30 +03:00
Michael Klishin
6f17c6cbd0
More reliable drain and revive command assertions
2020-08-20 14:27:30 +03:00
dcorbacho
7e9d0b87df
Revert drop of Exhibit B on MPL 2.0
2020-08-20 14:27:30 +03:00
dcorbacho
fb051224b1
Update LICENSE
2020-08-20 14:27:30 +03:00
Michael Klishin
15ea3d3de0
Avoid double spacing between command lines
...
when no arguments are provided. This makes the output
consistent with that of `help' and `--help'.
2020-08-05 19:36:32 +03:00
Luke Bakken
b483db91c3
Update rabbitmq-components.mk
2020-08-04 08:41:46 -07:00
Michael Klishin
4445a3267e
Include total amount of memory used into 'rabbitmq-diagnostics status' output
...
--formatter=json already reports that value.
Spotted by Jon P on rabbitmq-users and @lukebakken.
2020-07-31 03:29:15 +03:00
Jean-Sébastien Pédron
e644c5241a
Update rabbitmq-components.mk
2020-07-30 12:06:51 +02:00
Luke Bakken
389586bc5a
Update rabbitmq-components.mk
2020-07-29 10:02:02 -07:00
dcorbacho
d2c5d02cfd
Update erlang.mk
2020-07-21 14:32:06 +01:00
Michael Klishin
a20aff9de5
Update rabbitmq-components.mk
2020-07-21 13:12:45 +03:00
Michael Klishin
c69f24d4df
Update rabbitmq-components.mk
2020-07-21 03:42:48 +03:00
Michael Klishin
51b60e3ac3
More reliable drain and revive command assertions
2020-07-21 03:42:48 +03:00
dcorbacho
5b6bbc039b
Revert drop of Exhibit B on MPL 2.0
2020-07-20 16:57:52 +01:00
dcorbacho
a806216533
Update LICENSE
2020-07-20 10:51:27 +01:00
Ayanda-D
74c183e69e
Update list_user_limits command defaults
2020-07-17 15:59:20 +01:00
Ayanda-D
30160430b2
Update license, ref: #447
2020-07-17 15:59:20 +01:00
Ayanda-D
afcae06cd9
Include acting-user in user-limit operations & doc-guides
2020-07-17 15:59:20 +01:00
Anupama Singh
128201baa6
New command added to list user limits
2020-07-17 15:59:20 +01:00
Ayanda-D
dbbe62e8a4
Test case added for command to set both max-connections and max-channels
...
Clearing all user limits
Testcase to test clearing all limits for user
2020-07-17 15:59:20 +01:00
Anupama Singh
d1301e5ce5
Test cases for setting and clearing user connection/channel limits
2020-07-17 15:59:20 +01:00
Anupama Singh
57b95856d8
Clearing user connection/channel limits
2020-07-17 15:56:48 +01:00
Anupama Singh
e02fdb63c8
Setting user connection/channel limits
2020-07-17 15:56:48 +01:00
Michael Klishin
f05a7c5f09
Update MPL2 license file, drop Exhibit B
...
and add a VMware copyright notice.
We did not mean to make this code Incompatible with Secondary Licenses
as defined in [1].
1. https://www.mozilla.org/en-US/MPL/2.0/FAQ/
2020-07-17 14:53:10 +03:00
Michael Klishin
5553a24545
Sync license headers with MPL2 in master
2020-07-14 03:54:19 +03:00
Michael Klishin
21abbe1fc8
rabbitmq-upgrade {drain,revive}: produce a sensible error when target node does not support maintenance mode
2020-07-14 03:52:02 +03:00
Michael Klishin
c9d984eb4c
Report node maintenance status in 'rabbitmq-diagnostics cluster_status'
...
Part of rabbitmq/rabbitmq-server#2321
2020-07-14 03:52:02 +03:00
Michael Klishin
c9ed8be1bc
Report node maintenance status in 'rabbitmq-diagnostics status'
...
Part of rabbitmq/rabbitmq-server#2321
2020-07-14 03:52:02 +03:00
Michael Klishin
998701eb05
Introduce 'rabbitmq-upgrade drain' and 'rabbitmq-upgrade revive'
...
A part of rabbitmq/rabbitmq-server#2321
2020-07-14 03:52:02 +03:00
Michael Klishin
30ee526b2a
Add doc guide links to {suspend,resume}_listeners
2020-07-14 03:52:02 +03:00
Michael Klishin
a8b5408992
Follow our standard file naming convention for commands
2020-07-14 03:52:02 +03:00
Michael Klishin
35103fe7da
Introduce 'rabbitmqctl {suspend,resume}_listeners'
...
Not directly related to rabbitmq/rabbitmq-server#2321
but useful on its own. We've had requests for and discussions
about such commands in the past and now that Ranch supports
listener suspension, there aren't many reasons not to do it.
2020-07-14 03:52:01 +03:00
dcorbacho
679ca254f3
Switch to Mozilla Public License 2.0 (MPL 2.0)
2020-07-11 19:23:07 +01:00
Michael Klishin
db662cfa59
Re-categorize some rabbitmq-diagnostics commands
...
For a couple of reasons:
* The Observability, Monitoring and Health Checks group has grown too large
* Some commands in it clearly have to do with exploring effective node
or CLI tool configuration, not its dynamically changing operational state
2020-07-05 15:35:32 +07:00
Michael Klishin
9ac54057f2
Wording
2020-07-05 03:50:48 +07:00
Michael Klishin
7bf2f6b4ef
erlang_cookie_sources: support Windows-specific HOMEDRIVE and HOMEPATH
2020-07-05 03:49:48 +07:00
Michael Klishin
db299967e0
Introduce 'rabbitmq-diagnostics erlang_cookie_sources'
...
to help troubleshoot authentication issues.
Inspired by an idea from @gerhard.
2020-07-05 03:19:50 +07:00
Michael Klishin
31550672da
Squash a compiler warning
2020-07-03 10:57:23 +07:00
Michael Klishin
4f80dd1369
Make RABBITMQ_ERLANG_COOKIE deprecation message pop [as in colors]
2020-07-03 09:05:35 +07:00
Michael Klishin
d7ca0e9446
Deprecate RABBITMQ_ERLANG_COOKIE env variable support
...
It's not worth the confusion it causes in practice since
the server does not support it.
Per discussion with @gerhard @dumbbell.
Closes #443 .
2020-07-02 08:25:49 +03:00
Michael Klishin
f8c9b3db33
More end-to-end integration tests for #439
2020-07-02 07:32:26 +03:00
Michael Klishin
2101043257
Introduce a first class autocomplete command
...
Currently we have a --auto-complete magic argument which
does not show up in `help` and requires its argument to be
explcitly -- separated from the actual flag, which is
counter-intuitive.
This introduces a new autocomplete command which is delegated
to by --auto-complete, much like --help is simply a special
way of invoking the `help` command.
Closes #439
2020-07-02 07:29:40 +03:00
Michael Klishin
9f031d3f0b
Special case single node clusters for 'rabbitmq-queues check_if_node_is_quorum_critical'
...
References rabbitmq/rabbitmq-cli#432
2020-07-01 18:25:06 +03:00
Michael Klishin
18a3daf9be
rabbitmqctl eval: consume multiple lines from standard input
...
Part of #438
2020-07-01 16:55:33 +03:00
Michael Klishin
a98e38dd80
Introduce 'rabbitmqctl eval_file [file path]'
...
for evaluation of scripts in environments where standard input
redirection is not an option or problematic, e.g.
certain Windows environments.
Closes #438
2020-07-01 03:11:13 +03:00
Michael Klishin
0f1f6d2be7
'rabbitmqctl eval': accept expression to evaluate from stdin
...
References #438
2020-07-01 02:29:22 +03:00
Michael Klishin
24947666b9
if a node is the only cluster member, pass on the mirror sync critical check
...
Per discussion with @harshac, @ansd
Closes rabbitmq/rabbitmq-cli#432
2020-07-01 01:46:31 +03:00
Michael Klishin
921d349e37
Make --help, help usage help messages consistent
...
* `help` printed an "Error:" at the top for no reason
* `help [command]` with a non-existent command did not offer a suggestion
like an attempt to invoke a non-existent command would
* Exit codes were not consistent
* `help --list-commands` had line break issues
With this change,
* `help` is consistent with --help
* `help [command]` is consistent with `[command] --help`
* If a command is not found, either during the execution flow
or `help [commnad]`, we consistently attempt a Jaro distance suggestion
* Successful or effectively successful exits from the `help`
command do not produce any error messages at the top
2020-06-29 03:57:52 +03:00
Michael Klishin
ca815978dd
Drop a low importance test that only fails in one environment
2020-06-26 06:35:55 +03:00
Michael Klishin
37c9a5cb75
An attempt to fix a test failing only on Concourse
2020-06-26 06:26:25 +03:00
Michael Klishin
ef329b88b1
rabbitmqctl export_definitions: ensure that parameter value is a map
...
otherwise it would be serialised as a list of pairs, which is
not the format the import path (or an operator) expects
Closes #435
2020-06-26 05:55:57 +03:00
Michael Klishin
209acc6396
Rename Rabbitmq.Atom.Coerce to RabbitMQ.CLI.Core.DataCoercion
...
to follow the existing core (library, utility) module
naming convention.
2020-06-26 01:34:03 +03:00
Michael Klishin
82d62726b5
Bump listed version requirements
...
Technically we support Elixir 1.9 but let's recommend
the latest and greatest.
2020-06-26 01:31:58 +03:00
Michael Klishin
d11bd12a97
Make 'rabbitmqctl hipe_compile' a no-op
...
HiPE has been deprecated/only partially supported in Erlang 22
and will be removed completely in Erlang 24 next year.
Part of rabbitmq/rabbitmq-server#2392
2020-06-25 18:39:12 +03:00
Jean-Sébastien Pédron
bda56ef30f
Update erlang.mk
2020-06-23 17:13:36 +02:00
Michael Klishin
e1e92408db
Move these helpers to Core.Networking
2020-06-21 15:41:45 +03:00
Michael Klishin
f11384fe86
Introduce 'rabbitmq-diagnostics resolver_info'
...
To inspect effective inetrc [1] settings used
by a node or CLI tools.
1. https://erlang.org/doc/apps/erts/inet_cfg.html
2020-06-21 15:09:21 +03:00
Michael Klishin
b17fda724b
Introduce 'rabbitmq-diagnostics resolve_hostname'
...
Helps with troubleshooting hostname resolution behavior
on nodes and locally for CLI tools. This is obviously not meant
to be a replacement for existing tools such as dig, only
a way to quickly spot obvious irregularities, e.g. those
in environments that use custom Erlang inetrc files.
Per discussion @harshac.
2020-06-20 16:55:21 +03:00
Michael Klishin
c72f0aea41
ctl add_user: use a more suitable exit code when no password is provided
...
EX_DATAERR from [1] makes more sense than EX_SOFTWARE.
1. https://www.freebsd.org/cgi/man.cgi?query=sysexits&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE&arch=default&format=html
2020-06-13 13:04:47 +03:00
Jean-Sébastien Pédron
e170057456
GitHub Actions: Only dispatch from the master branch
...
The reason is that currently, the repository dispatch event only
triggers the workflow of the target repository's default branch (i.e.
master in our case).
This is ok for now, but this prevents us from using GitHub Actions with
release branches unfortunately.
2020-06-09 16:47:50 +02:00
Michael Klishin
696ccb18b4
Bump Recon to 2.5.1
...
for Erlang 23 compatibility of 'rabbitmq-diagnostics observer'
References zhongwencool/observer_cli#68 .
2020-06-09 08:22:16 +03:00
Michael Klishin
6986086b88
User and permission management command: adopt a more suitable exit code
...
Apparently [1], which is the most standardized set of exit codes
we could find, includes a dedicated exit code for cases where
a user does not exist.
References #425 , rabbitmq/rabbitmq-server#2363 , bda0cbfdc3
.
1. https://www.freebsd.org/cgi/man.cgi?query=sysexits&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE&arch=default&format=html
2020-06-08 05:35:33 +03:00
Michael Klishin
bda0cbfdc3
Update test expectation
...
References #425 , rabbitmq/rabbitmq-server#2363
2020-06-08 05:03:55 +03:00
Michael Klishin
01e974c5dc
Merge pull request #428 from rabbitmq/rabbitmq-cli-424
...
Introduce 'rabbitmq-diagnostics list_network_interfaces'
2020-06-05 18:57:46 +03:00
Luke Bakken
9f9cb644c9
Remove unused variable
2020-06-05 08:12:20 -07:00
Michael Klishin
9fbec752b3
rabbitmq-diagnostics list_network_interfaces: support --offline mode
...
Operators likely would want to inspect available interfaces when
the node is not yet running.
Part of rabbitmq/rabbitmq-cli#424
2020-06-05 17:47:38 +03:00
Michael Klishin
3003b9e615
Introduce 'rabbitmq-diagnostics list_network_interfaces'
...
To make it easier to discover them without using eval and
obscure functions.
Part of rabbitmq/rabbitmq-cli#424
2020-06-05 17:16:10 +03:00
Michael Klishin
e01753ed7a
Deprecate 'ctl node_health_check'
...
* It requires a fully booted node, so not generally suitable for a Kubernetes readiness probe.
* It can produce false positives
* It is too intrusive and CPU-intensive to use at scale
* Most operators do not understand what it really does and when they learn about it,
consider it to be too opinionated and intrusive
Time for the One True Health Check™ to retire from duty.
Part of rabbitmq/rabbitmq-cli#426
2020-06-05 00:51:40 +03:00
Michael Klishin
11b98ee091
Improve reporting of 'ctl change_password' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 05:56:48 +03:00
Michael Klishin
b279fffc1f
Improve reporting of 'ctl set_user_tags' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 05:51:09 +03:00
Michael Klishin
42f5a9031f
Improve reporting of 'ctl delete_user' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 05:44:33 +03:00
Michael Klishin
e4ed83ef04
Improve reporting of 'ctl add_user' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 05:36:51 +03:00
Michael Klishin
37b439e894
Improve reporting of 'ctl clear_topic_permissions' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 04:56:08 +03:00
Michael Klishin
92bb8dee18
Cosmetics
2020-06-04 04:42:49 +03:00
Michael Klishin
0629da37ad
Improve reporting of 'ctl clear_permissions' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 04:36:50 +03:00
Michael Klishin
e12df13d66
Improve reporting of 'ctl set_topic_permissions' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 04:11:05 +03:00
Michael Klishin
d51de26561
Improve reporting of 'ctl set_permissions' failures
...
Part of rabbitmq/rabbitmq-server#2363
2020-06-04 03:51:36 +03:00
Michael Klishin
2569017b26
List Raft data directory in status
...
Part of rabbitmq/rabbitmq-server#2354
2020-05-30 19:37:46 +03:00
Michael Klishin
2bd6c95375
Rely on rabbit_env to infer node name
...
During the 3.8.4 cycle we have backported `rabbit_env` to v3.8.x.
Instead of messing with env variable prefixing, it tries both
RABBITMQ_{VAR} and {VAR} environment variables. However,
in CLI tools node name currently only picks up RABBITMQ_NODENAME,
so environments where node name has to be explicitly configured
via rabbitmq-env.conf:
NODENAME=rabbit@our.custom.hostname
would not pick this node name up. RABBITMQ_NODENAME had to be added
as a workaround.
With this change the behavior of CLI tools and the server is closer.
Note that this updates a few places which used `Config.get_option/2`
to get a "default node name" which more often than not ended up
being a node prefix ("rabbit"). Those tests had to be updated
to use `Config.default/1`.
Closes #421 .
References c8e766dec7
, 8a5ab87038
.
2020-05-28 02:54:33 +03:00
Michael Klishin
61a927ffb6
Brush up encode and decode commands
2020-05-21 09:37:08 +03:00
Michael Klishin
bc95259d29
Adapt one more test
2020-05-21 08:13:46 +03:00
Luke Bakken
a4669adf94
Update for version 2 of credentials-obfuscation
...
Part of rabbitmq/credentials-obfuscation#5
2020-05-20 18:54:40 -07:00
Michael Klishin
56da1bb71e
Update test assertion expectations
2020-05-19 06:59:03 +03:00
Michael Klishin
3ba529f9e6
Default timeouts must be in milliseconds
2020-05-19 06:57:29 +03:00
Michael Klishin
4784cc0a34
Correct a typo in function name
2020-05-19 06:57:14 +03:00
Michael Klishin
0ff2e3fb77
Explain
2020-05-16 19:12:31 +03:00
Michael Klishin
a2ec22023f
Handle variable case in this test
2020-05-16 00:39:07 +03:00
Michael Klishin
0537a9ca36
Don't depend on a single env variable in this test
2020-05-16 00:36:33 +03:00
Michael Klishin
907c4a9fd7
Include 'rabbitmq-diagnostics os_env' output into 'rabbitmq-diagnostics report'
2020-05-07 16:42:23 +03:00
Michael Klishin
57727fcc49
Wording
2020-05-07 16:41:45 +03:00
Michael Klishin
947940ccd5
Introduce 'rabbitmq-diagnostics os_env'
...
It prints RabbitMQ-specific environment variables that
are set on the target node. Can be used to inspect env variable-based
configuration without access to the target host.
2020-05-06 23:19:04 +03:00
Gerhard Lazu
f787f96155
Dispatch webhook to rabbit/rabbitmq-server via workflow
...
Fail unsuccessful HTTP requests, go silent
This will be used to trigger rabbitmq-server tests, because there is a
new commit in a rabbitmq-cli release branch.
cc @dumbbell
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-05-01 12:50:31 +01:00
Jean-Sébastien Pédron
8075029537
cluster_status_command: Show product name & version if any
...
If the product name or version were overridden in a RabbitMQ node, we
will use this information in that node's line.
2020-04-24 15:37:59 +02:00
Jean-Sébastien Pédron
6ef926e0d5
status_command: Don't display product info if they are unset
...
Before this commit, if the product name & version were not overridden,
they would default to the base product name & version ("RabbitMQ" + its
version).
Now, if they are not set/overridden, their corresponding lines are not
added to the output of `status`. Therefore, `rabbitmqctl status` on a
regular RabbitMQ will output the same thing as before.
2020-04-24 14:47:14 +02:00
Michael Klishin
4b986d971c
Reintroduce DefaultOutput.output/1
...
CLI commands in some plugins depend on it.
2020-04-22 17:00:22 +03:00
Gerhard Lazu
383c3cf478
Do not run tests in parallel, default MAX_CASES to 1
...
@michaelklishin:
> Some test cases cannot be run in parallel since they rely on target
> node state as a shared resource.
If/when we want to improve this:
@michaelklishin:
> What we can do is make this configurable. Some tests can run in
> parallel, e.g. all rabbitmq-diagnostics tests that do not trigger/report
> alarms. But this only would be useful for interactive runs or if we
> split all tests into groups and allow parallel runs for some groups.
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-04-22 15:51:48 +02:00
Gerhard Lazu
cc4861d768
Default mix text cases to number of CPUs
...
This changes the mix test default which is 2 x number of CPUs.
We only append --trace if VERBOSE_TEST is true (enabled by default) and
don't change the number of max-cases. I'm not sure why we coupled the
number of max cases to verbose testing, they don't seem related to me.
Since @dfedotov is no longer with us, I can't ask him, so just making
the change which feels right.
This is in response to GitHub Actions failing consistently with:
== Compilation error in file test/ctl/list_connections_command_test.exs ==
** (exit) exited in: :gen_server.call(#PID<32153.2990.0>, {:read_cache, -576460752303386991}, :infinity)
** (EXIT) no connection to rabbit_ctl_36@fv-az56
##[error] (stdlib 3.8) gen_server.erl:223: :gen_server.call/3
##[error] (stdlib 3.8) erl_eval.erl:680: :erl_eval.do_apply/6
##[error] (stdlib 3.8) erl_eval.erl:888: :erl_eval.expr_list/6
##[error] (stdlib 3.8) erl_eval.erl:411: :erl_eval.expr/5
##[error] (elixir 1.10.2) lib/kernel/parallel_compiler.ex:396: Kernel.ParallelCompiler.require_file/2
##[error] (elixir 1.10.2) lib/kernel/parallel_compiler.ex:306: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
##[error]Makefile:114: recipe for target 'tests' failed
Our assumption is that limiting the number of test parallelism will make
these failures go away.
cc @michaelklishin @dumbbell
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-04-22 15:51:45 +02:00
Michael Klishin
e0d1406a81
Merge pull request #409 from rabbitmq/rabbitmq-cli-408
...
Introduce a few new rabbitmq-upgrade commands
2020-04-22 04:26:45 +03:00
Michael Klishin
ab1c80062d
Introduce 'rabbitmq-upgrade await_online_synchronized_mirror'
...
Similar in purpose to await_online_quorum_plus_one but
for classic mirrored queues.
Part of rabbitmq/rabbitmq-cli#408
2020-04-22 03:12:32 +03:00
Michael Klishin
da5fb5c07b
Rename a command file to follow the standard convention
2020-04-22 01:36:43 +03:00
Michael Klishin
d99cdd04f5
Introduce rabbitmq-upgrade await_online_quorum_plus_one
...
The readiness is similar to that of 'rabbitmq-diagnostics check_if_node_is_quorum_critical'
but this command awaits for it up to --timeout seconds.
While at it, refactor DefautOutput to detect and support JSON formatting
of most basic return values suc has :ok or {:error, map}.
Part of #408 .
2020-04-22 01:25:55 +03:00
Michael Klishin
d54876be57
Drive by change: correct a typo
2020-04-22 01:23:50 +03:00
Michael Klishin
e1b6a1b07d
Drive by change: help command should be available in all scopes
...
Currently 'rabbitmq-upgrade --help' works as expected
but 'rabbitmq-upgrade help' exists with the same message
but an error exit code.
2020-04-22 01:23:32 +03:00
Michael Klishin
09a9864786
Feature Flags and QQ guides are now available on rabbitmq.com
2020-04-21 23:40:10 +03:00
Jean-Sébastien Pédron
7df1d4312b
Update erlang.mk
2020-04-21 16:18:05 +02:00
Philip Kuryloski
075df6bbda
Handle RpcStream.receive_list_items_with_fun/6 with a timeout of 0 precisely
...
Corrects the race condition caused by a 0 timeout by never dispatching the work associated with the stream.
2020-04-17 11:33:00 +02:00
Michael Klishin
b6d1de740c
Output a more realistic example in this message
2020-03-25 00:22:24 +03:00
Michael Klishin
a3d60d35c5
Be less generous in empty whitespace use in setup_all functions
2020-03-24 19:08:00 +03:00
Michael Klishin
2536d15e0d
Update CONTRIBUTING.md
2020-03-24 18:35:44 +03:00
Michael Klishin
58b404650a
WaitCommandTest: make sure distribution is started before used
2020-03-24 17:49:42 +03:00
Michael Klishin
2f5a182a68
TestHelper.await_rabbitmq_startup/0: introduce retries
2020-03-24 17:49:22 +03:00
Jean-Sébastien Pédron
0e15591bf5
Update copyright (year 2020)
2020-03-10 15:39:56 +01:00
Gerhard Lazu
deae237704
Update rabbitmq-components.mk
2020-03-06 09:19:14 +00:00
Gerhard Lazu
1b7b1bf12d
Update erlang.mk
2020-03-06 09:17:27 +00:00
Jean-Sébastien Pédron
d02ae015b6
Travis CI: Add configuration
...
Compared to the regular configuration we use, it modifies it heavily to:
* start a background RabbitMQ node with the federation and STOMP plugins
enabled
* run the specific test target of the CLI
* test against the oldest and latest versions of Elixir
2020-03-06 08:22:31 +01:00
Jean-Sébastien Pédron
4e6e87b9fc
Update mock_rabbitmq_plugin_for_3_8 to support RabbitMQ 3.9.x
2020-03-06 08:19:31 +01:00
Jean-Sébastien Pédron
e3c64718ef
mix.exs: Bump Elixir requirement from 1.7 to 1.8
...
We started to use `File.exists?/2` which was added to 1.8.0.
2020-03-06 08:19:31 +01:00
Jean-Sébastien Pédron
32625b19be
mix.exs: Bump `csv` to version 2.3.x
...
This fixes several compilation warnings and looks like to fix the CLI
with the upcoming Erlang 23.0.
2020-03-05 16:20:54 +01:00
Jean-Sébastien Pédron
16391c4625
Makefile: Move $ERLANG_MK_* variables before `-include erlang.mk`
...
Otherwise, they are ineffective.
2020-03-03 18:28:12 +01:00
Jean-Sébastien Pédron
72cbed4876
wait_command.ex: Change `wait` internal sleep to one second
...
... down from 10% of the configured timeout.
This has a significant impact on the time it takes to start RabbitMQ in
all our testsuites. rabbitmq-ct-helpers sets a wait timeout of 180
seconds. Thus before this patch, the wait loop would sleep for 18
seconds between each check. Given it takes about 1.5 seconds to start
RabbitMQ, a lot of time is wasted here.
Here are some numbers after running testsuites with and without this
patch:
* `make ct-fast` in rabbitmq-server: 8m15s down to 4m58s
* `make ct` in rabbitmq-mqtt: 9m23s down to 6m43s
* `make ct` in rabbitmq-stomp: 4m31s down to 2m04s
[#171535484 ]
2020-02-28 09:36:11 +01:00
Jean-Sébastien Pédron
349435e2e2
status_command: Show product info
...
They are printed in addition to the underlying RabbitMQ version.
If it is unavailable, for instance because the node is old enough to
not export the product info, we use "RabbitMQ" as the name and the
underlying RabbitMQ version as the version.
[#171467799 ]
2020-02-25 16:45:36 +01:00
Gerhard Lazu
2d54b2ea64
Update rabbitmq-components.mk
2020-02-11 15:31:42 +00:00
Hanjun Kim
2574d4d610
fix typo
2020-02-05 20:11:49 +09:00
Michael Klishin
69c6bc7f22
Bump upper supported Elixir version bound to 1.10
2020-01-28 21:04:14 +03:00
Michael Klishin
2c66121f34
Expose two rabbitmq-queues health checks to rabbitmq-diagnostics
2020-01-22 20:52:24 +03:00
Michael Klishin
58b1d8c6a0
rabbitmq-queues quorum_status: move to Observability section in help
...
While at it, do not expose this command via rabbitmqctl as
it wasn't intentional.
2020-01-22 20:25:17 +03:00
Michael Klishin
8bdced9972
Accept integer watermark values as well
...
They value would be an integer when the watermark is set
as absolute.
Closes #395
2020-01-18 03:51:59 +03:00
Michael Klishin
5b7063d07d
More sensible JSON formatting for some commands
...
Fall back to a JSON document if command returns a bitstring
(does not do any preformatting for JSON).
Per discussion with @lukebakken
Closes #394 .
2020-01-18 02:06:04 +03:00
Jean-Sébastien Pédron
cccf81d0ff
test/fixtures: Fix mock plugins' dependencies
...
They should depend on `rabbit`, not on `rabbit_common`.
This will be even required #rabbitmq/rabbitmq-server#2212 is accepted.
2020-01-16 14:39:47 +01:00
Michael Klishin
73776fbf04
(c) bump
2019-12-29 05:50:26 +03:00
Luke Bakken
be003a979d
Rename to this commands name
2019-12-19 09:45:10 -08:00
Michael Klishin
7158eec954
Introduce rabbitmq-queues check_if_node_is_mirror_sync_critical
...
Part two of #389 .
2019-12-19 03:59:30 +03:00
Jean-Sébastien Pédron
e64aea80a7
stop_command.ex: Read PID file before stopping the node
...
Now that the node removes its PID file on exit, we need to read it
before stopping the node.
Otherwise, if the PID file was already removed when
`OsPid.read_pid_from_file()` is called, it will wait for the PID file to
appear again in an infinite loop.
This was found when testing the RHEL 6 package on CentOS 6 in CI.
2019-12-13 11:59:49 +01:00
Michael Klishin
b5c47be4e6
Tests for the CLI part of rabbitmq-queues check_if_node_is_quorum_critical
...
Key tests for the target function are in the server repo.
2019-12-12 17:11:52 +03:00
Michael Klishin
c49eb2fafc
A typo
2019-12-12 16:55:59 +03:00
Michael Klishin
71212de9ee
Introduce `rabbitmq-queues check_if_node_is_quorum_critical'
...
Mob: @kjnilsson and several other Pivots.
Part of #389 .
2019-12-12 15:58:06 +03:00
Jean-Sébastien Pédron
33d436266e
Update rabbitmq-components.mk
2019-12-12 13:14:52 +01:00
Jean-Sébastien Pédron
8a5ab87038
Load `rabbit_env` context to know about node configuration
...
The context is either initialized from the CLI's process environment or
from the remote node's own context.
This is required to e.g. find plugins or Mnesia directory.
In `code_path`, we don't append `ebin` anymore to the code path because
the `rabbit` application is now packaged as an .ez archive like plugins.
This simplifies the overall layout of the project.
2019-12-11 15:08:00 +01:00
Michael Klishin
01e950fd18
Make tests that mess with node or quorum state sequential
...
As most tests already are. It's highly unlikely that these
were meant to execute in parallel by design.
2019-12-11 14:51:10 +01:00
Michael Klishin
8b7c83bf6e
Rename a test file
2019-12-11 04:56:04 +03:00
Jean-Sébastien Pédron
332c893dee
mix.exs: Explicitly list `goldrush` and `lager` as dependencies
...
They are not dependencies of the CLI, but dependencies of rabbit_common.
Unfortunately, mix(1) doesn't embed them in the final escripts. In fact,
it doesn't embed any dependencies of rabbit_common, but the CLI probably
doesn't call the code which would trigger a crash.
2019-12-05 15:20:04 +01:00
Jean-Sébastien Pédron
03caf7392f
Makefile: Don't remove/recreate files if source and target are equal
...
... when installing the escripts.
2019-12-05 15:20:04 +01:00
Jean-Sébastien Pédron
ebbaf5b71c
`wait` command: Wait for the system process to appear
...
Before this patch, the command would wait for the PID file to appear,
then it would read the PID, check if that process exists and terminates
with `no_process_running` if it wasn't.
This was a problem if the PID file was still there with stale data. The
`wait` command would fail even though another node is starting but
hasn't had a chance to write its PID yet.
Now, the command will read the PID, verify the system process and try to
ping the Erlang node in a loop with the specified timeout. This helps
if a node is restarted but the new PID is not yet written to the file.
Note that it's a slight change in behavior w.r.t crashed nodes though:
if a node crashes (or already crashed), the command will wait until
timeout. Before the command would have exited almost immediately.
2019-12-05 15:20:00 +01:00
Michael Klishin
650ff2775a
Drive-by change: return a check failure error
2019-12-04 09:37:28 +03:00
Michael Klishin
9101490cfe
Drive-by chane in check_local_arlarms: return an error here
2019-12-04 09:27:26 +03:00
Michael Klishin
98d7e3c566
Rename two command files to follow our convention
2019-12-04 08:38:04 +03:00
Michael Klishin
dd38015d38
Squash a compiler warning
2019-11-29 02:33:40 +03:00
Luke Bakken
1c3de98493
Ensure stack trace is always printed for certain errors
...
Errors like :badarg, :function_clause, etc indicate a serious error. It would be handy for users to immediately get the stack trace to tell us.
2019-11-18 17:39:29 -08:00
Luke Bakken
4fb9bab458
Handle case where import file does not exist or is zero-sized.
...
Fixup printing the real stacktrace when --print-stacktrace is used
2019-11-18 14:39:50 -08:00
Luke Bakken
75fa655c02
Add newline
2019-11-18 13:49:59 -08:00
Michael Klishin
b49b639add
ctl export_definitions: fail validation w/o positional args
2019-11-19 00:41:30 +03:00
Michael Klishin
7c5933052e
Finish ctl import_definitions
2019-11-16 06:46:26 +03:00
Michael Klishin
19a7305306
DefaultOutput: propagate {:error, exit_code, message} tuples
2019-11-16 05:19:18 +03:00
Michael Klishin
fa0db7ad22
Initial version of rabbitmqctl import_definitions
2019-11-16 05:18:52 +03:00
Michael Klishin
27212997c2
A typo
2019-11-15 03:54:01 +03:00
Michael Klishin
0927cdf24d
Cosmetics
2019-11-15 03:53:13 +03:00
Michael Klishin
c73d04c216
This invariant is impossible here
2019-11-15 03:05:46 +03:00
Michael Klishin
7c0718800f
Introduce rabbitmqctl export_definitions [path]
2019-11-15 02:20:02 +03:00
Michael Klishin
53d85f4945
New command group section: definitions
2019-11-14 21:36:24 +03:00
Michael Klishin
c85530dbf2
Cosmetics
2019-11-14 21:35:22 +03:00
Michael Klishin
ceb3aff309
hipe_compile: deprecate
...
References rabbitmq/rabbitmq-website#884 .
2019-11-01 02:50:38 +03:00
Michael Klishin
68c1211cba
Whitespace
2019-10-23 15:59:31 +03:00
Gabriele Santomaggio
56ef537eb0
Add support for IPv6
...
Add the inet6 family test. When RabbitMQ is listening in ipv6 the test
fail. This commit tests both ipv4 and ipv6.
2019-10-23 11:50:28 +02:00
Luke Bakken
cdbaee05ac
Add erlang formatter function heads
...
Fixes #383
2019-10-21 17:49:08 -07:00
Arnaud Cogoluègnes
c004ff4607
Improve unit label in check_certificate_expiration
...
This avoids output like "within 1 years".
And fix a typo.
References #304 , #305
2019-10-09 10:16:43 +02:00
Michael Klishin
b4de0cd321
Wording
2019-10-08 09:56:37 -05:00
Michael Klishin
593082e18d
diagnostics check_certificate_expiration: wording, new default
...
Four weeks is when many CAs and operators send
out warnings. One day is too short a notice.
2019-10-08 09:42:30 -05:00
Michael Klishin
99e9b0b2b6
Simplify these assertions a bit
2019-10-08 09:41:31 -05:00
Michael Klishin
7b1bf6c734
Squash a warning
2019-10-08 09:41:17 -05:00
Arnaud Cogoluègnes
f0bba26e8c
Add test for certificate expiration verification
...
References #304 , #305
2019-10-08 16:10:04 +02:00
Arnaud Cogoluègnes
260e797ee6
Remove unused variable
...
References #304 , #305
2019-10-08 14:26:20 +02:00
Arnaud Cogoluègnes
bede583bc6
Add flag usage in check_certificate_expiration
2019-10-08 13:41:03 +02:00
dcorbacho
fe2bd8d95e
Check certificates command
...
[#163597674 ]
2019-10-07 16:48:49 +01:00
dcorbacho
4f5706c174
Certificates command
...
[#163597674 ]
2019-10-01 10:59:26 +01:00
Michael Klishin
c7e60774d0
Minor Prometheus listener description edits
2019-09-26 13:05:32 +03:00
Michael Klishin
254fe20453
Move quorum_status to rabbitmq-queues, add basic tests
2019-09-26 08:16:33 +03:00
Michael Klishin
801b52ac28
rabbitmq-queues [add, remove]: doc wording
2019-09-26 07:42:20 +03:00
Michael Klishin
a14cf63a0e
Expand rabbitmq-queues shrink argument docs
2019-09-26 07:17:10 +03:00
Michael Klishin
2fff042f8d
Expand rabbitmq-queues grow argument docs
2019-09-26 06:39:04 +03:00
Michael Klishin
a9881c5037
Add missing usage arguments for rabbitmq-queues rebalance
2019-09-25 19:52:19 +03:00
Arnaud Cogoluègnes
67a38fc2e9
Handle empty output in JSON stream
...
Some streaming commands with a duration argument can send the empty
string as the output (along with a finishing marker). This case was not
handled properly and would result in a stack trace when the command
returned once the duration has elapsed.
2019-09-25 16:56:47 +02:00
Jean-Sébastien Pédron
0cb95e7b55
log_tail_stream_command_test: Bump stream duration to 15 seconds
...
... from 5 seconds. Hopefully this will increase the chance of seeing
the messages logged by the testcase.
2019-09-24 11:48:47 +02:00
Michael Klishin
d5ba3e32de
Correct command_line_arguments delegation in report
2019-09-24 02:10:28 +03:00
Michael Klishin
5a137480b3
Merge pull request #378 from rabbitmq/consume-events-command
...
Consume event command
2019-09-24 01:55:57 +03:00
Michael Klishin
99f1790ac3
Update test expectations
2019-09-24 01:52:31 +03:00
Michael Klishin
2763ed823d
diagnostics consume_event_stream: --quiet by default
...
We produce a stream of JSON objects which is meant
to be piped to jq or similar.
2019-09-24 01:49:27 +03:00
Michael Klishin
2360057712
Wording
2019-09-24 00:56:58 +03:00
Michael Klishin
4c33ce0961
Move command_line_arguments to rabbitmq-diagnostics
2019-09-24 00:54:11 +03:00
dcorbacho
b5e5d0a274
Command line arguments command
...
* Reports the command line flags returned by `init:get_arguments()`
[#159699409 ]
2019-09-23 20:07:33 +01:00
dcorbacho
15d7eb2858
Diagnostics: test consume_event_stream_command
...
[#168224266 ]
2019-09-23 17:19:07 +01:00
Michael Klishin
6193023a18
Merge pull request #375 from rabbitmq/post-upgrade-command
...
Post upgrade command
2019-09-22 08:32:30 +03:00
Michael Klishin
ccc7ebbafc
rabbitmq-upgrade: basic tests for post_upgrade, polishing
2019-09-22 08:31:20 +03:00
Michael Klishin
06aa0afb06
diagnostics: consume_events_stream => consume_event_stream
...
Pair: @dcorbacho.
2019-09-20 20:01:27 +03:00
Michael Klishin
eb6825ebbf
Introduce a formatter for infinite streams of JSON objects
...
The input can be fed to 'jq'. There can be no JSON array
boundaries as the stream potentially never finishes.
Pairs: @dcorbacho @gerhard.
2019-09-20 19:59:32 +03:00
Luke Bakken
0ad420d293
Merge pull request #377 from Whitespirit0/patch-1
...
Fix set_parameter command output
2019-09-20 08:57:04 -07:00
Luke Bakken
526ddfed9c
Restore rabbitmq-cli specific test directions
2019-09-20 08:41:29 -07:00
dcorbacho
9d7a873c97
Consume events stream command
...
[#168224266 ]
2019-09-20 13:52:51 +01:00
Whitespirit0
ea2ace438c
Update set_parameter test to match new output
2019-09-20 11:41:33 +02:00
Whitespirit0
f26b755a8d
Fix set_parameter command output
...
Invert parameter name and component name in output.
2019-09-20 11:38:59 +02:00
dcorbacho
dc29e5546c
Post upgrade command
...
[#166480167 ]
2019-09-18 11:37:18 +01:00
dcorbacho
8c77ba5078
Use pretty table formatter
...
[#166480197 ]
2019-09-16 11:18:42 +01:00
Karl Nilsson
2b430c0763
Merge pull request #373 from rabbitmq/rebalance-quorum-queue
...
Rebalance quorum queues command
2019-09-13 15:55:51 +01:00
kjnilsson
6534b029ec
Update rabbitmq-components.mk
2019-09-13 10:24:16 +01:00
Diana Corbacho
5ebbd46989
Rebalance command
...
[#166551605 ]
2019-09-12 11:21:33 +01:00
kjnilsson
139975667b
Update rabbitmq-components.mk
2019-09-04 10:30:54 +01:00
Jean-Sébastien Pédron
ed9de9d591
rabbitmqctl.ex: Don't call System.stacktrace()
...
... now we depend on Elixir 1.7+. We can use the new syntax or, in this
case, simply call `Exception.format_stacktrace()` without any argument:
it will take care of querying the stacktrace.
This fixes a warning reported by elixirc.
2019-09-03 15:19:56 +02:00
Michael Klishin
32030ed581
Merge pull request #371 from rabbitmq/vhost-description
...
Use new 'description' and 'tag' items on list vhosts
2019-08-30 13:09:02 +03:00
Jean-Sébastien Pédron
a716fb4bfe
Update erlang.mk
2019-08-29 20:44:56 +02:00
Michael Klishin
8bd68a34f1
Typos
2019-08-29 02:03:12 +03:00
Michael Klishin
4e536ff45b
rabbitmqctl add_vhost: parse tags
...
Per review feedback in rabbitmq/rabbitmq-server#2080 .
2019-08-28 09:58:29 +03:00
Michael Klishin
74b271ae4d
Merge branch 'master' into vhost-description
2019-08-27 16:28:29 +03:00
Luke Bakken
317610499b
Add GitHub issue templates
2019-08-26 18:59:50 -07:00
Michael Klishin
4505b9a85f
ctl add_vhost: suggest a comma-separated list of tags
...
For consistency with user tags.
2019-08-15 15:52:09 +10:00
Michael Klishin
2c6f5a1146
ctl add_vhost: make it possible to provide a description
2019-08-15 15:42:06 +10:00
Diana Corbacho
5e04dd41ab
Use new 'description' and 'tag' items on list vhosts
...
[#166298298 ]
2019-08-13 16:06:53 +01:00
Michael Klishin
5b1086156e
diagnostics log_tail_stream: remove a fragile test
...
It makes a lot of assumptions about Lager's log flush
timing and can be tripped by the peak rate protection
mechanism. This test module has a high rate of false
positives on Concourse.
There is another test that asserts over a "folded" stream, so
code coverage is kept about the same.
2019-08-11 13:20:19 +10:00
Michael Klishin
f4be415e3b
Update rabbitmq-components.mk
2019-08-11 01:47:50 +10:00
Jean-Sébastien Pédron
082f4e9189
Update erlang.mk
2019-08-02 09:53:39 +02:00
Michael Klishin
890b7c689d
Update rabbitmq-components.mk
2019-08-01 17:13:11 +03:00
Diana Corbacho
8f5dba4963
List Prometheus port
...
[#166929073 ]
2019-08-01 11:45:56 +01:00
Gerhard Lazu
499f0db121
Merge pull request #369 from rabbitmq/rabbitmq-cli-367
...
diagnostics status: require rabbit app to be running on target node
2019-07-18 17:22:42 +01:00
Michael Klishin
83b92cac0b
diagnostics status: require rabbit app to be running on target node
...
Closes #367 .
2019-07-18 18:51:25 +03:00
Michael Klishin
d84340959b
Make sure the app is started in these tests
2019-07-18 18:50:43 +03:00
Gerhard Lazu
57fce6108c
Do not require rabbit app for rabbitmq-diagnostics observer
...
It works perfectly fine without it. We are more likely to want to look
into the Erlang VM if the rabbit app is not running.
2019-07-18 16:50:36 +01:00
Michael Klishin
37450cc0dc
Drop --[no-]interactive support
...
Per discussion with @lukebakken.
It serves no purpose and to make scripting with stream
redirection work we had to make validation changes that make
that flag irrelevant and even confusing.
The only downside of this behavior is that something like
rabbitmqctl add_user --silent "a-username"
(without a password or redirected stream, with suppressed output)
would "hang" waiting for stdin input. If --silent is omitted
there would be an input prompt, making it clearer what's going on.
Closes #365 with a different behavior from the originally suggested.
2019-07-10 19:08:19 -07:00
Michael Klishin
b890fe787b
Ditto for ctl change_password
...
Part of #365 .
2019-07-11 00:21:11 +03:00
Michael Klishin
865af70a98
ctl add_user: make password optional, accept it via stdin
...
Part of #365 .
2019-07-10 23:27:29 +03:00
Michael Klishin
358aec5840
ctl authenticate_user: make password optional, accept it via stdin
...
Part of #365 .
2019-07-10 02:17:12 +03:00
Michael Klishin
43209567c2
Address an Elixir 1.9 warning
2019-07-10 00:54:05 +03:00
Arnaud Cogoluègnes
39baf2d80a
Update rabbitmq-components.mk
2019-07-09 16:05:52 +02:00
Eugene Pirogov
aa35ebb34d
Fix typo in description for "stop" command
2019-07-08 17:53:37 +03:00
Michael Klishin
816bfbc50b
Cosmetics
...
(cherry picked from commit 5e1c0841d78c8644eaea3b22837df40fd2ea1a24)
Conflicts:
lib/rabbitmq/cli/formatters/pretty_table.ex
2019-07-08 16:18:52 +03:00
Michael Klishin
5589496678
Squash a few more compiler warnings
2019-07-08 15:55:37 +03:00
Michael Klishin
82f413c926
Require Elixir 1.7
...
We'd go to 1.8 if some CI environments did not use
OTP 19.3 which requires OTP 20.
2019-07-08 15:39:45 +03:00
Michael Klishin
b8acce6a85
Squash a compile warning
...
(cherry picked from commit 2a8fd5c1b2eae73f936991b17dfaa6fbd0fdbf85)
2019-07-08 03:23:55 +03:00
Michael Klishin
462b480f16
Same as d3c01b3a1f1a65d1d935c3e6e0441388da44ba57 in more places
...
(cherry picked from commit 68c8d204c08eb9956925e0fb71608a0737f3e771)
2019-07-06 20:31:43 +03:00
Michael Klishin
535f00e08f
Let Lager's log message rate lapse before logging in these tests
...
Otherwise some log messages we assert on might be dropped.
(cherry picked from commit d3c01b3a1f1a65d1d935c3e6e0441388da44ba57)
2019-07-06 18:47:11 +03:00
Michael Klishin
1f07517c96
Wording
2019-07-06 18:08:05 +03:00
Michael Klishin
4f179948ad
Cosmetics
2019-07-06 18:07:28 +03:00
Michael Klishin
955f77e902
diagnostics log_location: support JSON formatter
2019-07-06 18:07:01 +03:00
Michael Klishin
fe1e95a28c
Wording
2019-07-06 17:59:49 +03:00
Michael Klishin
7de3958482
Await log update in this test
2019-07-06 17:57:54 +03:00
Michael Klishin
ff051eec63
Test expectation update
2019-07-06 17:39:49 +03:00
Michael Klishin
e50489eba7
Display 50 lines by default; cosmetics
2019-07-06 13:47:39 +03:00
Michael Klishin
435670c083
Update test expectations
2019-07-04 18:57:40 +02:00
Michael Klishin
7375e8b576
Wording
2019-07-04 11:48:56 +02:00
Michael Klishin
715cfd6efe
Merge branch 'master' into rabbitmq_cli_log_commands
2019-07-04 11:06:14 +02:00
Michael Klishin
641fae4a96
Revert "rabbitmq-queues add-member: increase default timeout to 15s"
...
This reverts commit 0a68e5944a
.
More QQ operations have default timeout of 5s. This has to be addressed
in a more fundamental way (or not at all unless we have evidence of
false positives).
2019-07-03 23:28:28 +02:00
Michael Klishin
0a68e5944a
rabbitmq-queues add-member: increase default timeout to 15s
...
We've tried 5s values before and always bumped
them later because of false positives.
2019-07-03 23:26:56 +02:00
Diana Corbacho
bb4e40df86
Provide timeout to add_member command
...
[#166670827 ]
2019-07-03 13:07:57 +01:00
Michael Klishin
bd624ccbdd
Merge branch 'master' into rabbitmq_cli_log_commands
2019-07-02 01:43:42 +02:00
Jean-Sébastien Pédron
3dcb593710
Update rabbitmq-components.mk
2019-06-28 16:05:27 +02:00
Jean-Sébastien Pédron
936468d468
Update erlang.mk
2019-06-28 16:01:49 +02:00
Daniil Fedotov
78cc33420e
Log commands tests
2019-06-27 13:46:08 -04:00
Daniil Fedotov
27cd558ac9
Log streaming duration limit.
2019-06-27 13:45:28 -04:00
Daniil Fedotov
0496b7643f
Fix switches and help section for log commands
2019-06-27 13:45:10 -04:00
Daniil Fedotov
915ee1f1c3
Command to stream new log entries from a remote node.
...
This command asks the remote server to create a file reader process
and receives the file data, which is transformed to Elixir stream.
The command uses std_io_raw formatter to write received data as is.
2019-06-26 17:34:48 -04:00
Daniil Fedotov
25b441ae53
Make it possible to specify a custom printer for commands. Add std_io_raw printer.
...
Log streaming should print data as received without adding new lines.
To do that std_io_printer just writes all output to the std_io.
2019-06-26 17:34:35 -04:00
Daniil Fedotov
ff0372200a
Command to print last N log messages from the default log.
2019-06-26 15:56:22 -04:00
Daniil Fedotov
536621ed1f
Command to get log file locations.
2019-06-26 13:26:29 -04:00
Daniil Fedotov
b42c7a62d5
Improve error stacktrace reporting.
2019-06-26 12:49:35 -04:00
Michael Klishin
2e14e090ad
Allow for Elixir 1.9
2019-06-25 08:41:01 +02:00
Michael Klishin
2549a9ffcf
Wording
2019-06-13 15:43:19 +03:00
Michael Klishin
0ab7e36893
These two annotations are not used
2019-06-13 15:40:49 +03:00
Diana Corbacho
f9bf3154a9
Command to log schema information
...
Logs by default name, cookie, active_replicas and user_properties
Any other mnesia property can be requested as info key
[#164550205 ]
2019-06-13 13:08:29 +01:00
Gerhard Lazu
a60fe2bde3
Update rabbitmq-components.mk
2019-06-03 02:23:33 +01:00
Michael Klishin
ea8ec535f2
Merge pull request #356 from rabbitmq/rabbitmq-cli-302
...
Health check command for virtual hosts
2019-05-29 14:29:53 +01:00
Michael Klishin
54898185c5
Update test assertions
2019-05-29 14:03:08 +01:00
Michael Klishin
37800cd83b
Allow check_failed errors provide additional context
...
Primarily for for --formatter=json use cases.
2019-05-29 13:59:59 +01:00
Michael Klishin
dde11237e4
Basic tests for Diagnostics.CheckVirtualHostsCommand
2019-05-29 13:58:29 +01:00
Michael Klishin
79e535ce4f
Diagnostics.CheckVirtualHosts should be Diagnostics.CheckVirtualHostsCommand
...
While at it, add JSON formatter handling to the
failed check case.
2019-05-29 13:58:16 +01:00
Michael Klishin
cdd92f9da4
check_alarms: correct result value in case of an error
2019-05-29 13:19:08 +01:00
Diana Corbacho
6fd83eff93
Health check command for virtual hosts
...
[#163451547 ]
2019-05-28 23:44:59 +01:00
Michael Klishin
6bd6b8d2de
Merge pull request #355 from rabbitmq/quorum-status
...
Switch to pretty table formatter
2019-05-23 16:38:19 +01:00
Daniil Fedotov
40194b7b8d
Replace Keyword.keyword? with proplist? checks.
...
Keyword requires keys to be atoms, while data returned from rabbitmq
may have binary or string keys.
2019-05-23 15:48:02 +01:00
kjnilsson
4877111edc
Switch to pretty table formatter
2019-05-23 14:55:55 +01:00
Jean-Sébastien Pédron
ec4bc7ce96
Update rabbitmq-components.mk
2019-05-17 15:17:15 +02:00
Jean-Sébastien Pédron
7b43d4d3e3
mix.exs: Take `observer_cli` from Hex.pm
...
... not Git.
The reason, explained in a new comment, is that our Makefiles know how
to put dependencies from Hex.pm in the RabbitMQ source archive, but not
dependencies fetched using other methods.
2019-05-17 14:42:00 +02:00
Michael Klishin
38b56c198e
Switch back to zhongwencool/observer_cli now that it is 1.5.0
2019-05-17 08:43:24 +03:00
Michael Klishin
0f06ca3d44
Update rabbitmq-components.mk
2019-05-17 08:36:28 +03:00
Jean-Sébastien Pédron
0ac8e646b8
mix.exs: Use `michaelklishin/observer_cli` fork
...
This fork depends on recon 2.5.0 which can be built with mix(1)
directly. This is a temporary change until there is a new release of
observer_cli with the updated version of recon.
2019-05-16 23:18:14 +02:00
Michael Klishin
fc374f01f8
Update rabbitmq-components.mk
2019-05-16 23:22:45 +03:00
Jean-Sébastien Pédron
2273974232
mix.exs: Ensure we pull observer_cli 1.4.5
...
This is the one which can be built with mix(1).
2019-05-15 07:47:13 +02:00
Jean-Sébastien Pédron
5b6b9a7a69
test: Increase some timeouts so the testsuite passes on slow VMs
2019-05-14 17:51:42 +02:00
Jean-Sébastien Pédron
eb994c07de
Merge pull request #352 from rabbitmq/endian_insensitive
...
WIP Make rabbitmqctl work with any endianness.
2019-05-14 17:49:46 +02:00
Michael Klishin
3090f35f75
Update rabbitmq-components.mk
2019-05-14 11:50:42 +03:00
Michael Klishin
5be3ea3c2e
mix.exs cosmetics
2019-05-13 17:46:04 +03:00
Michael Klishin
0c97154cd6
Merge branch 'master' into observer-cli
2019-05-13 16:48:45 +03:00
Michael Klishin
86063fca9f
Add a dependency on observer_cli, references #353
2019-05-13 16:48:26 +03:00
Michael Klishin
7e08d6ce3e
Update rabbitmq-components.mk
2019-05-13 16:40:27 +03:00
Gerhard Lazu
d82be9bc31
Reference observer_cli from GitHub, not hexpm
...
It fails to install properly, as described in
https://github.com/rabbitmq/rabbitmq-cli/pull/353#issuecomment-491501066
2019-05-13 10:45:05 +01:00
Michael Klishin
9be30e3e51
Handle observer_cli return value when user quits (again)
2019-05-11 11:10:36 +03:00
Michael Klishin
8ddd777c84
Re-enable a Diagnostics.ObserverCommand test
2019-05-11 11:07:53 +03:00
Michael Klishin
1e875d3abc
Bump observer_cli to 1.4.4
2019-05-11 10:56:24 +03:00
Michael Klishin
d15b59be43
Adapt to latest zhongwencool/observer_cli#54 API changes
2019-05-11 00:54:27 +03:00
Michael Klishin
e840b5a6a4
Basic tests for Diagnostics.ObserverCommand
2019-05-11 00:22:29 +03:00
Michael Klishin
5e66ae5d5b
Handle Observer CLI return value when user quits
2019-05-10 20:15:08 +03:00
Michael Klishin
aa3d9935be
Depend on observer_cli 1.4.3 from hex.pm
...
Kudos to @zhongwencool for releasing it so quickly.
2019-05-10 18:45:24 +03:00
Michael Klishin
be1d187041
rabbitmq-diagnostics: introduce a CLI observer command
...
Per recommendation from @gerhard.
2019-05-10 18:35:22 +03:00
Michael Klishin
1e2e45aeb7
Add a dependency on observer_cli
...
Currently patched to depend on latest Recon release.
2019-05-10 18:34:51 +03:00
Daniil Fedotov
992e6810d2
Recompile all regexes.
...
Compiled regexes are endianness-specific. To run on any endianness
systems we need to recompile them in runtime.
2019-05-07 11:29:40 -04:00
Jean-Sébastien Pédron
2c03dc56c2
test/ctl/*feature_flags*: Use arbitrary feature flags, not `quorum_queue`
...
This allows to backport the test to v3.7.x.
2019-05-06 15:37:40 +02:00
Jean-Sébastien Pédron
d4282525e0
Makefile: Mark `test` target as phony
...
There is a `test` subdirectory and it has nothing to do with the target.
Marking the target as phony ensures that the recipe will be executed,
no matter the date of that directory.
2019-05-06 15:36:35 +02:00
Jean-Sébastien Pédron
528ce15e79
mix.exs: Require at least stdout_formatter 0.2.3
...
It's exactly the same as 0.2.2, except that mix(1) is advertised as a build
tool. It should solve the issue where mix(1) wants to download rebar3(1)
even though it's already available.
2019-05-02 14:41:20 +02:00
Gerhard Lazu
c4d2772a63
Update rabbitmq-components.mk
2019-05-01 13:18:09 +01:00
Luke Bakken
60e7495918
Update rabbitmq-components.mk
2019-04-30 16:20:54 -07:00
Jean-Sébastien Pédron
f9dc056d20
Update rabbitmq-components.mk
2019-04-30 14:47:27 +02:00
Jean-Sébastien Pédron
a84853ae61
formatters/pretty_table: Adjust comment, we don't use `rabbit_pretty_stdout` anymore
2019-04-30 14:32:03 +02:00
Jean-Sébastien Pédron
d0e7d15dcf
formatters/pretty_table: Switch to use stdout_formatter library
...
... instead of the `rabbit_pretty_stdout` module.
2019-04-29 18:32:37 +02:00
Arnaud Cogoluègnes
c0c419385e
Use string instead of list of chars in clause
...
[#165316789 ]
References #342
2019-04-29 15:29:53 +02:00
Michael Klishin
a61357b7e4
Cosmetics
2019-04-29 00:57:55 +03:00
Michael Klishin
af32abbcd9
Merge pull request #351 from rabbitmq/rabbitmq-cli-345
...
Improve error reporting for invalid node names
2019-04-26 16:38:08 +03:00
Michael Klishin
8e7a02ff81
Naming
2019-04-25 20:13:39 +03:00
Michael Klishin
4cb2d05c9c
Improve error reporting of invalid node names
...
While at it, format errors thrown in a few more risky
code paths.
Closes #345 .
2019-04-25 17:15:25 +03:00
Gerhard Lazu
d556a1ecef
Clarify which Erlang/OTP version is being printed when --offline
...
re #350
2019-04-25 14:58:20 +01:00
Michael Klishin
27a4c3c2ab
Drive by change: squash a few compiler warnings
2019-04-25 16:52:25 +03:00
Daniil Fedotov
6b14b858b0
Change cipher_suites command description
...
cipher_suites returns default suites by default and needs a flag to return all
2019-04-25 09:49:42 -04:00
Michael Klishin
ab5143e7df
diagnostics erlang_version: support --offline
...
Closes #315 .
2019-04-25 15:01:18 +03:00
Michael Klishin
f754cb9c42
Cosmetics, wording
2019-04-25 14:42:20 +03:00
Michael Klishin
a5b2b261a6
Merge branch 'master' into rabbitmq-cli-346
2019-04-25 14:28:22 +03:00
Diana Corbacho
da22d12477
Include feature flag status in cluster status
...
rabbitmq-cli #346
2019-04-25 11:47:36 +01:00
Michael Klishin
3d5281508b
Merge pull request #347 from rabbitmq/rabbitmq-cli-342
...
Add a flag to cipher_suites command to get all ciphers. Add --format flag to select format. Remove openssl_format flag
2019-04-25 04:19:42 +03:00
Michael Klishin
50f4d42fac
Wording
2019-04-25 04:17:06 +03:00
Daniil Fedotov
a74f8b930e
Replace multiple format flags with a single `--format` flag.
2019-04-24 17:22:54 -04:00
Michael Klishin
1de179b454
Use a stricter amqp version dependency (1.2.x)
2019-04-24 22:55:18 +03:00
Daniil Fedotov
b53a16681a
Add more flags to cipher_suites command to return all available suites and more formats.
...
Support new map format for cipher suites added in OTP-20.3
Support --all flag to get all available ciphers
Addresses #342
Depends on changes in rabbitmq-server
2019-04-24 15:37:28 -04:00
Michael Klishin
d01b25574c
Upgrade to amqp ~> 1.2, start amqp app before connecting
2019-04-24 22:37:05 +03:00
Michael Klishin
3bdfae0392
Give queue proceess and client some time to boot before consuming in slower CI environments
2019-04-24 22:09:44 +03:00
Michael Klishin
4b5b8f9475
Depend on amqp ~> 1.1
2019-04-24 22:01:00 +03:00
Michael Klishin
6c8719bca2
Merge pull request #344 from rabbitmq/rabbitmq-cli-343
...
Feature flag commands: handle missing rabbit_ff_extra modules on target node
2019-04-23 13:24:32 +03:00
Gerhard Lazu
52135ba352
Update rabbitmq-components.mk
2019-04-22 21:55:01 +01:00
Michael Klishin
d926bc26b8
enable_feature_flag: handle cases where target node does not support the flag
...
or any flags.
[#163980302 ]
2019-04-20 02:44:22 +03:00
Michael Klishin
7efc4766d7
If target node does not support feature flag, consider that none are available
...
Per discussion with @dumbbell.
[#163980302 ]
2019-04-20 02:23:57 +03:00
Michael Klishin
a1de733dae
list_feature_flags: handle missing rabbit_ff_extra modules on target node
...
Part of #343 .
[#163980302 ]
2019-04-20 02:20:23 +03:00
Michael Klishin
d54408b768
Restore Elixir 1.6.6 compatibility
...
That's the version used when producing Debian
packages. Why? Because bintrary.com/rabbitmq-erlang
only provides that version :/
2019-04-19 06:23:28 +03:00
Michael Klishin
81b84244af
One more JSON formatting test case
2019-04-19 05:19:46 +03:00
Michael Klishin
95a7d37f1a
New integration suite: JSON formatter
2019-04-19 05:17:28 +03:00
Michael Klishin
11774a3ff1
cluster_status: list RabbitMQ and Erlang versions
...
Per suggestion from @gerhard.
2019-04-19 05:17:12 +03:00
Michael Klishin
e87e83cc93
Don't print stack trace if no option is provided explicitly
2019-04-19 04:43:58 +03:00
Michael Klishin
82948eb19c
Bump json to ~> 1.2
2019-04-19 04:43:25 +03:00
Michael Klishin
361d0e05d9
Squash a warning
2019-04-19 02:26:03 +03:00
Michael Klishin
16b8ffc75d
Extract Core.Version
2019-04-18 21:12:23 +04:00
Michael Klishin
5f79b2a446
Naming
2019-04-18 20:46:48 +04:00
Michael Klishin
7615b2067c
Print stack trace if command execution fails and --print-stacktrace was passed
...
Per discussion with @dumbbell.
2019-04-18 19:14:02 +04:00
Michael Klishin
11f0b45732
cluster_status: rework output format, support JSON formatter
...
[#165435068 ]
2019-04-18 04:00:05 +04:00
Michael Klishin
31be98b8ce
Extract Core.ANSI from status and help commands
2019-04-16 19:19:45 +04:00
Michael Klishin
977587a7e6
Remove a stray IO.inspect/1
2019-04-16 17:36:31 +04:00
Michael Klishin
7115676f1b
status: support absolute watermark values
...
While at it, improve watermark formatting.
2019-04-16 17:33:14 +04:00
Michael Klishin
1ba8d7ca7d
status: include RabbitMQ server information
2019-04-14 03:11:53 +04:00
Michael Klishin
3c16459e39
status: include node's data directory path
2019-04-14 03:02:16 +04:00
Michael Klishin
7c57a92586
status command: add --unit support for memory and disk space metrics
2019-04-14 01:55:40 +04:00
Michael Klishin
162ef63024
ctl status: add a section on totals
...
Per suggestion from @gerhard.
2019-04-13 01:14:31 +04:00
Michael Klishin
f2c32cdf41
status: add config file, log file and basic plugin information
2019-04-13 00:36:03 +04:00
Michael Klishin
59ec009819
MacOS => macOS
...
It's the official spelling starting with Sierra.
2019-04-13 00:14:23 +04:00
Michael Klishin
45a83ed65a
Naming
2019-04-12 14:01:56 +04:00
Michael Klishin
bef351ff1b
Format alarms as maps when formatter is JSON
2019-04-12 13:57:45 +04:00
Michael Klishin
69b5784410
Reset an unintionally lowered timeout in this test
2019-04-12 04:12:50 +04:00
Michael Klishin
2304ff5b0d
status: remove leading new line
2019-04-12 04:03:33 +04:00
Michael Klishin
e47a53c3c8
New status command: add file descriptors usage section
2019-04-12 03:56:56 +04:00
Michael Klishin
3fa31cacf2
New status command: add memory watermark and usage section
2019-04-12 03:45:46 +04:00
Michael Klishin
5aa19dbd08
Core.Memory.compute_relative_values/1: support map breakdowns
2019-04-12 03:44:52 +04:00
Michael Klishin
30148eab17
Move compute_relative_values/1 to Core.Memory
2019-04-12 03:22:37 +04:00
Michael Klishin
54436642cf
status: free disk space and listener sections
2019-04-12 02:59:15 +04:00
Michael Klishin
58ad4f4574
Core.Listeners.listener_map/1: assume that map inputs are preformatted
2019-04-12 02:58:07 +04:00
Michael Klishin
45b48f2f04
Merge branch 'master' into rabbitmq-cli-340
2019-04-12 02:30:39 +04:00
Michael Klishin
66d6cf1173
Update :badrpc test cases to be more resilient (part 2)
...
On some networks the response is a timeout, not a nodedown. That's
acceptable for this test.
2019-04-12 02:27:15 +04:00