Commit Graph

59967 Commits

Author SHA1 Message Date
Michael Klishin dbff137e4a
Address review feedback #14425 2025-08-25 14:14:45 -04:00
Michael Klishin 3043dc621f
Shovel: introduce operating modes
Sometimes you want a plugin to act as a library
and not an application. That is, for its modules
to be available at compile time and on a running
node but, say, the actual runtime parameter
handling and supervision of shovels to be
handled by another plugin.

Since we do not currently have a concept of
"library plugins" or "library dependencies",
this approach demonstrates one example of how
some plugins can be used as libraries.
2025-08-25 13:37:49 -04:00
D Corbacho e4bc525b5e
Merge pull request #14421 from rabbitmq/local-shovel-default-user-pass
Local shovels: Set default user/pass for uris like "amqp://"
2025-08-25 12:36:47 +02:00
Diana Parra Corbacho f990f7e271 Local shovels: Set default user/pass for uris like "amqp://" 2025-08-25 11:34:57 +02:00
Michael Klishin 7be4189deb
Merge pull request #14418 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-78890361d1
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-08-23 22:44:55 -04:00
Michael Klishin 307b61f94b
Merge pull request #14415 from rabbitmq/shovel-10-delete-after
Shovel amqp1.0: fix delete after validation
2025-08-23 22:44:40 -04:00
dependabot[bot] 7a51ce7c88
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.4 to 3.5.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.4...v3.5.5)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.4 to 3.5.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.4...v3.5.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-23 18:31:14 +00:00
Diana Parra Corbacho b6d831b115 Shovel amqp1.0: fix delete after validation
Queue-length is not supported, so it should fail already during validation and
not shovel startup
2025-08-23 13:26:46 +02:00
Michael Klishin 425a9d604b
Merge pull request #14401 from rabbitmq/qq-drain-chunks
QQ: when invoking drain only shut down small batches at a time
2025-08-22 18:19:52 -04:00
Michael Klishin 42b3caa964
Cosmetics #14401 2025-08-21 19:08:31 -04:00
Karl Nilsson 87154f9b03 QQ: when invoking drain only shut down small batches at a time
Then wait for elections to complete before shutting further
members down.

This should help avoid election storms when enabling maintenance
mode.

Transfer khepri before queues to ensure meta data store is
ready to accept pid updates.

