Commit Graph

24667 Commits

Author SHA1 Message Date
Gerhard Lazu 6c0ba03d61
Test that we start from 0 publishers & consumers
Pair: @kjnilsson

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-31 15:29:16 +01:00
Gerhard Lazu 0ecf3d4eeb
Test stream publisher & consumer counters
Pair: @kjnilsson

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-31 15:29:16 +01:00
Gerhard Lazu dad0025088
Perform stream reader cleanup in terminate
Otherwise metrics will not get cleaned up correctly when processes crash.

It's also tidier to do this in a single place, in terminate/3

Pair: @kjnilsson

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-31 15:29:15 +01:00
Arnaud Cogoluègnes 8dc024089c
Bump dependencies in Java stream tests 2021-08-31 08:32:53 +02:00
Philip Kuryloski 09fb5c5321 Skip additional tests in mixed versions
The tests in question won't pass consistently as they are at the mercy
of how the quorum queue is placed across the mixed version nodes
2021-08-30 17:17:25 +02:00
Michael Klishin 83f007be54
Merge pull request #3341 from rabbitmq/local-exclusive-queues
Always place exclusive queues on the local node
2021-08-28 09:54:49 +03:00
Michael Klishin 3b4b4dc222
Exclude roundtrip definition import cases from mixed version runs
References #3333
2021-08-26 19:10:11 +03:00
Michael Klishin 54f7b6d77c
Re-format two definition import input files 2021-08-26 19:03:14 +03:00
Michael Klishin 42a3dfa81b
Exclude the #3333 test case from mixed version runs 2021-08-26 17:25:07 +03:00
Michal Kuratczyk d3dcd48ea5 Always place exclusive queues on the local node
Prior to this change, exclusive queues have been subject to the queue
location process, just like other queues. Therefore, if
queue_master_locator was not client-local and x-queue-master-locator was
not set to client-local, an exclusive queue was likely to be located on
a different node than the connection it is exclusive to.  This is
suboptimal and may lead to inconsistencies when the queue's node goes
down while the connection's node is still up.
2021-08-26 13:05:55 +02:00
Michael Klishin 2e61f51773
Commit definition import case16 file 2021-08-24 04:41:51 +03:00
Michael Klishin 6f97707dac
Definition import: correctly import vhost metadata 2021-08-24 04:41:04 +03:00
Michael Klishin 6bf4a99f58
Update a mock expectation 2021-08-21 00:53:42 +03:00
Michael Klishin 59ebb83506
rabbitmq_aws: drop trailing dot in some log messages 2021-08-21 00:45:07 +03:00
Bilal Acar 4d96d4099c
Started using function heads 2021-08-21 00:45:07 +03:00
Bilal Acar ca018ef110
Addressing PR comments 2021-08-21 00:45:07 +03:00
Bilal Acar 50f9bcf504
Adding retries to AWS API calls
Adding retries to AWS API calls
2021-08-21 00:45:07 +03:00
Michael Klishin 11760f95bd
Don't run #3319 assertions in mixed version clusters 2021-08-19 23:03:09 +03:00
Jean-Sébastien Pédron 0b1942bdc0
rabbit_{connection,channel}_tracking: Fix race condition in list()
The table might not exist yet (or is already gone) between the time
rabbit_nodes:all_running() runs and returns a specific node, and
mnesia:dirty_match_object() is called for that node's table.

This seems to happen frequently in CI.
2021-08-19 16:45:24 +02:00
Michael Klishin f5fe419892
Make PUT /api/vhosts/{name} update tags and/or description 2021-08-18 19:07:25 +03:00
Michael Klishin ea75297bf8
Merge pull request #3312 from rabbitmq/alarms-metric1
Expose alarms as Prometheus metrics
2021-08-17 22:16:30 +03:00
Michael Klishin 47b20e8f7c
Prometheus: alarm-related metric naming 2021-08-17 20:58:24 +03:00
Michael Klishin 6a0058fe7c
Introduce TLS-related rabbitmq.conf settings for definition import
currently only used by the HTTPS mechanism but can be used by
any other.
2021-08-17 20:42:53 +03:00
Ilya Khaprov 9fed915192
Add alarms prometheus collector.
close #2653
2021-08-16 20:32:29 +02:00
Michael Klishin f3a5235408
Refactor definition import to allow for arbitrary sources
The classic local filesystem source is still supported
using the same traditional configuration key, load_definitions.

