Commit Graph

58669 Commits

Author SHA1 Message Date
Frederik Bosch 481ffb2d6c add option to disable registration of node during cluster formation 2025-02-01 14:09:03 +01:00
Frederik Bosch 8355bc691e add option to disable registration of node during cluster formation 2025-02-01 13:36:22 +01:00
Michael Klishin 082939c428
Merge pull request #13193 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/com.google.code.gson-gson-2.12.1
build(deps-dev): bump com.google.code.gson:gson from 2.12.0 to 2.12.1 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-01-31 22:59:58 -05:00
dependabot[bot] 0371958341
build(deps-dev): bump com.google.code.gson:gson
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.12.0...gson-parent-2.12.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-31 18:39:19 +00:00
Michael Klishin 047ec67281
Merge pull request #13185 from rabbitmq/aws-peer-discovery-make
Switch AWS peer discovery test from Bazel to make
2025-01-31 11:19:28 -05:00
Michael Davis 2f3422c495
erlang.mk: Update repository URL for proper dep
Proper was moved under the `proper-testing` org.
2025-01-31 09:12:21 -05:00
Michael Davis 7baf39798b
Rename 'utf8_string' type in MQTT packet_prop_SUITE
`proper-testing/proper` recently added `proper_unicode:utf8_string`
which is automatically imported and conflicts with this custom
generator.
2025-01-31 09:12:21 -05:00
Michael Davis e01ab9b9cc
Switch AWS peer discovery tests from Bazel to make
This change includes some fixes like setting the suffix for the metadata
which is necessary since 6692fcb6. The main reason for this change
though is to switch from running the integration_SUITE from the
AWS peer discovery plugin from Bazel to make, a necessary step to
dropping the Bazel files.
2025-01-31 09:12:21 -05:00
Michael Davis ed522fea88
Add back metadata labels to the OCI build
This fixes a regression from 6692fcb6: setting the `labels` to the
output of the metadata step attaches useful standardized labels like
the git hash when built, the source URL and the created timestamp.
Actions like `int128/wait-for-docker-image-action` used in the
`peer-discovery-aws` workflow use the revision label to detect that the
latest image has the desired hash.

Without setting `labels` we seem to inherit the version label from the
base erlang image:

    $ docker image inspect -f '{{ json .Config.Labels }}' \
        pivotalrabbitmq/rabbitmq:sha-0e7b53c6a8b682411c3f0024691a4760d8219699-otp27
    {"org.opencontainers.image.version":"27.2.1"}