Some other state related tweaks.
2025-08-21 09:17:55 +01:00
Michael Klishin c7f6cad331
Shovel: ignore expected log exceptions in local_SUITE 2025-08-20 19:23:33 -04:00
Michael Klishin 4a2d2964af
Merge pull request #14410 from rabbitmq/set-max-open-files
Add RABBITMQ_MAX_OPEN_FILES variable to the startup script
2025-08-20 13:05:55 -04:00
Michael Klishin 0da03c901e
Merge pull request #14256 from rabbitmq/local-shovel
By @dcorbacho and me: introduce [cluster-]local shovels, adopt message containers for shovels
2025-08-20 11:26:26 -04:00
Michal Kuratczyk ad3fccf5eb
Add RABBITMQ_MAX_OPEN_FILES variable to the startup script
In some environments it may be tricky to run a command
before RabbitMQ is started. Kubernetes For example, upgrading
to Containerd 2.0 accidentally lowered the value of available
descriptors in GKE
(https://cloud.google.com/kubernetes-engine/docs/troubleshooting/known-issues#containerd-ulimit-reduced).
While this particular issue is resolved in newer GKE versions,
it was a good example of why a variable like this would be helpful.
Kubernetes-level solutions (on the node or with a daemonset) would
require a different level of access for users.
2025-08-20 15:28:54 +02:00
Jean-Sébastien Pédron 115623220c
Merge pull request #14407 from rabbitmq/fix-topic-permissions-definitions-import
rabbit_definitions: Import topic permissions after exchanges
2025-08-20 13:57:36 +02:00
Jean-Sébastien Pédron 5bcbfadcd6
rabbit_db_exchange: Relax conditions when creating an exchange with Khepri
[Why]
When the module wanted to create an exchange in Khepri, it used
`rabbit_khepri:create/2` which ensures that the tree node doesn't exist
before. If the tree node exists, it expects it to contain an exchange
record which is returned to the caller, indicating an exchange with that
name already exists.

However, there are several other resources stored under an exchange tree
node, like bindings and topic permissions.

In particular, during a definitions import, topic permissions used to be
imported before exchanges. This caused a crash because the write of the
topic permission automatically created a parent tree node for the
exchange it dpends on, but without an exchange record obviously (see
previous commit).

[How]
As an addition improvement to the previous commit, we change the
conditions: instead of matching on the fact the tree node doesn't exist,
the module also accepts that the tree node exists but has no payload.
Under any of these conditions, the exchange is considered to be new and
written to Khepri.
2025-08-20 12:05:59 +02:00
Jean-Sébastien Pédron 92c572e887
rabbit_definitions: Import topic permissions after exchanges
[Why]
Topic permissions depend on an exchange, in addition to a user and a
vhost like other permissions.

This fixes a bug where an exchange imported after a topic permission
that depends on it caused the following crash when Khepri is used:

    {case_clause,{error,{khepri,mismatching_node,
                                #{node_name => <<"exchange_name">>,
                                  node_props => #{payload_version => 1},
                                  node_path =>
                                      [rabbitmq,vhosts,<<"/">>,exchanges,
                                       <<"exchange_name">>],
                                  condition => {if_node_exists,false},
                                  node_is_target => true}}}}

The crash comes from the fact that the exchange code expect to either
create the tree node in Khepri for that exchange, or there is an
existing tree node holding an exchange tree node. Here, there was a tree
node created implicitly when the topic permission was stored, but that
tree node didn't have an exchange record (because the exchange was not
imported yet).