Configuration schema follows peer discovery in spirit:

 * definitions.import_backend configures the mechanism to use,
   which can be a module provided by a plugin
 * definitions.* keys can be defined by plugins and contain any
   keys a specific mechanism needs

For example, the classic local filesystem source can now be
configured like this:

``` ini
definitions.import_backend = local_filesystem
definitions.local.path = /path/to/definitions.d/definition.json
```

``` ini
definitions.import_backend = https
definitions.https.url = https://hostname/path/to/definitions.json
```

HTTPS may require additional configuration keys related to TLS/x.509
peer verification. Such extra keys will be added as the need for them
becomes evident.

References #3249
2021-08-14 14:53:45 +03:00
Michael Klishin 1eacbaac15
Merge pull request #3299 from rabbitmq/add-env-vars-to-set-default-user-pass-vhost-and-erlang-cookie
Add support to override `default_{user,pass,vhost}` and the Erlang cookie from the environment
2021-08-11 23:06:46 +03:00
Michael Klishin 81780dc95e
Log a warning when Erlang cookie is overriden using an env variable
as it can be really difficult to troubleshoot such cookie changes
2021-08-11 20:34:38 +03:00
Jean-Sébastien Pédron d0b7a33a0f
Logging: Add comments explaining when burst limit is disabled
Follow-up to rabbitmq/rabbitmq-server#3298.
2021-08-11 16:56:21 +02:00
Jean-Sébastien Pédron bd39027d68
Add support for $RABBITMQ_ERLANG_COOKIE env var
It is the equivalent of the content of the Erlang cookie file. Note this
variable IS the cookie value, NOT the path to a cookie file.

If it is set, it will take precedence over the content of the Erlang
cookie file.

Fixes docker-library/rabbitmq#508.
2021-08-11 15:50:40 +02:00
Jean-Sébastien Pédron 46b8321bd9
Add support for $RABBITMQ_DEFAULT_{USER,PASS,VHOST} env vars
They are the equivalent of the `default_{user,pass,vhost}` configuration
settings. Each set environment variable will take precedence over its
configuration file counterpart.

Fixes docker-library/rabbitmq#508.
2021-08-11 15:50:40 +02:00
Jean-Sébastien Pédron 33c6cbf239
rabbit_env: Add $RABBITMQ_DEFAULT_{USER,PASS,VHOST} and $RABBITMQ_ERLANG_COOKIE vars
Those environment variables are unset by default. The default values are
set in the `rabbit` application environment and can be configured in the
configuration file. However, the environment variables will take
precedence over them respectively if they are set.
2021-08-11 15:50:36 +02:00
Alexey Lebedeff 1e8ba5bffc Use elixir itself to find its lib directory
This removes all the guesswork from the process. E.g. the old version
was not working with elixir from nixpkgs/NixOS.
2021-08-11 15:41:00 +02:00
Jean-Sébastien Pédron 2e955b0a50
Logging: Disable burst limit if the log level is set to `debug`
Otherwise, messages are being dropped, in particular during RabbitMQ
startup because of the amount of debug messages logged in that phase.