2025-01-31 09:12:21 -05:00
Michael Davis b62a36d014
CI: Run the AWS peer discovery workflow on changes to the workflow file 2025-01-31 09:12:20 -05:00
Michael Klishin bfd3a60954
Management plugin: recommend rabbitmqadmin v2 in one more place 2025-01-30 15:56:05 -05:00
Michael Klishin 4d04852c3e
Management plugin: recommend rabbitmqadmin v2 2025-01-30 15:49:57 -05:00
Michal Kuratczyk c9de6df576
Merge pull request #13177 from rabbitmq/stream_consumer_max_offset_lag-description
Better metric description
2025-01-30 11:34:34 +01:00
Michal Kuratczyk 16700f9f19
Better metric description 2025-01-30 11:33:53 +01:00
Michael Klishin 63c9f71294
Merge pull request #13174 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/com.google.code.gson-gson-2.12.0
build(deps-dev): bump com.google.code.gson:gson from 2.11.0 to 2.12.0 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-01-29 16:27:36 -05:00
dependabot[bot] 0a874e266f
build(deps-dev): bump com.google.code.gson:gson
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-29 18:35:31 +00:00
Michal Kuratczyk 8d9aa3ed31
Merge pull request #13171 from rabbitmq/oci-version
Set RABBITMQ_VERSION in the OCI image
2025-01-29 11:35:58 +01:00
Michal Kuratczyk a06114a656
Set RABBITMQ_VERSION in the OCI image 2025-01-29 10:38:08 +01:00
Michal Kuratczyk 6692fcb608
Merge pull request #13160 from rabbitmq/simplified-oci-action
Simplified OCI builds
2025-01-29 09:33:20 +01:00
Michal Kuratczyk 0e7b53c6a8
Use pivotalrabbitmq/rabbitmq 2025-01-29 08:49:18 +01:00
Michael Klishin f3eea915e7
Merge pull request #13170 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-28 23:54:44 -05:00
GitHub 840928de0e bazel run gazelle 2025-01-29 04:02:31 +00:00
Michael Klishin 00be47b828
Merge pull request #13167 from rabbitmq/mk-metadata-store-initialized-health-check
New health checks for metadata store initialization
2025-01-28 22:33:17 -05:00
Michael Klishin 419e14a225
Merge pull request #13166 from rabbitmq/qq-duplicate-members-reported
QQ: make sure there are no duplicates on the list of nodes
2025-01-28 20:21:27 -05:00
Michael Klishin b8fccd96ed
'rabbitmq diagnostics check_if_metadata_store_is_initialized*': support --formatter=json 2025-01-28 19:26:54 -05:00
Michael Klishin 07ec1b4b50
New health check CLI commands 2025-01-28 16:44:37 -05:00
Michael Davis 8969e98819
bazel: Comment out `assert_suites` checks for apps with missing suites
`rabbitmq_management` is missing one suite definition and `rabbit_mqtt`
is missing two. `assert_suites` causes a build failure because of the
missing suites. This change comments out `assert_suites` for these apps
instead of adding the missing suite definitions because Bazel is no
longer used to test these apps.
2025-01-28 16:12:12 -05:00
Michael Davis 61a38d9212
bazel: Update `BUILD.ra` sources
This fixes an error while building `//:broker`. The Ra log v2 changes
(<https://redirect.github.com/rabbitmq/ra/pull/475>) merged with the
update to Ra 2.16.0 changed the set of modules in Ra. This change
reflects the new and deleted sources.
2025-01-28 16:06:21 -05:00
Michael Klishin cb81bb944a
HTTP API: add two new health checks, references #13153 2025-01-28 14:38:51 -05:00
Michal Kuratczyk 198d8f93d3
Make sure there are no duplicates on the nodes list
This is probably more of a CI bug than anything else - in CI we use
a lower tick value, which increases the odds of the periodic
repair triggering very early.

Failure:
https://github.com/rabbitmq/rabbitmq-server/actions/runs/13013004042/job/36295172214?pr=13050
2025-01-28 17:10:13 +01:00
Karl Nilsson 7862c2f501
Merge pull request #12713 from rabbitmq/ra-2.16.0
Ra v2.16.0
2025-01-28 16:00:08 +01:00
Karl Nilsson 70ade9615b bazel 2025-01-28 13:47:09 +00:00
Michael Klishin 2c3ee0eeba
Merge pull request #13164 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-28 07:54:43 -05:00
GitHub a013bb1d1c bazel run gazelle 2025-01-28 04:02:47 +00:00
Michael Klishin 9de2e3b81c
Merge pull request #13163 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/kotlin.version-2.1.10
build(deps): bump kotlin.version from 2.1.0 to 2.1.10 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2025-01-27 14:19:17 -05:00
dependabot[bot] a79ebc6a25
build(deps): bump kotlin.version
Bumps `kotlin.version` from 2.1.0 to 2.1.10.

Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.0 to 2.1.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.0...v2.1.10)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.0 to 2.1.10

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 18:38:45 +00:00
David Ansari 579c58603e Support AMQP over WebSocket (OSS part) 2025-01-27 17:50:47 +01:00
David Ansari 5a467934e3 Support AMQP over WebSocket in Erlang client
## What?
Implement the AMQP over WebSocket Binding Committee Specification 01 in
the AMQP 1.0 Erlang client:
https://docs.oasis-open.org/amqp-bindmap/amqp-wsb/v1.0/cs01/amqp-wsb-v1.0-cs01.html

 ## Why?
1. This allows writing integration tests for the server implementation
   of AMQP over WebSocket.
2. Erlang and Elixir clients can use AMQP over WebSocket in environments
   where firewalls prohibit access to the AMQP port.

 ## How?
Use gun as WebSocket client.

The new module `amqp10_client_socket` handles socket operations (open, close, send) for:
* TCP sockets
* SSL sockets
* WebSockets

Prior to this commit, the amqp10_client_connection process closed only the
write end of the socket after it sent the AMQP close performative.
This commit removed premature socket closure because:
1. There is no equivalent feature provided in Gun since sending a
   WebSocket close frame causes Gun to cleanly close the connection for
   both writing and reading.
2. It's unnecessary and can result in unexpected and confusing behaviour on the server.
3. It's better practive to keep the TCP connection fully open until
   the AMQP closing handshake completes.
4. When amqp10_client_frame_reader terminates, it will cleanly close
   the socket for both writing and reading.
2025-01-27 17:50:47 +01:00
Karl Nilsson e58b8ebc1d QQ: refactor add_member method to pass dialyzer
And be less confusing around the arguments that add_member/4 actually
takes.
2025-01-27 13:50:38 +00:00
Karl Nilsson 113b16bbc4 Use initial_machine_version config to avoid initalising
from rabbit_fifo version 0.

