Commit Graph

1292 Commits

Author SHA1 Message Date
Michael Klishin d29850caef Add `gmake format`
Formats all source files with `mix format`
2019-01-30 22:15:28 +03:00
Michael Klishin de3bca0658 memory_breakdown: correctly format for CSV 2019-01-30 21:47:07 +03:00
Michael Klishin 7db0d6ee01 Present correct name for `rabbitmq-diagnostics check_alarms` 2019-01-30 16:08:46 +03:00
Michael Klishin 6a6f54d318 A typo 2019-01-29 02:59:01 +03:00
Michael Klishin 724dbca331 Merge pull request #303 from rabbitmq/await_startup_with_a_timeout
New command: `rabbitmqctl await_startup`
2019-01-28 21:06:41 +03:00
Michael Klishin 5fad316390 New command: `rabbitmqctl await_startup`
Like `rabbitmqctl wait` but doesn't use a pid file path.

Pair: @gerhard.

References rabbitmq/rabbitmq-server#1848.
2019-01-28 20:45:08 +03:00
Daniil Fedotov e85eb022a1 Merge pull request #297 from rabbitmq/rabbitmq-server-1838-active-field-for-consumers
Add active and activity status fields to list_consumers
2019-01-28 20:49:10 +04:00
Michael Klishin badbc59dc9 Drive-by change: remove a TODO
Currently integration tests do not start
or stop the runtime (only the RabbitMQ app on it),
and it will likely remain the case for a while.
2019-01-28 17:05:01 +03:00
Arnaud Cogoluègnes 606b72b5a6 Add active to default fields for list_consumers
[#163298456]

References rabbitmq/rabbitmq-server#1839
2019-01-24 18:26:39 +01:00
Arnaud Cogoluègnes 1732932f7b Merge branch 'master' into rabbitmq-server-1838-active-field-for-consumers 2019-01-24 10:46:58 +01:00
Michael Klishin 1c621c4fdd RestartVhostCommandTest stability and efficiency improvements
Virtual host process tree needs a bit more time to start and stop/
update state on failure.

Before this test a slower 5 year old machine had a 20% failure test rate
with this test (2 out of 10 attempts), with this change it has a %0
failure rate (0 out of 50).

While at it, only set up the vhost for tests that will actually hit
the test node.
2019-01-24 12:25:03 +03:00
Michael Klishin 77c4f3672e Rearrange test files
Most test/* files belong to either test/ctl or test/core.
2019-01-24 11:25:57 +03:00
Michael Klishin 283a3b016a Merge pull request #301 from rabbitmq/formatter_switches
Make it possible for formatters to define arguments.
2019-01-24 11:13:55 +03:00
Michael Klishin 7c44eeb0d9 Move get_formatter/2, get_printer/2 and friends to RabbitMQ.CLI.Core.Config
To avoid RabbitMQCtl being used as a library module and because
they both are effectively generic configurable settings.
2019-01-24 11:11:04 +03:00
Michael Klishin d767b4520b Merge branch 'master' into formatter_switches 2019-01-24 10:57:34 +03:00
Michael Klishin a922b5ed49 Merge pull request #300 from rabbitmq/rabbitmq-cli-292-listener-checks
Introduces listener check commands
2019-01-24 10:56:44 +03:00
Michael Klishin a6cf0c5539 Correct protocol labels for STOMP and MQTT 2019-01-24 10:37:36 +03:00
Daniil Fedotov e6530d6799 Make it possible for formatters to define arguments.
Add new callbacks to formatter_behavior: switches/0 and aliases/0
Merge them with command switches and aliases on parsing.

There is an example switch in the table formatter, enabling header padding.
2019-01-23 18:04:12 -05:00
Michael Klishin e8729c5de0 Introduce 'rabbitmq-diagnostics check_port_connectivity' 2019-01-23 22:30:20 +03:00
Michael Klishin ad23b37e3f Introduce 'rabbitmq-diagnostics check_port_listener <port>'
Part of #292.
2019-01-23 19:13:08 +03:00
Michael Klishin bd618db9cd Introduce 'rabbitmq-diagnostics check_protocol_listener'
Part of #292.
2019-01-23 17:45:37 +03:00
Michael Klishin 3f9c982d44 Standardize on :not_enough_args
That's what most commands use and the execution pipeline
expects.
2019-01-23 15:20:24 +03:00
Michael Klishin 9a134415fc More typos 2019-01-23 14:15:38 +03:00
Michael Klishin fefc8047dc One more typo 2019-01-23 14:15:26 +03:00
Michael Klishin ad5902a5f8 Clarify 2019-01-23 14:14:50 +03:00
Michael Klishin 9df7048425 Correct a moduledoc typo 2019-01-23 14:14:20 +03:00
Michael Klishin 53f064b989 Remove an unused alias 2019-01-23 10:49:27 +03:00
Michael Klishin 5c4ed6b912 Format generic error triplets 2019-01-23 10:44:19 +03:00
Michael Klishin 25de27644b ExUnit defaults to async: false for test cases 2019-01-23 10:44:04 +03:00
Michael Klishin f239457c6d Update tests to use the new default exit code 2019-01-23 10:43:49 +03:00
Michael Klishin 94d5216e68 New check command: 'rabbitmq-diagnostics check_running'
Like is_running but will exit with a non-0 code if the app is
not running on the target node.
2019-01-23 10:43:12 +03:00
Michael Klishin 51d7490bd7 Use exit code of 69 (EX_UNAVAILABLE) by default
Per [1], which is still the best guide on the subject we could find,
EX_UNAVAILABLE makes more sense as a catch-all error compared to EX_SOFTWARE.

Per discussion with @gerhard.

1. https://www.freebsd.org/cgi/man.cgi?query=sysexits&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE&arch=default&format=html
2019-01-23 10:20:46 +03:00
Michael Klishin 58a66af140 Refactoring 2019-01-23 10:12:27 +03:00
Michael Klishin 18ff37665c Change rabbitmq-diagnostics is_booting and is_running to be info commands
This means that even in the "negative" response they exit with a 0
status code. In other words, they just tell the user the state of things
without asserting on what constitutes a success or failure.

This is consistent with some recently introduced diagnostics commands:
some are "informational" (simply provide an insight into the state
of the node) and others are checks (optinionated, consider certain
conditions to be faulty and exit with a non-zero exit code).

References #292.
2019-01-23 08:49:05 +03:00
Michael Klishin b87678ee99 Follow command naming pattern in file names, too 2019-01-23 07:29:51 +03:00
Michael Klishin 1312ff2041 Update README
[ci skip]

(cherry picked from commit aae95b3331ae48091d873591f33597a33608f6f0)

Conflicts:
	README.md
2019-01-23 06:46:00 +03:00
Michael Klishin dbbb475b16 Fix compiler warnings 2019-01-22 13:53:49 +03:00
Michael Klishin b974bd18f9 Relax this assertion
Target node can have an AMQP+TLS listener enabled.
2019-01-22 13:53:17 +03:00
Michael Klishin fe0aa25f52 Merge pull request #296 from rabbitmq/rabbitmq-cli-292-diagnostics-alarms
Introduce `rabbitmq-diagnostics alarms`
2019-01-22 13:34:02 +03:00
Michael Klishin cf226bb004 Tests and revisions for 'rabbitmq-diagnostics check[_local]_alarms'
References #292.
2019-01-22 13:28:42 +03:00
Michael Klishin 4d2ee15ce7 Rename a few test files 2019-01-22 13:28:42 +03:00
Michael Klishin 4bc3e51461 Introduce rabbitmq-diagnostics check[_local]_alarms
References #292.
2019-01-22 13:28:42 +03:00
Michael Klishin aad1c3ae0e Correct local vs. global alarm filtering 2019-01-22 13:27:52 +03:00
Michael Klishin 93ba999434 Tests for 'rabbitmq-diagnostics alarms' 2019-01-22 13:27:52 +03:00
Michael Klishin 44e453fe25 Initial version of rabbitmq-diagnostics alarms 2019-01-22 13:27:51 +03:00
Michael Klishin 030c967631 Merge pull request #298 from rabbitmq/rabbitmq-cli-292-diagnostics-listeners
Introduce `rabbitmq-diagnostics listeners`
2019-01-22 13:27:27 +03:00
Michael Klishin d5c2cd867f Add tests for 'rabbitmq-diagnostics listeners' 2019-01-22 12:26:29 +03:00
Michael Klishin 4d9c6462f1 Enquote listener interface for machine-readable formats, too 2019-01-22 12:26:28 +03:00
Michael Klishin e938a6c1e1 Initial version of the 'rabbitmq-diagnostics listeners' command
Part of #292.
2019-01-22 12:26:28 +03:00
Michael Klishin 1722a085d9 JSON formatter: flatten the stream before formatting
Otherwise JSON array items are enclosed in an array, which unlikely
was the intent.

(cherry picked from commit b66751490798d1b374a0ffde73307b84f510f420)
2019-01-22 11:49:27 +03:00