Burst limit is enabled again if the log level is set to `info` or
higher.
2021-08-11 15:32:39 +02:00
Gerhard Lazu 62d82e1660
Break down metrics by node in all RabbitMQ-Stream pie charts
Otherwise we won't be able to see which nodes are running "hot"

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-11 13:39:30 +01:00
Loïc Hoguin 8c019fb993
Merge pull request #3295 from rabbitmq/lh-test-dropwhile-restart-bug
Add tests for the regression introduced in #3041
2021-08-11 14:27:56 +02:00
Loïc Hoguin 24c25ab3cc
Add tests for the regression introduced in #3041 2021-08-11 12:50:04 +02:00
Michael Klishin 133e0ab72d
Manually apply rabbitmq/rabbitmq-website#1241 by @lushndm 2021-08-11 13:34:27 +03:00
Jean-Sébastien Pédron 51cfa4eb96
rabbit_boot_state: Wrap boot_state() type definition line
... to fit in 80 columns.
2021-08-10 15:12:05 +02:00
Jean-Sébastien Pédron 5a96d18aa2
systemd: Enclose status description inside quotes
... in the log message.
2021-08-10 15:12:05 +02:00
Jean-Sébastien Pédron 23c71b254f
systemd: Do not report "stopping" state to systemd
The problem is we only know about the state of the `rabbit` Erlang
application — when it is started and stopped. But we can't know the fate
of the Erlang VM, except if `rabbit:stop_and_halt()` is called. This
function is not called if `init:stop()` or a SIGTERM are used for
instance.

systemd is interested in the state of the system process (the Erlang
VM), not what's happening inside. But inside, we have multiple
situations where the Erlang application is stopped, but not the Erlang
VM. For instance:

    * When clustering, the Erlang application is stopped before the
      cluster is created or expanded. The application is restarted once
      done. This is controled either manually or using the peer
      discovery plugins.

    * The `pause_minority` or `pause_if_all_down` partition strategies
      both stop the Erlang application for an indefinite period of time,
      but RabbitMQ as a service is still up (even though it is managing
      its own degraded mode and no connections are accepted).

In both cases, the service is still running from the system's service
manager's point of view.

As said above, we can never tell "the VM is being terminated" with
confidence. We can only know about the Erlang application itself.
Therefore, it is best to report the latter as a systemd state
description, but not reporting the "STOPPING=1" state at all. systemd
will figure out itself that the Erlang VM exited anyway.

Before this change, we were reporting the "STOPPING=1" state to systemd
every time the Elang application was stopped. The problem was that
systemd expected the system process (the Erlang VM) to exit within a
configured period of time (90 seconds by default) or report that's it's
ready again ("READY=1"). This issue remained unnoticed when the cluster
was created/expanded because it probably happened within that time
frame. However, it was reported with the partition healing strategies
because the partition might last longer than 90 seconds. When this
happened, the Erlang VM was killed (SIGKILL) and the service restarted.

References #3262.
Fixes #3289.
2021-08-10 15:12:01 +02:00
Jean-Sébastien Pédron 47e0a5fb4c
Logging: Use `:` as the separator in verbosity mapping
This is the same separator as the field mapping. I don't remember why I
picked a different character... Now, it feels awkward and non-intuitive
for users.
2021-08-10 14:26:27 +02:00
Jean-Sébastien Pédron 29bab5935c
Logging: Always represent Epoch-based timestamps as integers
Before this change, seconds were represented as floats.
2021-08-10 13:33:52 +02:00
Jean-Sébastien Pédron c2ea12ba39
Merge pull request #3281 from rabbitmq/fix-epoch-timestamp-crash-in-json-logging
Logging: Fix crash when Epoch-based timestamps are used with JSON
2021-08-10 13:32:40 +02:00
Jean-Sébastien Pédron 6c8cf4c510
Logging: Fix crash when Epoch-based timestamps are used with JSON
The code was passing a number (the timestamp) to
unicode:characters_to_binary/1 which expects an iolist to convert to
UTF-8.

We now verify if we have a number before calling that function. If this
is a number (integer or float), we keep it as is because JSON supports
that type.
2021-08-10 12:34:11 +02:00
dcorbacho de7028979e
Unlink spawned processes once we're done
`EXIT` messages captured by ra polute the log.
The link is only needed to ensure no orphan processes are left behind,
so they can be safely unlinked once the work is done.

Maybe resizing cluster coordinator does not require linking, only
phases are problematic when a coordinator is stopped
2021-08-10 13:22:18 +03:00
Michael Klishin 8c1183b0fd
Ditto in rabbitmq_stream_management 2021-08-10 12:16:54 +03:00
Michael Klishin ace3ee9cd9
Bump Java stream client used in tests 2021-08-10 11:32:57 +03:00
Michael Klishin 36ad3a5b3d
Revert "CQ: don't deliver right before acking in the index"
This reverts commit 3ef858746c.

