Commit Graph

596 Commits

Author SHA1 Message Date
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 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 5553a24545 Sync license headers with MPL2 in master 2020-07-14 03:54:19 +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 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 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 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 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 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 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
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
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 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 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 61a927ffb6 Brush up encode and decode commands 2020-05-21 09:37:08 +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 3ba529f9e6 Default timeouts must be in milliseconds 2020-05-19 06:57:29 +03:00
Michael Klishin 907c4a9fd7 Include 'rabbitmq-diagnostics os_env' output into 'rabbitmq-diagnostics report' 2020-05-07 16:42:23 +03: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 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 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 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
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
Jean-Sébastien Pédron 0e15591bf5 Update copyright (year 2020) 2020-03-10 15:39:56 +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
Hanjun Kim 2574d4d610 fix typo 2020-02-05 20:11:49 +09:00
Michael Klishin 73776fbf04 (c) bump 2019-12-29 05:50:26 +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
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
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 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 ceb3aff309 hipe_compile: deprecate
References rabbitmq/rabbitmq-website#884.
2019-11-01 02:50:38 +03:00
Luke Bakken cdbaee05ac Add erlang formatter function heads
Fixes #383
2019-10-21 17:49:08 -07:00
Michael Klishin 254fe20453 Move quorum_status to rabbitmq-queues, add basic tests 2019-09-26 08:16:33 +03:00
Michael Klishin d5ba3e32de Correct command_line_arguments delegation in report 2019-09-24 02:10:28 +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
Whitespirit0 f26b755a8d Fix set_parameter command output
Invert parameter name and component name in output.
2019-09-20 11:38:59 +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 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 83b92cac0b diagnostics status: require rabbit app to be running on target node
Closes #367.
2019-07-18 18:51:25 +03: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
Eugene Pirogov aa35ebb34d Fix typo in description for "stop" command 2019-07-08 17:53:37 +03: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
kjnilsson 4877111edc Switch to pretty table formatter 2019-05-23 14:55:55 +01: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
Diana Corbacho da22d12477 Include feature flag status in cluster status
rabbitmq-cli #346
2019-04-25 11:47:36 +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 11774a3ff1 cluster_status: list RabbitMQ and Erlang versions
Per suggestion from @gerhard.
2019-04-19 05:17:12 +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 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 bef351ff1b Format alarms as maps when formatter is JSON 2019-04-12 13:57:45 +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 54436642cf status: free disk space and listener sections 2019-04-12 02:59:15 +04:00
Michael Klishin 9e7031d2b6 New status command output WIP 2019-04-11 22:11:00 +04:00
Michael Klishin 990e38a245 Extract Core.Memory from Core.Helpers
In preparation for #340.
2019-04-11 22:09:16 +04:00
Michael Klishin e4aecbaa5d status command: convert raw data to a machine-friendly map 2019-04-11 19:58:22 +04:00
Michael Klishin 24c53b3acf New ctl status output WIP 2019-04-11 15:31:50 +04:00
Michael Klishin 9cb776c98e Squash a warning 2019-04-10 15:22:38 +03:00
Michael Klishin d2549de22e Extract several modules from RabbitMQ.CLI.Core.Helpers
In preparation to changing status command output for 3.8
2019-04-10 13:31:38 +03:00
Michael Klishin f49b77c205 ping command: rely on Core.AcceptsDefaultSwitchesAndTimeout 2019-04-09 17:28:42 +04:00
Michael Klishin 801df8cf46 ping: cosmetics, declare --timeout in switches 2019-04-09 16:43:58 +04:00
Michael Klishin 46712a2a70 Cosmetics 2019-04-09 16:43:38 +04:00
Michael Klishin 61b504ca8e ctl delete_queue: help message improvements 2019-04-09 14:40:15 +04:00
Michael Klishin ab3d694d99 ctl delete_queue: fix a typo in alias definition
While at it, correct usage docs to use --kebab-case
for switches.

