Commit Graph

53303 Commits

Author SHA1 Message Date
Rin Kuryloski dad871e86c Update rules_pkg to 0.9.1 2023-05-12 12:45:01 +02:00
Rin Kuryloski 204d0177c2 Fix github actions cache key for the bazel repo-cache 2023-05-12 12:45:01 +02:00
Rin Kuryloski 92b0a81c60 Use rules_erlang 3.10.0 2023-05-12 08:41:01 +02:00
Rin Kuryloski ea895a0023 Account for Elixir containing several core applications
- eex
- elixir
- ex_unit
- iex
- logger
- mix

So that apps (like rabbitmq_cli) can dialyze against the extra
components
2023-05-12 08:26:42 +02:00
Rin Kuryloski 08061144ad Pass csv and json to rabbitmq_cli plt
So that they are no longer reported as unknown in
//deps/rabbitmq_cli:dialyze
2023-05-12 08:26:42 +02:00
Rin Kuryloski 19f4abd55b Build cli deps as .ez archives
This provides an elixir/erlang agnostic way of providing them other
erlang rules
2023-05-12 08:26:42 +02:00
Michael Klishin 45520436e8
Merge pull request #8145 from rabbitmq/mk-update-3.12.0-release-notes
Update 3.12.0 release notes
2023-05-12 02:39:15 +04:00
Michael Klishin ac5948162f
Merge pull request #8143 from rabbitmq/mk-ra-2.6.0
Pin Ra to 2.6.1
2023-05-12 02:38:11 +04:00
Michael Klishin 62f6e4f4c2 Update 3.12.0 release notes 2023-05-12 02:25:45 +04:00
Michael Klishin c9c6730cc5 Pin Ra to 2.6.1 2023-05-12 01:48:47 +04:00
Michael Klishin 441a77f6d0 Pin Ra to 2.6.0-pre.1 2023-05-11 23:25:58 +04:00
Michael Klishin acfc6d8594
Merge pull request #8140 from rabbitmq/synchronise-before-membership-changes
Synchronise feature flags before any changes to Mnesia membership
2023-05-11 21:19:17 +04:00
Diana Parra Corbacho 6bcd73b570 Synchronise feature flags before any changes to Mnesia membership
Left as it was, a failure enabling the feature flags leaves the
cluster in an inconsistent state where the joined nodes think
the joining node is already a member, but the joining node
believes its a standalone node. Thus, later join_cluster commands
fail with an inconsistent cluster error.
2023-05-11 15:48:44 +02:00
Luke Bakken 37dedc97e5
Merge pull request #8130 from rabbitmq/rabbitmq-server-8129
Correctly use AMQP URI query parameter `password`
2023-05-10 09:41:26 -07:00
Luke Bakken 494d171ff2
Correctly use AMQP URI query parameter `password`
Fixes #8129

The query parameter `password` in an AMQP URI should only be used to set
a certificate password, *not* the login password. The login password is
set via the `amqp_authority` section as defined here -

https://www.rabbitmq.com/uri-spec.html

* Add test that demonstrates issue in #8129
* Modify code to fix test

Modify amqp_uri so that test passes
2023-05-10 07:13:47 -07:00
Jean-Sébastien Pédron f5c780325e
Merge pull request #8112 from rabbitmq/fix-feature-flags-init-vs-code_server-deadlock
rabbit_feature_flags: Fix possible deadlock when calling the Code server
2023-05-09 11:43:49 +02:00
Michal Kuratczyk a8b00a3298
Try elixir 1.14.3 for Windows tests
Debugging a setup-beam issue:
https://github.com/erlef/setup-beam/issues/189
2023-05-09 11:26:45 +02:00
Jean-Sébastien Pédron e0a2f10272
rabbit_feature_flags: Fix possible deadlock when calling the Code server
[Why]
The Feature flags registry is implemented as a module called
`rabbit_ff_registry` recompiled and reloaded at runtime.

There is a copy on disk which is a stub responsible for triggering the
first initialization of the real registry and please Dialyzer. Once the
initialization is done, this stub calls `rabbit_ff_registry` again to
get an actual return value. This is kind of recursive: the on-disk
`rabbit_ff_registry` copy calls the `rabbit_ff_registry` copy generated
at runtime.

Early during RabbitMQ startup, there could be multiple processes
indirectly calling `rabbit_ff_registry` and possibly triggering that
first initialization concurrently. Unfortunately, there is a slight
chance of race condition and deadlock:

0. No `rabbit_ff_registry` is loaded yet.
1. Both process A and B call `rabbit_ff_registry:something()` indirectly
   which triggers two initializations in parallel.
2. Process A acquires the lock first and finishes the initialization. A
   new registry is loaded and the old `rabbit_ff_registry` module copy
   is marked as "old". At this point, process B still references that
   old copy because `rabbit_ff_registry:something()` is up above in its
   call stack.
3. Process B acquires the lock, prepares the new registry and tries to
   soft-purge the old `rabbit_ff_registry` copy before loading the new
   one.

This is where the deadlock happens: process B requests the Code server
to purge the old copy, but the Code server waits for process B to stop
using it.