This change does not handle expired messages safely.

See https://github.com/rabbitmq/rabbitmq-server/discussions/3272.
2021-08-10 01:33:32 +03:00
Alexey Lebedeff 87532c4af4 Make test/development related makefile vars lazy
They were trying to run `hostname` and `which`, which produced a bunch
of error messages in a hermetic build environment.

And performance of those `shell` calls is not very important, as they
are caled just a few times during script runtime anyway (there is a
hack to make these lazy, but evaluating only once - but it's hardly
worth it).
2021-08-06 17:32:04 +02:00
Michael Klishin 49fd6b3e8d
Make sure 'rabbitmq-upgrade {drain, revive}' do not produce scary log messages
"scary" here means log messages that show up as "errors". Warnings
and info messages make more sense.

Per discussion with @mkuratczyk.
2021-08-05 16:26:13 +03:00
Michael Klishin cf2c6099b3
Merge pull request #3263 from rabbitmq/rabbitmq-server-3260
Partially reintroduce locking to mirrored_supervisor
2021-08-05 15:33:06 +03:00
Michael Klishin c84115f102
Warn when lock could not be acquired successfully 2021-08-05 11:31:35 +03:00
Michael Klishin 22add3c8ca
Acquire locks when starting mirrored supervisor children
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.
2021-08-05 00:39:16 +03:00
Michael Klishin 9a0f4b17cd
More mirrored supervisor logging 2021-08-04 16:58:44 +03:00
Michael Klishin 4f3d5e5e13
Mirrored supervisor: more logging at debug level 2021-08-04 15:56:45 +03:00
Philip Kuryloski 04371b0340 Bump a test timeout 2021-08-04 14:55:44 +02:00
Philip Kuryloski a3410904d6 Bump a test timeout 2021-08-04 13:06:29 +02:00
Philip Kuryloski aefb8ad753 bump a test timeout 2021-08-04 09:42:03 +02:00
Philip Kuryloski 35ab19c4a6 Bazel test timeouts 2021-08-03 17:06:12 +02:00
Philip Kuryloski 40954c1ca2 Update some bazel test timeouts 2021-08-03 15:51:02 +02:00
Philip Kuryloski c9e016d545 Remove duplicate compilation options in rabbit_common 2021-08-03 14:31:05 +02:00
Michael Klishin c12544f545
Update rabbitmq.conf.example header
mostly to test Mergify integration with @pjk25.
2021-08-03 13:19:52 +03:00
David Ansari 4b774db5c1 Use same threshold color for "Errors since boot" 2021-08-02 17:05:17 +02:00
David Ansari c99ee6961e Use same colorMode in all RabbitMQ-Stream panels
Co-authored-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-02 13:33:00 +02:00
David Ansari ea18c31288 Make RabbitMQ-Stream dashboard work via ConfigMap
Before this commit, importing the dashboard via ConfigMap as seen in
1eb1dc618e
didn't work because DS_PROMETHEUS variable was undefined in Grafana.

Related to https://github.com/rabbitmq/rabbitmq-server/pull/3250

Co-authored-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-02 13:12:48 +02:00
Gerhard Lazu 65afbb931b
Ensure RabbitMQ-Stream dashboard works correctly after import
This breaks the docker-compose integration, but we need to move away
from it anyways, the whole dev flow needs revisiting after our focus on
K8s.

$__rate_interval does not work with irate, dropping it in favour of 60s,
same as all other dashboards.

This is a follow-up to https://github.com/rabbitmq/rabbitmq-server/pull/3250

Thanks @ansd for mentioning about the post-import issues.

It was uploaded as https://grafana.com/api/dashboards/14798/revisions/3/download

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-30 13:53:02 +01:00
Gerhard Lazu 35a6369327
Restart stream-perf-test on-failure
This handles the scenario where rmq2 is not available, and
stream-perf-test exits with a non-zero exit code. Good spot @ansd!

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-30 11:25:36 +01:00
David Ansari 47d572908d Convert string to integer for ulimits.nofile
Before this commit:

> make overview metrics
services.rmq1.ulimits.nofile.hard must be a integer
make: *** [Makefile:68: overview] Error 15

Accoring to the docs
https://docs.docker.com/compose/compose-file/compose-file-v3/#ulimits
this must be an integer.
2021-07-30 09:46:38 +02:00
Gerhard Lazu 6f5c4118ea
Publish RabbitMQ-Stream dashboard to grafana.com
Removed the Dockerfile and slimmed down the Makefile, all of this is now
handled by https://github.com/rabbitmq/rabbitmq-server/blob/master/.github/workflows/oci.yaml
cc @Zerpet @pjk25

More details here (including the steps used to publish to grafana.com):
https://github.com/rabbitmq/release-engineering/issues/11#issuecomment-887627938

I don't want to hold up this PR, will invest in automating the
steps described in the previous link another time. Time to 🚀

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-29 19:34:05 +01:00
Philip Kuryloski cb3c93cc9e Increase a test timeout 2021-07-29 14:50:43 +02:00
Michael Klishin 1596f031ee
Merge pull request #3239 from rabbitmq/some-sort-of-unicode-support-in-env-files
Do not crash on badarg when env file has certain Unicode characters
2021-07-28 23:18:41 +03:00
Michael Klishin 6ef0c513e8
Merge pull request #3241 from rabbitmq/stream-absent
Handle 'absent' return value
2021-07-28 23:13:51 +03:00
dcorbacho 606429e90c Handle 'absent' return value 2021-07-28 21:48:37 +02:00
Michael Klishin 0617419e75
This *is* a Unicode character, U+060E 2021-07-28 19:04:16 +03:00
Ilya Khaprov 854f26ac18
Do not crash on badarg when env file has an 'unusual' unicode character
closes #3212
2021-07-28 16:39:17 +02:00
Philip Kuryloski c8cfd023a9
Merge pull request #3189 from rabbitmq/docker-library-rabbitmq-500
Bring the docker image up to date with the docker-library version
2021-07-28 11:15:27 +02:00
Philip Kuryloski 967f314f6f bazel timeouts 2021-07-28 10:38:04 +02:00
Philip Kuryloski a0a5bf3c01 Update peer discovery aws tests for docker image changes 2021-07-28 10:19:11 +02:00
Philip Kuryloski b8cabfe3dd bump test timeouts 2021-07-28 08:37:40 +02:00
Michael Klishin 2efc3d22fa
Merge pull request #3176 from rabbitmq/stream-error-handling
Better error handling for streams
2021-07-27 22:25:06 +03:00
Michael Klishin 9c2eeee595
Wording 2021-07-27 21:44:33 +03:00
Michael Klishin 2d3f31eb21
Merge pull request #3204 from rabbitmq/keep-state-and-data
Use keep_state_and_data
2021-07-27 21:39:06 +03:00
Gerhard Lazu 1b5c7e328e
Merge pull request #3230 from rabbitmq/fix-notify-limiter
Fix channel rate limiter for ack messages
2021-07-27 16:49:22 +01:00
Philip Kuryloski 68361d5d79 Extend the bazel timeout for unit_disk_monitor_mocks_SUITE 2021-07-27 16:02:10 +02:00
Philip Kuryloski 6967019495 Bazel test timeouts 2021-07-27 13:32:06 +02:00
Philip Kuryloski 2a6a9c786b Bazel test timeouts 2021-07-27 10:57:50 +02:00
Philip Kuryloski ee23cf1872 Bump test timeouts in bazel 2021-07-27 09:54:44 +02:00
Michael Klishin 5bfbe5b8b1
Merge pull request #3233 from britto/fix-ensure-safe-call-timeout-clause
Fix typo in ensure_safe_call_timeout/2
2021-07-26 23:48:39 +03:00
João Britto a27a9fd214 Adjust initial gen_server_call_timeout
to prevent `amqp_connection:start/2` from logging a warning when we use default
values.

The default for `connection_timeout` is already 60000. When we don't explicitly
set it to a lower value, `amqp_connection:maybe_update_call_timeout/2` adjusts
it to 70000 and logs a warning message, which may appear unexpected, especially
for users upgrading to 3.8.10+ with no config changes.