Closes #339.
2019-04-09 14:37:51 +04:00
Michael Klishin 8eee5dca42 Merge branch 'master' into rabbitmq-cli-336 2019-04-08 19:04:25 +04:00
Michael Klishin 382c664f79 Clarify 2019-04-08 15:30:58 +04:00
Michael Klishin 5ab985d2e4 Explain, references rabbitmq/rabbitmq-server#1971 2019-04-08 15:08:01 +04:00
Michael Klishin e76e00aa06 ctl close_all_connections: don't fail when --vhost is missing in options 2019-04-08 15:07:46 +04:00
Michael Klishin a37cd534e0 Clarify that not every command supports every formatter 2019-04-05 14:28:58 +04:00
Luke Bakken 6f4d9bf83d Ensure enumerable value is returned from RpcStream
Fixes #336
2019-04-04 17:56:05 -07:00
Michael Klishin 11adbf446b A typo 2019-04-01 03:28:30 +03:00
Michael Klishin fe23f38635 Expand help information for more commands (part 4) 2019-04-01 03:26:17 +03:00
Michael Klishin 0d57806e0f Expand help information for more commands (part 3) 2019-04-01 03:00:01 +03:00
Michael Klishin 654ec133b2 Expand help information for more commands
This removes command-specific --formatter option from the docs
per discussion with the team. --formatter will be covered in the
general section only.
2019-03-31 01:33:36 +03:00
Michael Klishin 9f6eb5a13a Rename function 2019-03-31 00:38:52 +03:00
Michael Klishin 171376f9c9 Document arguments/options and relevant guides for more commands 2019-03-30 09:30:26 +03:00
Michael Klishin 6cf71362d1 Correctly format blank command description
Don't print a trailing dot and a new line break,
that is confusing and doesn't look great.
2019-03-26 21:06:42 +03:00
Michael Klishin 2510b0baea A typo
<3 <3 <3 dogs
2019-03-26 20:54:09 +03:00
Michael Klishin fd151e4696 join_cluster: minor doc updates 2019-03-26 17:20:37 +03:00
Michael Klishin a27289af95 Recommend doc guides in --help for more commands 2019-03-26 17:07:18 +03:00
Michael Klishin f2b80a4116 A way for commands to provide a list of relevant doc guides
in the help message.
2019-03-26 15:51:06 +03:00
Michael Klishin 93dbbf342e Rework how command-specific options are displayed in help
Per recommendation from @dumbbell.
usage_addition/0 return format per discussion
with @dcorbacho, @hairyhum, @lukebakken.
2019-03-26 01:21:22 +03:00
Michael Klishin 187d6cd79a Cosmetics 2019-03-21 19:06:27 +03:00
Spring Operator 0a2541afd3 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://erlang.org/doc/reference_manual/distributed.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.org/doc/reference_manual/distributed.html) result ConnectTimeoutException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://elixir-lang.org/docs/stable/elixir/OptionParser.html (301) with 1 occurrences migrated to:
  https://elixir-lang.org/docs/stable/elixir/OptionParser.html ([https](https://elixir-lang.org/docs/stable/elixir/OptionParser.html) result 404).
* http://elixir-lang.org/docs/stable/elixir/Stream.html (301) with 1 occurrences migrated to:
  https://elixir-lang.org/docs/stable/elixir/Stream.html ([https](https://elixir-lang.org/docs/stable/elixir/Stream.html) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://elixir-lang.org with 1 occurrences migrated to:
  https://elixir-lang.org ([https](https://elixir-lang.org) result 200).
* http://elixir-lang.org/ with 2 occurrences migrated to:
  https://elixir-lang.org/ ([https](https://elixir-lang.org/) result 200).
* http://elixir-lang.org/getting-started/typespecs-and-behaviours.html with 1 occurrences migrated to:
  https://elixir-lang.org/getting-started/typespecs-and-behaviours.html ([https](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html) result 200).
* http://elixir-lang.org/install.html with 1 occurrences migrated to:
  https://elixir-lang.org/install.html ([https](https://elixir-lang.org/install.html) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://rabbitmq.com/documentation.html with 1 occurrences migrated to:
  https://rabbitmq.com/documentation.html ([https](https://rabbitmq.com/documentation.html) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 290 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:13:07 -05:00
Michael Klishin 4c1b377330 Reduce generic options section per discussion in #333
The section on node names has been moved to https://www.rabbitmq.com/cli.html#node-names
(not yet live).
2019-03-19 22:23:42 +03:00
Michael Klishin c72b0928f7 Reduce general options section
* Only keep [--timeout <n>] but not a separate section for
   commands that support timeouts.
 * Replace a separate virtual host section with a general option.
   This option doesn't really need a detailed explanation.
 * Replace a separate --quiet/--silent section with a general option.
   This option doesn't really need a detailed explanation.

