Commit Graph

4036 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron ac303a2c74 rabbit_mgmt_http_health_checks_SUITE: Remove trailing whitespaces 2020-10-22 15:00:04 +02:00
Jean-Sébastien Pédron 6864929fe8 rabbit_mgmt_http_health_checks_SUITE: Don't import unused functions 2020-10-22 14:59:41 +02:00
Jean-Sébastien Pédron d39b691216 rabbit_mgmt_http_health_checks_SUITE: Pay attention to rabbit_ct_broker_helpers:enable_feature_flag() return value
If it returns `{skip, _}`, we must skip the test group.
2020-10-22 14:58:47 +02:00
Arnaud Cogoluègnes 675375928d Merge pull request #860 from rabbitmq/stream-queue-cluster-args
Add missing queue arguments for stream and quorum queues
2020-10-21 16:45:01 +02:00
Arnaud Cogoluègnes 2479628d05 Arrange queue arguments in UI
References rabbitmq/rabbitmq-server#2471
2020-10-21 16:41:54 +02:00
Michael Klishin 0d993d6983 Update rabbitmq-components.mk 2020-10-21 12:55:37 +03:00
dcorbacho e395a5223c Add missing queue arguments for stream and quorum queues 2020-10-20 13:33:55 +01:00
Michael Klishin 22f447157f Include top-level port property for TLS listeners
This value is used at listener registration and will show up in
`rabbitmq-diagnostics listeners' output.

Closes #857
2020-10-19 13:48:21 +03:00
Michael Klishin c2350b1f59 Update tests to not use foobar x-arguments
Queues now validate x-arguments in addition to policy definitions.
2020-10-19 12:58:38 +03:00
Michael Klishin 9ce361813d Merge pull request #858 from rabbitmq/document-health-checks
Document new health check endpoints
2020-10-19 08:25:25 +03:00
Michael Klishin 4fd2ec4acf Clarify 2020-10-19 08:25:06 +03:00
Michael Klishin 9f4cea0f98 Further updates to health check endpoint docs
* Remove documentation to the now deprecated One True Health Check™.
   It is too intrusive and too prone to false positives to recommend.
 * Aliveness test is also a health check, and will respond with a 200
   or 503 as of #856
2020-10-19 08:13:54 +03:00
Michael Klishin c1a1bc9393 Simpler wording for new health check endpoint docs 2020-10-19 07:57:15 +03:00
dcorbacho ea37d7dd67 Document new health check endpoints 2020-10-16 11:48:56 +01:00
Michael Klishin 07ec5b6fc3 Merge pull request #856 from rabbitmq/rabbitmq-management-855
Take error scenarios into account in aliveness test
2020-10-16 05:43:17 +03:00
Michael Klishin 5377d5e7fb /auth-attempts => /auth/attempts in one more place 2020-10-14 20:27:07 +03:00
Michael Klishin b6f775fa24 /api/auth-attempts/ => /api/auth/attempts 2020-10-14 08:03:17 +03:00
dcorbacho 2947906180 Document auth attempts endpoints 2020-10-14 05:18:49 +03:00
dcorbacho db637b6d56 Split get auth attempts API into global counters and detailed by source 2020-10-14 05:18:49 +03:00
dcorbacho 86bc48fc81 Query and rest auth attempt metrics 2020-10-14 05:18:48 +03:00
Luke Bakken 795f255873 Update Travis CI config 2020-10-13 16:35:19 -07:00
Luke Bakken a2b0df6524 Use -include directive when appropriate 2020-10-13 12:00:33 -07:00
Luke Bakken d236a5139c erlfmt 2020-10-13 09:58:59 -07:00
Luke Bakken 0e9564882b Take error scenarios into account
For instance, if `message-ttl` is set to `0`, there will never be a
message in the queue for the check. In this case, return `503`

Fixes #855
2020-10-13 09:57:31 -07:00
Michael Klishin f3b4caa996 Finish cluster-wide and local alarm health check tests 2020-10-07 22:14:49 +03:00
dcorbacho 9d04d95250 Test health checks 2020-10-07 15:27:00 +01:00
Michael Klishin c2e7d0e04b HTTP API health check test suite WIP 2020-10-07 12:40:08 +03:00
Michael Klishin 0e8798c6a3 Strip trailing whitespace 2020-10-06 14:16:18 +03:00
dcorbacho ad805eb091 Introduce health checks
GET /api/health/checks/certificate-expiration
GET /api/health/checks/port-listener
GET /api/health/checks/protocol-listener
GET /api/health/checks/virtual-hosts
GET /api/health/checks/node-is-mirror-sync-critical
GET /api/health/checks/node-is-quorum-critical
2020-10-06 12:11:23 +01:00
Michael Klishin d7ee7fb48b Introduce GET /api/health/checks/local-alarms 2020-10-05 20:49:17 +03:00
Michael Klishin ec368d9248 Add alarm details to GET /api/health/checks/alarms 2020-10-05 17:12:20 +03:00
Michael Klishin 1cbd84fa92 Return info message as a binary 2020-10-05 17:12:20 +03:00
Michael Klishin f619703c3d Introduce rabbit_alarms:get_alarms/1 2020-10-05 17:12:20 +03:00
Luke Bakken b24ed793a8 Use newer Elixir for testing
See rabbitmq/rabbitmq-ci#32
2020-10-01 13:04:21 -07:00
kjnilsson a8947ac6f0 Uncomment some tests 2020-09-30 14:29:01 +01:00
dcorbacho e11f517a87 Add stream policies 2020-09-30 14:29:01 +01:00
dcorbacho 3cca5fc685 Stream queues memory breakdown 2020-09-30 14:29:01 +01:00
dcorbacho 95ec943ced Hide 'Get messages' drop down for stream queues
basic.get operation is not supported
2020-09-30 14:29:01 +01:00
dcorbacho 0686190f15 Stream queue
[#171206871]
2020-09-30 14:29:01 +01:00
kjnilsson 323834a7fd Restore the pre 23.1 behavour of lists:sublist/3
As we depend on it to detect an out of range request and return an HTTP
400 response.
2020-09-30 14:03:28 +01:00
Michael Klishin 44c34a4b21 Update GH Actions badges 2020-09-25 20:27:50 +03:00
Michael Klishin fa37a6b6de Exclude dialyzer job from dependencies 2020-09-25 20:20:42 +03:00
Michael Klishin 5a10fd7d3c Define a (no-op in this repo) dialyzer job for GH Actions 2020-09-25 20:19:42 +03:00
Michael Klishin 70be13b90d Merge pull request #849 from rabbitmq/github-actions-otp-22.3-and-23.0
GitHub Actions: test on OTP 22.3 and 23
2020-09-25 19:56:34 +03:00
Michael Klishin 9cf5af5904 Commit Dialyzer action override 2020-09-25 19:14:50 +03:00
Michael Klishin 4fc36acce7 Disable Dialyzer, use Elixir 1.8.0 2020-09-25 19:14:32 +03:00
Michael Klishin cda4ab91f5 Correct more Dialyzer errors 2020-09-25 02:17:23 +03:00
Michael Klishin 2d14393963 Simplify 2020-09-25 02:11:29 +03:00
Michael Klishin 3a84afbced Correct more Dialyzer errors 2020-09-25 02:05:55 +03:00
Michael Klishin 6f89596c4a Some Dialyzer error fixes 2020-09-24 23:31:55 +03:00
Michael Klishin 38c85452db Stop testing on OTP 21.3 2020-09-24 15:07:15 +03:00
Michael Klishin d76788aced GitHub Actions: test on OTP 22.3 and 23 2020-09-24 15:05:34 +03:00
Michael Klishin 641bc625b2 More test massaging 2020-09-24 14:18:18 +03:00
Michael Klishin ca84821a4c Regular HTTP API suite: bring back samples test
Per discussion with @dcorbacho
2020-09-24 13:59:52 +03:00
Michael Klishin 502c74579e Test suite massaging to reduce flakiness of some tests
Some tests are timing-sensitive in nature. Given enough cores,
the assumptions in some of them are no longer true.

In addition, some sample test assertions only make sense when
stats collection is disabled; removed them from the "regular" HTTP
API suite per discussion with @dcorbacho.

While at it, remove some overly opinionated assertions
and a test for the deprecated One True Health Check™.
2020-09-24 12:59:43 +03:00
Luke Bakken e5df43983f Change error to something more verbose. 2020-09-23 15:23:34 -07:00
Michael Klishin 46f94711cb Respond with a Bad Request when client provides double-encoded JSON
instead of a 500.

Closes #839.
2020-09-23 15:23:26 -07:00
Michael Klishin af5fb4b197 Merge pull request #828 from rabbitmq/qq-reject-publish
Allow quorum queues to use reject-publish
2020-09-23 11:52:39 +03:00
Noah Kantrowitz e8948634c5 Fix destructuring assignment.
I think.
2020-09-08 16:20:47 -07:00
Noah Kantrowitz 058093d538 Make healthchecks failures return an HTTP 500 instead of 200.
Fixes #840.
2020-09-08 16:15:30 -07:00
kjnilsson 6920728bc6 Allow QQs to use expired/queue ttl 2020-09-07 09:45:18 +01:00
kjnilsson 78fd7a3c36 Allow quorum queues to use reject-publish 2020-09-07 09:45:18 +01:00
Michael Klishin ba26c7721f Extract user limits FF tests into its own group
So that they are easy to skip in mixed-version clusters where
this feature flag can't be guaranteed to be available.

References #rabbitmq/rabbitmq-server#2380.
2020-09-03 06:05:15 +03:00
Michael Klishin 3bceaad700 Use await_condition in this timing-sensitive test 2020-09-02 17:44:23 +03:00
Michael Klishin 69518f9f5a Refer to running nodes using rabbit_nodes:all_running/0
to simplify the move to Mnevis in the future.
2020-08-31 09:05:32 +03:00
Michael Klishin b7de77e21d Wording 2020-08-31 09:05:32 +03:00
Michael Klishin a647cc4826 Naming and cosmetics 2020-08-31 09:05:32 +03:00
Michael Klishin 639fb6823e Avoid using deprecated http_uri:encode/1
It will be removed in Erlang 25.
2020-08-31 09:05:32 +03:00
Ayanda-D ed7f9709a9 Per-user limits preload users select list 2020-08-31 09:02:46 +03:00
Ayanda-D 8164a97123 Per user-limits API documentation 2020-08-31 09:02:46 +03:00
Ayanda-D 6018abed6a Per user-limits tests 2020-08-31 09:02:46 +03:00
Ayanda-D c564c0e69a Per user-limits dispatcher & route handlers 2020-08-31 09:02:46 +03:00
Ayanda-D d21229832d Per user-limits frontend UI 2020-08-31 09:02:45 +03:00
Anupama Singh 0eeeadb07b New field limits for internal_user record 2020-08-31 09:02:45 +03:00
Lajos Gerecs 5325692a09 fix zero time formatted as empty string
Previously the check was using non-strict equality, which meant that empty
string was displayed instead of 0. This can mislead users to think that
no value is set while actually, for example, the federation message expiry is
set to 0.
2020-08-24 14:57:27 +02:00
Luke Bakken 3f1f4c7ef8 Update rabbitmq-components.mk 2020-08-04 08:41:47 -07:00
Michael Klishin 32904dccb4 Wording changes to follow-up with #834 2020-08-02 07:39:50 +03:00
Johan Rhodin ec629a3c6b Update global.js
Fix punctuation
2020-08-01 22:48:28 -05:00
Jean-Sébastien Pédron 89b321b733 Update rabbitmq-components.mk 2020-07-30 12:06:53 +02:00
Luke Bakken ee9b2996f4 Update rabbitmq-components.mk 2020-07-29 10:02:03 -07:00
Luke Bakken 2c23acf988 MPL 2 license update for bin/rabbitmqadmin 2020-07-27 08:31:13 -07:00
dcorbacho d838bdbebe Update erlang.mk 2020-07-21 14:32:38 +01:00
Michael Klishin e7a7e9db2e Update rabbitmq-components.mk 2020-07-21 13:12:48 +03:00
Michael Klishin f443fa2446 Update rabbitmq-components.mk 2020-07-21 03:42:02 +03:00
dcorbacho a7185331e5 Revert drop of Exhibit B on MPL 2.0 2020-07-20 17:00:39 +01:00
furkhat 0fc53cd109 prevent sending authorization: null header 2020-07-20 16:17:13 +03:00
dcorbacho acbdd0d58c Update LICENSE 2020-07-20 11:25:57 +01:00
Michael Klishin 9ffe504ab4 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:07 +03:00
Michael Klishin 1e206fb28a Drive by: make connection bandwidth rates easier to read 2020-07-15 02:29:36 +03:00
Luke Bakken 3634aa0b32 Debug log vhost access check result
Part of rabbitmq/rabbitmq-auth-backend-http#100 that was missed.
2020-07-15 02:22:02 +03:00
dcorbacho 4e4cc73a75 Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-15 02:22:02 +03:00
Jasper Yu 4861742bc9 Changed bytes converter 2020-07-09 17:48:54 +08:00
Jean-Sébastien Pédron 011e3f548c Update erlang.mk 2020-06-23 17:14:08 +02:00
Jean-Sébastien Pédron 6e563037a0 Change copyright holder from Pivotal to VMware 2020-06-17 14:06:10 +02:00
Michael Klishin c52f34e989 Make it possible to configure db cache multiplier via rabbitmq.conf
Closes rabbitmq/rabbitmq-management#821.
2020-06-10 11:30:43 +03:00
Michael Klishin 384866c6bb Merge pull request #819 from rabbitmq/rabbitmq-management-818
Load definitions from rabbitmq.load_definitions via a boot step
2020-06-09 14:54:59 +03:00
Michael Klishin 6bc10e4751 Load definitions from rabbitmq.load_definitions via a boot step
Previously we tried to rely on rabbitmq_management env
being loaded in the core. That is suboptimal and has
unintentional side effects.

References rabbitmq/rabbitmq-management#2368, rabbitmq/rabbitmq-management#2373.
Closes rabbitmq/rabbitmq-management#818.
2020-06-09 13:34:30 +03:00
Gerhard Lazu f2e6a8d9c4 Merge pull request #809 from rabbitmq/github-actions
GitHub Actions
2020-06-09 09:09:51 +01:00
Michael Klishin 2762c720b0 Bump Recon to 2.5.1
for Erlang 23 compatibility of 'rabbitmq-diagnostics observer'

References zhongwencool/observer_cli#68.
2020-06-09 08:22:14 +03:00
Gerhard Lazu c275aa2c4b Restrict build badges to the release branch
In this case it's master, set to v3.8.x & v3.7.x when back-porting

Otherwise they will show as failing if the latest build failed, even
when this build ran on a different branch.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-06-09 00:40:33 +01:00
Michael Klishin 7fb453c8fc Upgrade jQuery to 3.5.1, closes #815 2020-06-04 16:41:50 +03:00
Johan Rhodin 6cc868c31f Fix net_timetime typo
timetime->ticktime
2020-05-27 15:59:29 -05:00
Philip Kuryloski bbf61837c0 Regenerate workflows with 'make github-actions' 2020-05-11 17:19:04 +02:00
Philip Kuryloski bafde4d4f9 Run test suite via GitHub Actions on every push
Generated with `make github-actions`
2020-05-11 16:56:57 +02:00
Philip Kuryloski 968c644401 Dedupe calls to rabbit_mgmt_test_util:reset_management_setting/1
It was called as a setup step in init_per_group, but also in every init_per_testcase.
2020-05-11 16:56:57 +02:00
Jean-Sébastien Pédron da1f4f6795 rabbit_mgmt_rabbitmqadmin_SUITE: Reset $HOME in end_per_testcase
It polluted the common_test node and caused inter-node communication
failures: a new `.erlang.cookie` file was re-generated in the overriden
$HOME directory, and this new cookie was used by RabbitMQ nodes started
after this testsuite.
2020-05-05 17:39:43 +02:00
Jean-Sébastien Pédron 9cd36056d4 rabbit_mgmt_wm_definitions: Adapt call to `rabbit:product_*`
... after the API changed.
2020-05-04 17:38:39 +02:00
Michael Klishin ce6fbba80d rabbitmqadmin: make --cli-switches take precedence over config file values
With most CLI tools, command line arguments
take precedence over values in the configuration file.

This was not the case in rabbitmqadmin, and very likely
unintentionally so, at least I could not find
any evidence of the contrary.

There was a test case that implicitly depended
on this behavior. Again, no indication of this
being an intentional design choice.

While this can be a breaking change, most
users either use CLI flags or the config file;
this is why this behavior has gone unnoticed
for at least 8 years. We therefore treat
this change as low risk and worth
shipping e.g. in a patch release.
rabbitmqadmin is installed manually and
therefore won't be replaced during a node
upgrade anyway. Operators would
have to opt-in.

Closes #804.
2020-04-18 21:29:33 +03:00
Michael Klishin 671936bd6a Ignore .vscode 2020-04-18 21:26:01 +03:00
Michael Klishin 4dcfb2cf7f Merge pull request #803 from rabbitmq/lrb-add-federation-links
Add info for federation links
2020-04-16 02:03:50 +03:00
Luke Bakken 1a784737b5 Add info for federation links
Reported via public slack channel:

https://rabbitmq.slack.com/archives/C1EDN83PA/p1586983265300300
2020-04-15 15:19:37 -07:00
Michael Klishin 8cae7f1d6b Merge pull request #801 from rabbitmq/rabbitmq-management-800
Return TLS listener correctly
2020-04-15 20:12:31 +03:00
Luke Bakken 83eb3eeb7e Fix export using python 3
Without `.encode()` you get this error:

```
TypeError: a bytes-like object is required, not str
```

Also use `with` when appropriate
2020-04-15 16:47:42 +00:00
Michael Klishin 67f80ce900 One more test 2020-04-15 19:35:13 +03:00
Michael Klishin 8fe756d9f6 Remove a function that's no longer used 2020-04-15 18:39:44 +03:00
Luke Bakken 9c96571a34 Handle the combination of TLS options and cowboy_opts 2020-04-15 15:32:13 +00:00
Michael Klishin 584b06069c Simplify and adapt listener_config_SUITE
Part of #800
2020-04-15 18:30:35 +03:00
Michael Klishin d4f7f85fef Squash a compilation warning
(cherry picked from commit 1ec6f64658)
2020-04-15 15:29:15 +03:00
Michael Klishin 1ec6f64658 Squash a compilation warning 2020-04-15 14:42:51 +03:00
Luke Bakken ca7409254d Return TLS listener correctly
`ssl_opts` must be used so that TLS options are recognized.

Fixes #800

Also ensure TLS port is set.
2020-04-15 00:14:15 +00:00
Michael Klishin 3de47a2f2b Use rabbit_ct_helpers:await_condition/2 to detect rate changes 2020-04-10 11:07:12 +03:00
Luke Bakken d7b3cc7f87 Make pretty_json Python 3 compatible
This code is compatible with Python 2 and 3

Fixes #794
2020-04-09 20:18:29 +00:00
Michael Klishin a865874d38 Encode data to bytes here 2020-03-15 18:33:03 +03:00
Luke Bakken 60d8bcba0f Read / write files in binary mode
Fixes #785
2020-03-14 16:01:33 -07:00
dcorbacho 085ea10d1c Hide consumers when stats are disabled
Closes #787
2020-03-12 10:16:20 +00:00
Michael Klishin 3b44b71025 Merge pull request #788 from rabbitmq/db-cache-gc
Try reclaiming memory better in db cache process
2020-03-11 22:30:47 +03:00
Michael Klishin 7feb909674 Comment wording 2020-03-11 21:48:28 +03:00
Michael Klishin 3ff2466802 Revert "Hide consumers on queue page when stats are disabled" 2020-03-11 20:34:52 +03:00
dcorbacho 52b5e60c03 Hide consumers on queue page when stats are disabled
Closes #787
2020-03-11 11:25:40 +00:00
kjnilsson c3463c87db Try reclaiming memory better in db cache process
When queries get very very large it is possible that this process could
grow it's heap such that full sweep collections become rare. Hibernating
after purging enforces this as well as ensuring full sweep is done
before every cache invalidation.
2020-03-11 09:27:57 +00:00
Michael Klishin f73fee49ae rabbitmqadmin: update shebang to run on Python 3 by default
Python 2 is EOL. Yes, really truly EOL. Check it on the
Internetz.

References #786.
2020-03-10 22:28:16 +03:00
Jean-Sébastien Pédron 004e0569ce Update copyright (year 2020) 2020-03-10 15:43:34 +01:00
Michael Klishin 76f526e13c /rebalance/queues: allow OPTIONS requests
They are meant to be safe and idempotent, and
assumed to be enabled by CORS integration tests.

(cherry picked from commit f6501cdc69e8ca1f95e770e41882f2fa674d9a03)
2020-03-08 20:51:31 +03:00
Michael Klishin 6ba5e87fce Update example path 2020-03-07 21:30:15 +03:00
Michael Klishin ab91e796ab Update routes 2020-03-07 20:45:36 +03:00
Michael Klishin 34d8aa41e5 Move logging outside of the trampoline process 2020-03-07 20:45:17 +03:00
Michael Klishin 5d5c278a71 Compile 2020-03-07 20:29:27 +03:00
Michael Klishin c841373276 More logging 2020-03-07 20:26:16 +03:00
Michael Klishin 6efbd4c62c Rename rebalancing module
Much like we did with the endpoint path.
2020-03-07 20:13:54 +03:00
Luke Bakken 8ca4d628b3 Add API docs 2020-03-06 19:11:55 +00:00
Luke Bakken adfa28fad8 Add API endpoint /api/rebalance
Initially, this will rebalance all queues in all vhosts

Fixes #782

Implement skeleton rebalance API handler

Slightly different REST URI

Add code to actually spawn a proc to rebalance queues

Rebalance always succeeds since we can not get the lock from a different process. Look at the logs to see what actually is going on
2020-03-06 16:43:39 +00:00
Gerhard Lazu e4553ec8b8 Update rabbitmq-components.mk 2020-03-06 09:19:16 +00:00
Gerhard Lazu 0287a83952 Update erlang.mk 2020-03-06 09:17:49 +00:00
Jean-Sébastien Pédron f9b95327fa Travis CI: Update config from rabbitmq-common 2020-03-04 14:24:29 +01:00
Jean-Sébastien Pédron f2eef5d7b4 Travis CI: Update config from rabbitmq-common 2020-03-04 11:17:15 +01:00
Jean-Sébastien Pédron a067b94be3 Travis CI: Update config from rabbitmq-common 2020-03-03 14:53:39 +01:00
Jean-Sébastien Pédron 8f36ffe735 rabbitmqlogo.svg: Convert text to path
This fixes the display of the "TM" when the chosen font is unavailable.
Now that "TM" is a path, we can't edit the text anymore, but the style
will be the same everywhere.

`rabbitmqlogo-master-copy.svg` is the original file where "TM" is still
a text so we can edit it later.

Follow-up to commit 8356fff3e4.
2020-03-03 12:42:27 +01:00
Ivan Kaloyanov aa0320bc6c properties_key default value on binding deletable
**Align create binding and delete banding convention. Use empty
'~' properties_key by default as multiple users and I personally
find it inconvenient (and at first really time consuming)
to use the $HOME symbol for unbinding the default/simplest binding.
2020-02-29 19:51:19 +02:00
Michael Klishin 9cd535a636 Merge pull request #777 from rabbitmq/highdef-logo-and-favicon
Replace RabbitMQ logo and favicon by higher definition versions
2020-02-26 00:34:37 +03:00
Jean-Sébastien Pédron 8356fff3e4 Replace RabbitMQ logo and favicon by higher definition versions
The logo is now SVG instead of PNG.

The favicon, still in the ICO format, was created based on the SVG and
includes larger sizes.

Both images increased in size:
* 1150 bytes for the old `favicon.ico`
* 102856 bytes for the new `favicon.ico`
* 3296 bytes for the old `img/rabbitmqlogo.png`
* 17853 bytes for the new `img/rabbitmqlogo.svg`
2020-02-25 17:08:28 +01:00