This change addresses that problem by pre-adjusting it to 70000, making it safe
by default and ensuring our default values don't conflict with each other.
2021-07-26 16:59:32 -03:00
João Britto 25b6ce1d9f Fix typo in ensure_safe_call_timeout
Matching on `ignored` instead of `ignore`, as described in the documentation of
net_kernel:get_net_ticktime/0.

https://erlang.org/doc/man/net_kernel.html#get_net_ticktime-0
2021-07-26 16:54:36 -03:00
Arnaud Cogoluègnes 4486584166
Fix channel rate limiter for ack messages 2021-07-26 13:57:44 +02:00
David Ansari 38a6ce9601 Fix link of stream docs 2021-07-26 12:03:06 +02:00
Philip Kuryloski abc8703fd8 Bump test timeouts in bazel 2021-07-26 11:09:09 +02:00
Philip Kuryloski 563a8f876a
Update bazel timeout for rabbitmq_amqp1_0 dialyze 2021-07-26 11:06:07 +02:00
Michael Klishin ca4866b964
Introduce rabbit_policy:list_op/2
and export rabbit_policy:sort_by_priority/1
2021-07-26 11:25:35 +03:00
Michael Klishin 23432f3130
Merge pull request #3229 from rabbitmq/stream-status-tracking
Fix function_clause error in tracking_status/2
2021-07-23 21:08:57 +03:00
David Ansari 6d968718c8 Fix function_clause error in tracking_status/2
Before this commit:

> ./sbin/rabbitmq-streams stream_status --tracking s1
Status of stream s1 on node rabbit@localhost ...
Error:
{:function_clause,
[{:rabbit_stream_queue, :"-tracking_status/2-fun-0-",
[:offsets, %{"s1-1" => 5}, []],
[file: 'src/rabbit_stream_queue.erl', line: 608]},
{:maps, :fold_1, 3, [file: 'maps.erl', line: 410]},
{:rabbit_stream_queue, :tracking_status, 2, []}]}

After this commit:

> ./sbin/rabbitmq-streams stream_status --tracking s1
Status of stream s1 on node rabbit@localhost ...
┌────────┬───────────┬───────┐
│ type   │ reference │ value │
├────────┼───────────┼───────┤
│ offset │ s1-1      │ 51    │
└────────┴───────────┴───────┘
2021-07-23 19:34:31 +02:00
Philip Kuryloski a9688624a8 Bump bazel test timeouts for some suites 2021-07-23 13:59:17 +02:00
Philip Kuryloski 97946f3666 bump a test timeout in bazel 2021-07-23 13:38:53 +02:00
Philip Kuryloski 7d3d601d88 Bump test timeouts
A recent release of buildbuddy eliminated a timeout extension that
they had applied in the past. Now that they honor timeouts exactly,
we have had to adjust the timeout for many tests.
2021-07-23 13:36:09 +02:00
Philip Kuryloski 6628df33ef Increase some bazel test timeouts 2021-07-23 12:57:16 +02:00
Jean-Sébastien Pédron ac7df333b6
Revert "rabbitmq-dist.mk: Install CLI scripts as part of the build"
This has the unfortunate side effect of causing a rebuild of all
applications every time. I need to figure out another place to build and
install the CLI during build time (instead of as part of the dist
target).