[How]
We simply swap the import of topic permissions and exchanges.
2025-08-20 11:52:38 +02:00
Michael Klishin b76e634e07
Merge pull request #14402 from rabbitmq/stream-close-connection-if-update-secret-fails
Close stream connection if secret update fails
2025-08-19 14:57:00 -04:00
Michael Klishin c77751e620
Merge pull request #14403 from rabbitmq/stream-close-connection-if-unauthorized-vhost-after-secret-update
Close stream connection if unauthorized vhost after secret update
2025-08-19 14:56:15 -04:00
Michael Klishin 173876c982
More log message edits #14403 2025-08-19 14:06:15 -04:00
Michael Klishin a9f7bf1fbc
Log virtual host name if updated token lacks the permissions for it #14403 2025-08-19 14:05:31 -04:00
Michael Klishin e7634679d1
More log message edits #14403 2025-08-19 13:58:47 -04:00
Michael Klishin 55d6419bcd
More log message edits #14403 2025-08-19 13:44:50 -04:00
Michael Klishin 147dfb0e70
Log message wording #14402
(cherry picked from commit 987f5519e6)
2025-08-19 13:17:36 -04:00
Michael Klishin 987f5519e6
Log message wording #14402 2025-08-19 13:09:57 -04:00
Arnaud Cogoluègnes ba8745ab4b
Close stream connection if vhost not authorized after secret update 2025-08-19 16:47:47 +02:00
Michael Klishin ce8fa317cf
Merge branch 'main' into local-shovel
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
2025-08-19 10:44:39 -04:00
Arnaud Cogoluègnes 02449bd5d3
Close stream connection if secret update fails 2025-08-19 14:58:04 +02:00
Diana Parra Corbacho 212ae64c2d Local shovels: place behind rabbitmq_4.0.0 feature flag 2025-08-19 11:52:08 +02:00
Michael Klishin 4d60fc4ab7
Merge pull request #14399 from rabbitmq/mk-configure-metadata-store-and-feature-flag-relative-operations
Make rabbit_ct_broker_helpers:configure_metadata_store/1 handle relative feature flag op lists
2025-08-18 21:07:50 -04:00
Michael Klishin 03b28891d5
Make rabbit_ct_broker_helpers:configure_metadata_store/1 handle relative feature flag op lists
The function relies on such a relative list itself but
does not assume that a test suite could use it.
2025-08-18 20:33:16 -04:00
Michael Klishin 1d9c156829
rabbit.forced_feature_flags_on_init: document relative operations
{rel, ListToAdd, ListToSkip} values can be particularly
useful in certain suits.
2025-08-18 19:04:32 -04:00
Michael Klishin a1a49ff447
Doc cosmetics: mnevis => khepri_db 2025-08-18 19:00:13 -04:00
Michael Klishin d475a0e95f
Rename a Shovel key to 'shovel.local.max_credit' 2025-08-18 11:42:00 -04:00
Diana Parra Corbacho 4452872042 Local shovels: Update default credit 2025-08-18 16:50:31 +02:00
Diana Parra Corbacho a419ab3708 Shovels: re-order confirmation and unacked update 2025-08-18 16:40:03 +02:00
Michael Klishin 268a16cb68
Merge pull request #14393 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-32feef746b
[skip ci] bump the dev-deps group across 1 directory with 2 updates
2025-08-17 13:47:25 -04:00
dependabot[bot] 3665ee3a03
[skip ci] bump the dev-deps group across 1 directory with 2 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.


Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.0 to 2.2.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.0...v2.2.10)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.0 to 2.2.10

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-16 18:08:59 +00:00
Michael Klishin 43f38ce546
rabbitmq_shovel.schema: remove an outdated link 2025-08-15 11:49:37 -04:00
Diana Parra Corbacho 6bb649a9df Local shovels: single acks
For some reason, multiple acknowledgments are really slow when using credit flow v2
2025-08-14 15:40:40 +02:00
Jean-Sébastien Pédron e3298812c9
Merge pull request #14384 from rabbitmq/test-issue-12934
clustering_recovery_SUITE: Add `recover_after_partition_with_leader` testcase
2025-08-14 14:24:01 +02:00
Diana Parra Corbacho 382fac3e34 Local shovels: remove stashed credit request 2025-08-14 12:39:26 +02:00
Jean-Sébastien Pédron 4f1c6f0bde
clustering_recovery_SUITE: Add `recover_after_partition_with_leader` testcase
[Why]
The testcase tries to replicate the steps described in issue #12934.

[How]
It uses intermediate Erlang nodes between the common_test control node
and the RabbitMQ nodes, using `peer` standard_io communication. The goal
is to make sure the common_test control node doesn't interfere with the
nodes the RabbitMQ nodes can see, despite the blocking of the Erlang
distribution connection.

So far, I couldn't reproduce the problem reported in #12934. @mkuratczyk
couldn't either, so it might have been fixed as a side effect of another
change...

References #12934.
2025-08-14 12:10:52 +02:00
Michael Klishin 0da2ee8e71
Merge pull request #14381 from lukebakken/lukebakken/pr-14118-followup
Do not "pre convert" `running_nodes` to strings
2025-08-13 15:49:15 -04:00
Luke Bakken 3e235a6316
Do not "pre convert" `running_nodes` to strings
Follow-up to #14118
2025-08-13 12:01:18 -07:00
Diana Parra Corbacho 3349321c58 Local shovels: fix credit flow 2025-08-13 19:30:19 +02:00
Diana Parra Corbacho 02fcbc0dc5 Local shovels: optimisation 2025-08-13 14:13:12 +02:00
Diana Parra Corbacho edf0e3c1ff Local shovel: remove unused clause 2025-08-13 13:54:52 +02:00
Diana Parra Corbacho 07a085365e Local shovels: optimisations 2025-08-13 12:59:40 +02:00