Commit Graph

49842 Commits

Author SHA1 Message Date
Luke Bakken 2741b75937
Comment-out code_reload
If RabbitMQ is not running, `erlang_ls` returns `nodedown` which is shown in your text editor console.
2021-11-03 07:59:10 -07:00
Philip Kuryloski a0c3714b1a Again tweak update-rbe-images workflow 2021-11-03 15:39:34 +01:00
Philip Kuryloski 8c0a4c83c7 Tweak update-rbe-images workflow 2021-11-03 15:35:42 +01:00
Philip Kuryloski 7b00a1a518
Merge pull request #3646 from rabbitmq/bump-bazel-erlang
Adopt latest bazel-erlang
2021-11-03 07:31:05 -07:00
Philip Kuryloski 46efc994ff See if the update-rbe-images workflow can be updated automatically
When the latest erlang actually moves while the PR is open
2021-11-03 15:25:50 +01:00
GitHub e4dd3ac560 Adopt latest bazel-erlang
- bazel-erlang@c85ebaa61235734f592d87cf9c2b2055dfa245df
2021-11-03 14:10:39 +00:00
Arnaud Cogoluègnes ba5cfb1bae
Use version range for stream client Maven dependency
In test suite. Note a snapshot for 1.0-SNAPSHOT has been
pushed by mistake a while ago, so this one must be
excluded. It's unlikely it will be erased, as the snapshots
for the first stable version should be 1.0.0-SNAPSHOT.
2021-11-03 14:05:23 +01:00
Arnaud Cogoluègnes b71f1fd7e1
Bump Java dependencies in stream management test suite 2021-11-03 14:00:24 +01:00
Michael Klishin 8827d5197b
Merge pull request #3643 from rabbitmq/rebalance-logging
Turn down logging from queue rebalancing
2021-11-03 14:12:27 +03:00
Michal Kuratczyk 3f8925954c Turn down logging from queue rebalancing
With many queues, rebalancing can log hundreds of lines at warning/info
level, even though nothing exciting happened. I think we can tune that
down - if there is nothing to do - that's a debug level,
if things go well - that's info, not a warning.
2021-11-03 11:26:15 +01:00
Philip Kuryloski 5dd8c7fe4d Add a workflow that will track bazel-erlang master via PRs
rabbitmq-server master has normally just used the latest bazel-erlang,
however when things go wrong it's pretty disruptive. This workflow
creates a PR that updates bazel-erlang's pinning in this repo to the
latest commit - but without blocking the pipeline if things go wrong.

If we need to coordinate a rabbitmq-server/bazel-erlang change, then
of course the pinned version can be updated within a manual
rabbitmq-server PR
2021-11-03 10:53:36 +01:00
Michael Klishin 6318a7e1f7
Merge pull request #3631 from rabbitmq/creation-as-guid
Use erlang:system_info(creation) as GUID
2021-11-03 12:48:31 +03:00
Philip Kuryloski 56a59f3f39
Merge pull request #3632 from rabbitmq/dependabot/github_actions/actions/checkout-2.4.0
Bump actions/checkout from 2.3.5 to 2.4.0
2021-11-03 02:21:24 -07:00
Michal Kuratczyk a92a5327d5 Use erlang:system_info(creation) as GUID
Node GUID allows to differentiate between different incarnations of a node.
However, since rabbit may take some time to start (many queues/bindings, etc),
there could be a significant difference between Erlang VM being up and
responding to RPC requests and the new GUID being announced. During that
time, node monitor could incorrectly assume there was a network
partition, while in fact a node was simply restarted. With this change,
as soon as the Erlang VM is up, we can tell whether it was restarted and
avoid false positives.

Additionally, we now log if any queues were deleted on behalf of the
restarted node. This can take quite a long time if there are many transient
queues (eg. auto-delete queues). The longer this takes, the higher were the
odds of a restarted node being up again by the time
check_partial_partition was called. We may need to reconsider this logic
as well but for now - we just log this activity.

Co-authored-by: Loïc Hoguin <lhoguin@vmware.com>
2021-11-03 09:21:00 +00:00
Michael Klishin 054b7e4c5a
Merge pull request #3635 from rabbitmq/mk-cluster-formation-target-cluster-size-hint
Introduce a target cluster size hint setting
2021-11-03 12:13:35 +03:00
dependabot[bot] 89fcfddc33 Bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-03 08:44:15 +00:00
Michael Klishin 686dccf410 Introduce a target cluster size hint setting
This is meant to be used by deployment tools,
core features and plugins
that expect a certain minimum
number of cluster nodes
to be present.