This reverts commit 4322cca66e.
2021-07-23 10:46:56 +02:00
Philip Kuryloski 04e6121b08 Increase the test timeout in bazel for unit_file_handle_cache_SUITE 2021-07-23 10:44:51 +02:00
Philip Kuryloski ae955d44c6 Avoid building the cli scripts in rabbitmq_stream_common
This isn't an issue in the monorepo, but causes problems externally
projects using rabbitmq-components.mk
2021-07-23 10:40:20 +02:00
Philip Kuryloski f95fc8aa0c Increase some suite timeouts in bazel 2021-07-23 09:43:05 +02:00
David Ansari e3ed9c21b0 Fix list_stream_publishers additional usage output 2021-07-22 18:13:07 +02:00
Philip Kuryloski 0443c4ab8a Increase the timeout for the queue_master_location_SUITE in bazel 2021-07-22 16:07:06 +02:00
Jean-Sébastien Pédron 9258ff1197
Merge pull request #3214 from rabbitmq/fix-bugs-reported-by-release-handler
Fix bugs reported by release handler
2021-07-22 11:20:10 +02:00
Philip Kuryloski b26289cb47 Adjust rabbitmq_prometheus test suite timeouts in bazel 2021-07-22 11:00:14 +02:00
Jean-Sébastien Pédron 8cbdbb87a5
rabbit_web_dispatch_sup: Fix modules list in supervisor spec
This fixes a bug causing a crash of the release handler.
2021-07-22 10:21:37 +02:00
Jean-Sébastien Pédron 23a04c2692
rabbit_mgmt_agent_sup_sup: Fix worker type for the pg group
It must be a worker (the default type), not a supervisor. This fixes a
bug causing a crash of the release handler.
2021-07-22 10:21:37 +02:00
Jean-Sébastien Pédron 80b428d5d3
rabbit_runtime: Find erl(1) in the ERTS bin directory
erl(1) might not be in the directory pointed by init's root argument.
This is the case with Erlang releases built with relx for instance.
2021-07-22 10:21:37 +02:00
Jean-Sébastien Pédron 4322cca66e
rabbitmq-dist.mk: Install CLI scripts as part of the build
... instead of the `dist` target. This way, the Erlang release can use
them.
2021-07-22 10:21:33 +02:00
Michael Klishin 2d8aad78bf
Merge pull request #3216 from rabbitmq/mk-quorum-queue-oldest-known-message-command
New aux quorum queue command: oldest_entry_timestamp
2021-07-21 19:04:58 +03:00
Michael Klishin a0ad332727
New aux quorum queue command: oldest_entry_timestamp
Per discussion with @kjnilsson
2021-07-21 18:28:39 +03:00
Gerhard Lazu 66ef8adfc8
Fix accept dependency in rabbitmq_prometheus
It's a runtime dependency, not a build dependency.

This is a fix and should be backported to v3.9.x, after rc.2 and just
before the final release. Would you disagree @dumbbell?

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-21 13:38:54 +01:00
Iliia Khaprov 53d67fda1f
Merge pull request #3205 from rabbitmq/send-www-authenticate-when-basic-auth-present
Send www-authenticate header when basic auth present but it's wrong
2021-07-21 11:19:22 +02:00
Karl Nilsson f38c023aa8
Correct Publish frame docs 2021-07-21 09:13:55 +01:00
Philip Kuryloski 6fec1faea5 Additional rpc -> erpc updates 2021-07-21 09:21:41 +02:00
Philip Kuryloski 5bc25fb2ff Fix accidental test case skip when not using mixed versions 2021-07-21 08:35:00 +02:00
Michael Klishin 0d06f34c66
rabbit_stream_reader: convert most log messages to debug ones 2021-07-21 01:38:13 +03:00
Johan Rhodin 6d0a432888
Fix link for stream.html 2021-07-20 16:35:24 -05:00
Ilya Khaprov 39693cfb07
Send www-authenticate header when basic auth present but it's wrong
close #3181
2021-07-20 21:44:36 +02:00
Gabriele Santomaggio 71c355c963
Fix links 2021-07-20 17:42:56 +02:00
Michael Klishin c973a93445
Merge pull request #3203 from rabbitmq/remove_project_maturity
Remove project maturity warning
2021-07-20 18:36:34 +03:00
David Ansari 644335de86 Use keep_state_and_data 2021-07-20 16:11:22 +02:00
Philip Kuryloski 0593e8307e Increase timeouts in aws peer discovery integration suite 2021-07-20 11:41:40 +02:00
Gabriele Santomaggio de0f7952e9 Add resources link
to client guide line and streams internals
2021-07-20 09:55:25 +02:00
Gabriele Santomaggio 84f51d7926 Remove project maturity warning 2021-07-20 09:00:11 +02:00
Michael Klishin 5c3f456131
Improve a Cuttlefish validator message 2021-07-20 08:34:40 +03:00
Michael Klishin e20bca44cc
rabbit_stream_reader: these should not be logged at info level 2021-07-20 00:55:40 +03:00
Michael Klishin c1e3710140
Squash a compiler warning 2021-07-20 00:55:40 +03:00
Michael Klishin 4ba8d05535
Merge pull request #3202 from rabbitmq/validate-amqp0-9-1-queue-name-length-in-management-ui
Validate amqp0.9.1 queue name length in management UI
2021-07-19 21:57:41 +03:00
Michael Klishin 70ebefc0f2
rabbit_stream: ignore escript and sbin 2021-07-19 20:26:16 +03:00
Michael Klishin 532d076907
Merge pull request #3194 from rabbitmq/stream-reader-state-timeouts
Add stream reader state timeouts
2021-07-19 20:16:04 +03:00
David Ansari 863b899079 Remove TEST macro
since it fails with Bazel.