[How]
With this commit, process B calls `erlang:check_process_code/2` before
asking for a soft purge. If it is using an old copy, it skips the purge
because it will deadlock anyway.
2023-05-09 10:43:29 +02:00
Michael Klishin 69387b16a5
Merge pull request #8123 from rabbitmq/SimonUnge-shrink_on_node_cleanup
Peer discovery: shrink QQ replicas on forced node removal
2023-05-07 21:55:22 +04:00
Michael Klishin 013628db15 Pass Dialyzer 2023-05-07 21:31:36 +04:00
Michael Klishin 3835a137d6 Intentionally ignore return value here
the node is being removed
2023-05-07 21:25:04 +04:00
Michael Klishin 4da3ae0e05 Wording 2023-05-07 21:21:03 +04:00
Simon Unge 0c649b3687 See #2882. Also call quorum shrink command 2023-05-07 21:21:03 +04:00
Michael Klishin dcd386a2ce
Merge pull request #8115 from rabbitmq/bump-otp-25.3
Adopt otp 25.3.2
2023-05-06 12:18:36 +04:00
Michael Klishin 30021283f7
Merge pull request #8102 from rabbitmq/prometheus-tcp-listener-none
Support TLS-only listener for Prometheus
2023-05-06 11:54:46 +04:00
GitHub 817808b9ef Adopt otp 25.3.2 2023-05-06 03:05:31 +00:00
Michael Klishin 59fe5dc01b
Prometheus: handle scenarios when no listener is configured
Start a plain TCP one with all defaults.
2023-05-06 00:19:58 +04:00
Chunyi Lyu 4ddb0c2038 Support TLS-only listener for Prometheus
- tcp listener can be turned off by setting
'prometheus.tcp.listener = none'
- config schema follows web_mqtt and web_stomp
2023-05-05 15:44:53 +01:00
Michael Klishin 64333a54ae
Merge pull request #8106 from rabbitmq/mk-bazel-run-gazelle
bazel run gazelle
2023-05-05 01:02:37 +04:00
Michael Klishin a57221d976 bazel run gazelle 2023-05-05 00:39:28 +04:00
Michael Klishin cadbb5ed42
Merge pull request #8103 from rabbitmq/mk-bump-osiris-to-1.5.1
Bump Osiris to 1.5.1
2023-05-05 00:34:24 +04:00
Michael Klishin e8ffc45cc9
Merge pull request #8098 from rabbitmq/mqtt-connection-closed-event
Add MQTT client id to connection closed event
2023-05-05 00:20:36 +04:00
Michael Klishin 2d51c8c99b Bump Osiris to 1.5.1 2023-05-05 00:09:45 +04:00
Michael Klishin bbb98226e2
Merge pull request #8100 from rabbitmq/otp26-dialyzer 2023-05-04 19:05:23 +04:00
Michal Kuratczyk 6d4acc4281
Enable dialyzer for Erlang git-master action 2023-05-04 17:03:59 +02:00
Michal Kuratczyk 48086bfec9
Bump credentials_obfuscation to 3.4.0 2023-05-04 15:31:01 +02:00
David Ansari f296765551
Fix OTP 26 tuple dialzer warning
In OTP 26, our custom type tuple(A,B) starts intefering
with the built-in type tuple().

Therefore rename tuple(A,B) to optimised_tuple(A,B).
2023-05-04 15:31:01 +02:00
Michal Kuratczyk 1228077785
Fix rabbit_recovery_terms:start/0 return types 2023-05-04 15:31:01 +02:00
David Ansari 967e262272 Add MQTT client id to connection closed event
As requested in https://github.com/rabbitmq/rabbitmq-server/discussions/6331#discussioncomment-5796154
include all infos that were emitted in the MQTT connection created event also
in the MQTT connection closed event.
This ensures infos such as MQTT client ID are part of the connection
closed event.
Therefore, it's easy for the user to correlate between the two event
types.
Note that the MQTT plugin emits connection created and connection closed events only if
the CONNECT packet was successfully processed, i.e.authentication was successful.

Remove the disconnected_at property because it was never used.
rabbit_event already adds a timestamp to any event.
2023-05-04 09:15:55 +00:00
Michael Klishin 67efb07397
Merge branch 'SimonUnge-su_classic_queue_qq_queue_allow_redeclare' 2023-05-04 04:53:40 +04:00
Michael Klishin 52b1eb9a43
Naming 2023-05-04 04:53:22 +04:00
Simon Unge d32c19e86f See #8076. Skip arg and type check on re-declare of QQ if declare type is classic. 2023-05-03 16:11:16 -07:00
Michal Kuratczyk a2bcdada3d
Don't warn about `dbg:*` functions 2023-05-02 22:44:29 +02:00
Michael Klishin 46eee71110
Merge pull request #8086 from rabbitmq/dependabot/github_actions/main/peter-evans/create-pull-request-5.0.1 2023-05-02 23:20:23 +04:00
dependabot[bot] 0bd3f78c06
Bump peter-evans/create-pull-request from 5.0.0 to 5.0.1
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-02 18:59:38 +00:00
Rin Kuryloski e5e7fb2a8b
Merge pull request #8083 from rabbitmq/rin/cowboy-build-bazel
Regenerate BUILD.cowboy for cowboy 2.12.0
2023-05-02 17:51:43 +02:00
Rin Kuryloski facd663062 Regenerate BUILD.cowboy for cowboy 2.12.0
see e6e68fc
2023-05-02 17:07:34 +02:00
Michael Klishin 83aebd2466
Merge pull request #8080 from rabbitmq/rabbitmq-server-8007
Improve validation of commands that accept replica candidate nodes as arguments
2023-05-02 16:57:13 +04:00
Michael Klishin bffc5d519c
Correct a couple of typos 2023-05-02 16:48:14 +04:00
Michael Klishin c9221bd717
Improve rabbitmq-queues {add,delete}_member error messages
when target queue was not found.
2023-05-02 13:28:29 +04:00