For example, certain setup steps
in distributed plugins might require
at least three nodes to be available.

This is just a hint, not an enforced
requirement. The default value is 1
so that for single node clusters,
there would be no behavior changes.
2021-11-03 08:42:58 +00:00
Philip Kuryloski 94affbe00e Use https to fetch bazel-erlang 2021-11-03 09:26:25 +01:00
Philip Kuryloski c42220b1f5 Use pinned bazel-erlang
It's too disruptive to just track master. A piece of automation will
be created to ensure the dep doesn't fall behind, but it can do so
speculatively on a branch first via PR, potentially with auto-merging.
2021-11-03 09:10:45 +01:00
Michael Klishin 435e4f98ab
Merge pull request #3636 from rabbitmq/bump-otp-for-oci
Adopt otp 24.1.4 for OCI workflow
2021-11-03 07:03:27 +03:00
GitHub f9964092a0 Adopt otp 24.1.4 for OCI workflow 2021-11-03 03:04:57 +00:00
Michael Klishin 40db671e0b
Merge pull request #3633 from wrobell/rabbitmq-streams-doc-protocol-hex
Use hex values in RabbitMQ Streams protocol description
2021-11-02 21:58:42 +03:00
wrobell 08c417fdb7 Use hex values in RabbitMQ Streams protocol description
The protocol documentation uses decimal values for error and request key
codes.

Let's use hex values instead. This helps when looking at a request and
its response - 0x0006 and 0x8006 vs. 6 and 32774.

Also, when looking at output of protocol analysis tools like Wireshark,
a hexadecimal value will be printed, for example:

    "Nov  1, 2021 23:05:19.395825508 GMT","60216,5552","00000009000600010000000701"
    "Nov  1, 2021 23:05:19.396069528 GMT","5552,60216","0000000a80060001000000070001"

Above, we can visually identify delete publisher request and response
(0x0006 and 0x8006) and easily match them in the documentation of the
protocol.

Finally, above argument applies to logging as it is common to log
hex values, not decimal.
2021-11-02 18:31:30 +00:00
Philip Kuryloski 76287fb30c format with bazel files with buildifier 2021-11-02 18:24:26 +01:00
Philip Kuryloski aa666133b6 Maybe reduce flakiness of the exchange_SUITE 2021-11-02 18:23:54 +01:00
Philip Kuryloski 8c0eece3cd Adjustments for the latest bazel-erlang 2021-11-02 16:24:26 +01:00
Karl Nilsson 10372427dc Type spec fixes
So that dialyzer can pass.
2021-11-02 14:47:51 +00:00
Arnaud Cogoluègnes a1e76fe5ac
Merge pull request #3553 from rabbitmq/osiris-16-replication-over-tls
Use inter-node TLS conf to enable Osiris TLS replication
2021-11-02 15:33:12 +01:00
Arnaud Cogoluègnes 56de49c007
Add Osiris to Bazel dependencies in prelaunch 2021-11-02 14:48:56 +01:00
Arnaud Cogoluègnes 6d23b2846c
Use Osiris helper to configure stream replication over TLS
References rabbitmq/osiris#16
2021-11-02 11:57:56 +01:00
Arnaud Cogoluègnes 7d57a5e7fb
Redact password in logs when applying default configuration 2021-11-02 11:57:56 +01:00
Philip Kuryloski f69aaf3736 Add the sha256 back in for the aten dep in bazel 2021-11-01 16:27:38 +01:00
Karl Nilsson b326873488 temporarily comment aten sha256 2021-11-01 13:37:50 +00:00
Karl Nilsson 4931ee9abb aten 0.5.7 2021-11-01 13:09:14 +00:00
Michael Klishin 3bdd51519a
Merge pull request #3625 from wrobell/rabbitmq-streams-doc-protocol-naming
Fix use of "RabbitMQ Streams" in protocol documentation
2021-10-29 22:13:54 +03:00
wrobell e74823d68c Fix use of "RabbitMQ Streams" in protocol documentation
The following RabbitMQ page uses "RabbitMQ Streams" or "streams",
therefore use it in the protocol documentation as well

    https://blog.rabbitmq.com/posts/2021/07/rabbitmq-streams-overview
2021-10-29 19:06:06 +01:00
Michael Klishin 059b44ff0c
Merge pull request #3618 from rabbitmq/bump-otp-for-oci
Adopt otp 24.1.3 for OCI workflow
2021-10-29 13:25:39 +03:00
Michael Klishin 022d6636e7
Merge pull request #3619 from wrobell/rabbitmq-streams-doc-protocol-fix
Fix RabbitMQ Streams protocol documentation
2021-10-28 22:35:35 +03:00
wrobell 57ff5dbf4a Fix RabbitMQ Streams protocol documentation
1. Response for publisher declaration request does not contain
   publisher id.