Per discussion with @gerhard and @acogoluegnes.
2019-03-18 14:36:22 +03:00
Michael Klishin 8c60489719 Replace [-p vhost] in help messages with [--vhost vhost] 2019-03-18 13:53:54 +03:00
Michael Klishin cb3fa1048e Rename <*infoitem> in help messages to <column>
Clearer, easier to read and uniform.
2019-03-18 13:47:46 +03:00
Michael Klishin 1e996b1128 Sort info items in command help
Per suggestion from @gerhard.
2019-03-18 13:42:06 +03:00
Michael Klishin 9bc4b148f1 Document more command-specific arguments and switches 2019-03-18 08:56:17 +03:00
Michael Klishin 7d2b5c4730 Document more command-specific arguments and switches 2019-03-18 07:47:46 +03:00
Michael Klishin 1ce3cb00f6 delete_queue: document switches in --help 2019-03-18 07:47:45 +03:00
Michael Klishin 97960bde37 Cosmetics 2019-03-18 07:47:45 +03:00
Michael Klishin af2b343784 list_channels: @info_keys are meant to be atoms
Even though the implementation now supports
string values as well.
2019-03-18 07:47:44 +03:00
Michael Klishin b47ec93f97 Merge pull request #331 from rabbitmq/list-queue-type
Add queue type to list queues command
2019-03-18 05:53:07 +03:00
Michael Klishin 50f702d63b Global options: mention --formatter=pretty_table 2019-03-17 14:18:33 +03:00
Michael Klishin e1df5c0a87 ctl close_all_connections: additional usage docs 2019-03-17 14:13:13 +03:00
Michael Klishin d54f979ed8 Do not indent lines in usage_additional
We eliminated indentation in other sections
because it is too painful to get aligned
for command author.
2019-03-17 14:12:50 +03:00
Michael Klishin 2f5472e03f Cosmetics 2019-03-17 14:05:42 +03:00
Michael Klishin b5d39b2a2f Handle info keys that are strings
Some commands define them as atoms, others
as strings.
2019-03-17 14:01:04 +03:00
Michael Klishin bea9cf4486 Rework command-specific help
* Display command-specific options first instead of
  generic at the top
* Include one line command synopsis from --list-commands
  in the command-specific message
* List timeout in a separate section. It doesn't
  integrate very well with either command-specific
  or general section