As discussed with @pjk25, let's set this value via application env,
make it configurable to the test, but not configurable to the user.
2021-07-19 16:42:54 +02:00
Ilya Khaprov c5665d6da9
Validate AMQP0.9.1 queue name length when creating queue directly or via shovel in Management UI. close #3074 2021-07-19 14:57:50 +02:00
David Ansari 13b03b8530 Remove unused variable warning 2021-07-19 14:36:22 +02:00
Philip Kuryloski d6399bbb5b
Mixed version testing in bazel (#3200)
Unlike with gnu make, mixed version testing with bazel uses a package-generic-unix for the secondary umbrella rather than the source. This brings the benefit of being able to mixed version test releases built with older erlang versions (even though all nodes will run under the single version given to bazel)

This introduces new test labels, adding a `-mixed` suffix for every existing test. They can be skipped if necessary with `--test_tag_filters` (see the github actions workflow for an example)

As part of the change, it is now possible to run an old release of rabbit with rabbitmq_run rule, such as:

`bazel run @rabbitmq-server-generic-unix-3.8.17//:rabbitmq-run run-broker`
2021-07-19 14:33:25 +02:00
Philip Kuryloski 0f4cf2755d Increase a timeout for flakiness sake 2021-07-19 14:24:46 +02:00
Michael Klishin a4cc096728
rabbit_vhost: introduce all_tagged_with/1 2021-07-18 08:33:29 +03:00
Michael Klishin ef14bf067e
ctl add_vhost: propagate tags if no description is given 2021-07-18 08:28:53 +03:00
Philip Kuryloski 0a78484999 Make things a little more consistent between per_*_limit suites 2021-07-16 14:40:51 +02:00
Philip Kuryloski 4f514f435b Try to reduce flakes in per_user_connection_channel_limit_partitions_SUITE 2021-07-16 14:32:35 +02:00
Michael Klishin 9a023b2547
Event exchange: explicitly translate two more known event types
new in 3.9
2021-07-16 08:09:19 +03:00
João Britto 5c69b91e15 Remove amqp_ssl:add_verify_fun_to_opts/2,3
These functions have become no-op after d76234f.

The maybe_add_verify_fun/3 function has become unreachable and was removed too.
2021-07-15 17:28:49 -03:00
David Ansari 4053f729dd Rename STATE_TIMEOUT to CONNECTION_NEGOTIATION_STEP_TIMEOUT 2021-07-15 20:56:56 +02:00
David Ansari 694804d0d2 Add timeout reason to log message 2021-07-15 20:53:46 +02:00
David Ansari 3964da37b4 Close TCP connection when stream reader times out
Add state timeouts.
If the client takes more than 10s for a single step in the authentication
protocol, make the server close the TCP connection.

Also close the TCP connection if the server times out in state
close_sent. That's the case when the client sends an invalid command
(after successful authentication), the server requests the client to
close the connection, but the client doesn't respond anymore.
2021-07-15 19:29:24 +02:00
Philip Kuryloski 97e8037b80 Replace some static sleeps in tests with dynamic waits
This should help with flakiness
2021-07-15 16:42:14 +02:00