2. Add mechanism entry to the details of SASL handshake request.

3. SASL handshake response contains list of mechanisms, not just single
   mechanism.
2021-10-28 17:53:22 +01:00
GitHub c4c57ed4d3 Adopt otp 24.1.3 for OCI workflow 2021-10-28 03:04:58 +00:00
Jean-Sébastien Pédron 49c733be3a
rabbit_msg_store: Accept duplicate writes from the same queue
The situation is this one: if for some reason (i.e. a bug) a queue has
the same message referenced twice (or more) in its index and this
message is eligible for the message store (as opposed to being entirely
stored in the queue index), it will send it multiple times to the
message store.

Until now, the code of the message store had two assertions:
* one verified in the context of the queue process to make sure there
  was no two writes or two removes in a row;
* one verified in the context of the message store process, doing
  exactly the same.

Consider the following order of events:
1. the queue sends the first copy to the message store
2. the message store handles the first copy
3. the queue sends the second copy to the message
4. the message store handles the second copy

In this scenario, none of the assertions are triggered and the message
goes through the message store as if it was coming from different queues
(i.e. a fan-out use case).

Now consider this order of events:
1. the queue sends the first copy to the message store
2. the queue sends the second copy to the message store
3. the message store handles the first copy

This time, the code will hit both assertions, leading to the crash of
the queue, the crash of the message store and as a consequence, the
crash of the entire vhost.

In the case of two consecutive writes, those assertions are useless
because the message store already knows how to handle multiple copies of
the same message. However, the consequence are catastrophic: a single
queue with a duplicate message could take down an entire vhost.

This patch relaxes the assertion in the case of two consecutive writes.
Now, both scenarii described above will be consistent: the copies from
the same queue will be handled as any copies and the message store and
the vhost will continue to work as usual.

Note that this patch doesn't cover the reason why there were multiple
copies in the queue in the first place! So the initial reason for this
to happen is still there lurking somewhere. The user who saw this
problem had duplicate messages in a dead-letter queue. Perhaps something
related to the lack of publisher-confirms between the initial queue and
the dead-letter one?
2021-10-27 11:39:50 +02:00
Philip Kuryloski b4eb5e2cfd Remove unused file
osiris is now a native bazel_erlang_lib, so we don't need this file
2021-10-27 08:57:48 +02:00
Philip Kuryloski d4e817aa27 Add some notes about additional bazel flags to BAZEL.md 2021-10-26 17:09:21 +02:00
Michael Klishin 7f0c1982a3
Merge pull request #3599 from rabbitmq/mgmt-ui-prometheus-port-fix
Prometheus plugin: fix TLS port handling
2021-10-21 02:47:07 +03:00
Michael Klishin 8ad8afac38
Merge pull request #3576 from rabbitmq/coordinator-error-handling
Handling of `stream_not_found` return value when init a stream client
2021-10-21 00:38:11 +03:00
Michael Klishin 52492da327
Merge pull request #3598 from rabbitmq/mgmt-ui-persistent-messages-fix
Fix persistent message count display in mgmt UI
2021-10-21 00:34:25 +03:00
Arnaud Cogoluègnes c0f1e23b17
Disable stream test in mixed versions mode
Not worth testing in this mode, as the stream plugin
does not start without the stream_queue feature flag.
2021-10-20 15:16:45 +02:00
Arnaud Cogoluègnes 030a08fa54
Enable stream_queue flag with env variable in test suite
For mixed version mode, where feature flags are
not explictely enabled.
2021-10-20 15:08:05 +02:00
Arnaud Cogoluègnes d87fa91a52
Enable stream_queue flag in test suite
For mixed version mode, where feature flags are
not explictely enabled.
2021-10-20 14:55:54 +02:00
Alexey Lebedeff b9ebfb8980 Fix ssl port handling in prometheus plugin
All ssl options were stored in the same proplist, and the code was
then trying to determine whether an option actually belongs to ranch
ssl options or not.

Some keys landed in the wrong place, like it did happen in #2975 -
different ports were mentioned in listener config (default at
top-level, and non-default in `ssl_opts`). Then `ranch` and
`rabbitmq_web_dispatch` were treating this differently.

This change just moves all ranch ssl opts into proper place using
schema, removing any need for guessing in code.

The only downside is that advanced config compatibility is broken.
2021-10-20 14:55:33 +02:00