* Format section headings as H2s in Markdown, this makes them stand out
* Assorted small formatting changes
* Update tests to be less fragile to copywriting changes
2019-03-17 13:54:18 +03:00
Michael Klishin c5b5df1282 Help command descriptions, cosmetics 2019-03-17 06:55:22 +03:00
Michael Klishin c48a1fae65 Correctly format management_agent and other multi-segment plugin names
Without this management_agent failed to be formatted
causing an ugly looking exception in --help.
2019-03-16 21:18:22 +03:00
Michael Klishin 10be5d4dec Cosmetics
Rearrange functions to follow a more common
command interface order.
2019-03-16 21:17:12 +03:00
Michael Klishin 30b6069293 restart_vhost belongs to the Virtual Hosts section 2019-03-16 21:16:33 +03:00
Diana Corbacho b56b69f9fa Add queue type to list queues command
[#163984879]
2019-03-15 17:07:11 +00:00
Michael Klishin 7f6ef260da ctl shutdown: consider @localhost nodes to be local
Without this -n has to be used when it previously wasn't required.

Follow-up to #328, references #327, #309.

Per discussion with @lukebakken.
2019-03-07 01:29:23 +03:00
Michael Klishin c339b6a10c ctl shutdown: infer hostnames from node names
inet_db is not a very reliable source as it doesn't take
node name CLI arguments and ERL_INETRC file settings.
That can lead to false positives in environments where
inet_db returns the same value (e.g. `localhost`) for
every cluster member.

Per discussion with @gerhard.

Closes #327.
References #309.
2019-03-06 20:19:52 +03:00
Michael Klishin e589a2b985 ctl forget_cluster_node: improve error formatting 2019-02-26 14:04:41 +03:00
Josh Soref 2dcfd4a34b spelling: parameterised 2019-02-24 02:02:34 -05:00
Michael Klishin 6a368e24dc New command group: replication 2019-02-21 20:45:49 +03:00
Michael Klishin 8ac5f2ec7b Improve formatting of protocol plugin help sections 2019-02-21 19:53:45 +03:00
Michael Klishin 3f32c237dc Squash a couple of compiler warnings 2019-02-21 19:17:52 +03:00
Michael Klishin aceab7c592 Wording, typos 2019-02-21 19:14:50 +03:00
Michael Klishin ea6294be41 New command: `rabbitmqctl force_gc`
Developed as part of a live coding training session but can be
useful in practice, so let's keep it.

Per discussion with @hairyhum.
2019-02-21 19:11:30 +03:00
Michael Klishin 62b2fdf80c Combine virtual host management, limits, tracing into a single group 2019-02-21 17:54:16 +03:00
Michael Klishin 866ce75fe4 More/slightly improved command descriptions 2019-02-21 17:03:34 +03:00
Michael Klishin cbaf74d269 Help sections for rabbitmq-diagnostics commands 2019-02-21 16:35:41 +03:00
Michael Klishin 4932c339c7 Command groups: naming, rearranging 2019-02-21 15:52:51 +03:00
Michael Klishin 80993dc921 Merge branch 'master' into help-wip 2019-02-21 13:18:59 +03:00
Daniil Fedotov 993d4a928a Support custom help sections. 2019-02-14 13:19:46 -05:00
Daniil Fedotov b157b6a7cf Do not use defcmd macro. 2019-02-14 13:16:49 -05:00
Daniil Fedotov 1b4aaac477 Formatting of the help message 2019-02-14 13:11:23 -05:00
Daniil Fedotov a56ee97d74 Make help sections and descriptions similar to man page. 2019-02-14 13:02:00 -05:00
Michael Klishin c7e8ab9b56 New command: version, closes #314 2019-02-14 15:10:22 +03:00
Daniil Fedotov 9fdeaef417 Clarify that list_connections command ony applies to AMQP 0.9.1 2019-02-12 14:49:16 -05:00
Daniil Fedotov a5c34042de Example of using defcmd to define constant command callbacks 2019-02-11 14:07:49 -05:00
Daniil Fedotov 680c8969ca Add more command descriptions 2019-02-11 14:07:34 -05:00
Daniil Fedotov 5fabaeddb4 Cleanup help command. Support plugin sections in command list. 2019-02-11 14:06:16 -05:00
Daniil Fedotov a7d70f1448 More descriptions for commands 2019-02-11 09:35:12 -05:00
Jean-Sébastien Pédron b17a998ed1 list_feature_flags_command.ex: Add `doc_url` to the columns list
[#160169569]
2019-02-11 11:01:18 +01:00
Daniil Fedotov 3d13da5797 More command descriptions. 2019-02-08 15:57:10 -05:00
Daniil Fedotov d6789e60f2 A new way to display basic usage.
Do not show additional parameters info.
List commands as names and descriptions.
Group commands in sections.

New behaviour callbacks:
help_section/0 - atom name of a group to put command to. Default is :other
description/0 - single line description of the command. Printed in the commands list

Sections ans descriptions are WIP.
2019-02-08 15:33:17 -05:00
Michael Klishin b452733d73 Improve error message produced by `rabbitmqctl shutdown`
References #309.
2019-02-07 04:24:13 +03:00
Michael Klishin f526663e9a Cosmetics 2019-02-05 21:29:28 +03:00
Luke Bakken 962e0cf7c7 Ensure longnames option is passed to normalise_node
Fixes #311
2019-02-05 07:27:34 -08:00
Arnaud Cogoluègnes 97c048cf37 Add active consumer fields if necessary
When calling node is 3.8 and one of the nodes is < 3.8, active and
activity status fields need to be set with default values.

[#163298456]
2019-02-05 15:06:51 +01:00
Jean-Sébastien Pédron aa93258f16 wait_command.ex: Fix function clause with validate/2
The function didn't have the success path, i.e. when one of `--pid` or a
pidfile is specified.
2019-02-04 12:07:53 +01:00
Michael Klishin 041a6c2bdf Reuse existing modules more, rearrange functions 2019-02-04 02:22:21 +03:00
Michael Klishin 56ac8d1cf7 shutdown: correctly wrap badrpc responses in validate/2 2019-02-03 22:00:11 +03:00
Michael Klishin 7ad9176435 Further improvements to the shutdown command
Add --[no-]wait (enabled by default) for those who would prefer
to use it to shut down remote nodes even though it wouldn't wait for
a verified node termination.

Propagate --timeout to calls.

References #309.
2019-02-03 20:40:01 +03:00
Michael Klishin 0786b13d4a Move the node locality to a validator 2019-02-03 18:37:28 +03:00
Michael Klishin 29d01a44fb Merge branch 'master' into shutdown_require_local_host 2019-02-03 18:15:17 +03:00
Michael Klishin db72acf1a3 Squash a couple of warnings 2019-02-03 06:20:04 +03:00
Michael Klishin 2ad334c91f Refactor 2019-02-03 04:55:37 +03:00
Michael Klishin bf00712add Make all list_* commands available to rabbitmq-diagnostics 2019-02-03 04:32:37 +03:00
Jean-Sébastien Pédron e25fee769a Set `feature_flags_file` app env for {forget,rename}_cluster_node
This is required when we try to impersonate a node: that node needs to
know about the actually enabled feature flags to act properly.

[#160169569]
2019-02-02 01:30:27 +01:00
Luke Bakken 9b01b1cf3c Add `list_feature_flags` and `enable_feature_flag` commands
As their name suggests, they are used to manage the feature flags of
RabbitMQ and its plugins.

[#159298729]
2019-02-01 17:51:21 +01:00
Daniil Fedotov 7bc4bf9dfa Make shutdown command require a node to be local.
Shutdown waits for the node to stop based on OS pid,
if the node is not local, it will be the wrong pid.

[#142699795]
2019-02-01 11:47:37 -05:00
Michael Klishin db2f6bc4e6 Help message copywriting 2019-01-31 01:39:12 +03:00
Michael Klishin c79ac644b9 Mention --help in the global option section 2019-01-31 01:14:55 +03:00