The same was also implemented for the stream coordinator.

QQ: avoid dead lock in queue federation.

When processing the queue federation startup even the process
may call back into the ra process causing a deadlock. in this
case we spawn a temporary process to avoid this.
2025-01-27 13:50:38 +00:00
Karl Nilsson f2b1f37331 QQ: Use new log_ext effect
This offloads the work of reading messages from on-disk segments
to the interacting process rather than doing this blocking, performance
affecting work in the ra server process.

QQ: ensure opened segments are closed after some time of inactivity

Processes that havea received messages that had to be read from disks
may keep a segment open indefinitely. This introduces a timer which
after some time of inactivity will close all opened segments to ensure
file descriptors are not kept open indefinitely.
2025-01-27 13:50:38 +00:00
Karl Nilsson 3a7a374190 Ra v2.16.0
This version of Ra contains a substantially refactored Ra log
implementation that provides higher throughput and lower
memory use in serveral scenarios.

New features:

* `log_ext` new effect type that instead of immedately reading
entries from the log it will instead provide a read plan for any
entries only located in segments.

* Machine version upgrades can now be be delayed until all
members are confirmed to support the new version.
This will avoid potential consumption pauses during upgrades.
2025-01-27 13:50:38 +00:00
Jean-Sébastien Pédron 75c4c3977d
Merge pull request #13099 from rabbitmq/use-node2-as-cluster-seed-node-in-ci
rabbitmq_ct_helpers: Use node 2 as the cluster seed node
2025-01-27 14:21:27 +01:00
Michal Kuratczyk e796b61f49
Simplified OCI builds
* use the official erlang image as the base
  (no more openssl and erlang recompilation)
* by default, build with OTP27 for x86 only but make it
  easy to request any other OTP version and an ARM64 image
* better docker layer caching
* simplify the workflow and the Dockerfile
2025-01-27 13:54:49 +01:00
Jean-Sébastien Pédron f549425615
rabbitmq_ct_broker_helpers: Use node 2 as the cluster seed node
[Why]
When running mixed-version tests, nodes 1/3/5/... are using the primary
umbrella, so usually the newest version. Nodes 2/4/6/... are using the
secondary umbrella, thus the old version.

When clustering, we used to use node 1 (running a new version) as the
seed node, meaning other nodes would join it.

This complicates things with feature flags because we have to make sure
that we start node 1 with new stable feature flags disabled to allow old
nodes to join.

This is also a problem with Khepri machine versions because the cluster
would start with the latest version, which old nodes might not have.

[How]
This patch changes the logic to use a node running the secondary
umbrella as the seed node instead. If there is no node running it, we
pick the first node as before.

V2: Revert part of "rabbitmq_ct_helpers: Fix how we set
    `$RABBITMQ_FEATURE_FLAGS` in tests" (commit
    57ed962ef6). These changes are no
    longer needed with the new logic.

V3: The check that verifies that the correct metadata store is used has
    a special case for nodes that use the secondary umbrella: if Khepri
    is supposed to be used but it's not, the feature flag is enabled.
    The reason is that the `v4.0.x` branch doesn't know about the `rel`
    configuration of `forced_feature_flags_on_init`. The nodes will
    have ignored thies parameter and booted with the stable feature
    flags only.

    Many testsuites are adapted to the new clustering order. If they
    manage which node joins which node, either the order is changed in
    the testcases, or nodes are started with only required feature
    flags. For testsuites that rely on peer discovery where the order is
    unknown, nodes are started with only required feature flags.
2025-01-27 12:08:12 +01:00
Michael Klishin 28602bea37
scripts/rabbitmqctl: allow standard input reads for 'import_definitions'
It was not listed in 7da7d4e1e, even though the command
accepts definitions via standard input.

References #10268.
Closes #13157.
2025-01-26 18:36:08 -05:00
Michael Klishin 643a58fdce
ctl import definitions: correct usage
it is likely a copy-paste artifact from
'ctl export_definitions' which does use '-'
as a target.

References #13157
2025-01-26 18:06:03 -05:00
Michael Klishin 3f9c92a81b
Merge pull request #13156 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-26 10:36:26 -05:00
GitHub 456d6e9a6e bazel run gazelle 2025-01-26 04:02:33 +00:00
Michael Klishin a3decfa69e
Merge pull request #13115 from rabbitmq/issue-13040
Support exchange federation with MQTT 5.0 subscribers
2025-01-25 16:25:26 -05:00