Commit Graph

28092 Commits

Author SHA1 Message Date
Michael Klishin 01092ff31f
(c) year bumps 2024-01-01 22:02:20 -05:00
Michael Klishin f70f79bbbd
Merge pull request #10260 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.assertj-assertj-core-3.25.0
build(deps-dev): bump org.assertj:assertj-core from 3.24.2 to 3.25.0 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2024-01-01 20:41:59 -05:00
Michael Klishin 2308c1b8ae
Merge pull request #10259 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.assertj-assertj-core-3.25.0
build(deps-dev): bump org.assertj:assertj-core from 3.24.2 to 3.25.0 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2024-01-01 20:41:53 -05:00
dependabot[bot] 506dccb172
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 18:59:45 +00:00
dependabot[bot] f14b2d3755
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 18:42:24 +00:00
dependabot[bot] bccf9aec78
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 18:17:04 +00:00
Luke Bakken 3f33dfa227
Add -noinput via `rabbitmq-env`
Follow-up to #10131
2023-12-30 16:27:02 -08:00
Jean-Sébastien Pédron cee181b7a8
rabbit_db: Restart Ra systems after reset during join
[Why]
When the local node joins a remote node, it resets its own data first.
This includes the files of the Ra systems (`quorum` and `coordination`).

When the CLI is used, that's fine because the `rabbit` app is stopped
and thus the Ra systems.

However, when this is done as part of peer discovery, the node is
booting: the Ra systems were started earlier because they are required
to run Khepri. Therefore, the reset deletes files being used. This
breaks the Ra systems.

[How]
The Ra systems are stopped just before the reset (if the join is
performed as part of peer discovery) and they are restarted after.
2023-12-29 13:19:28 +01:00
Jean-Sébastien Pédron dfa2117719
rabbit_ra_systems: Fix logging domain in several messages
[Why]
The logging domain was missing, making messages inconsistent with other
log messages in this module.
2023-12-29 12:22:05 +01:00
Jean-Sébastien Pédron 193da83c6c
rabbit_ra_systems: Export `are_running/0`
[Why]
In a follow-up commit, we'll need to access this code specifically to
fix a bug in `rabbit_db_cluster:join/2`.

[How]
We query an internal Ra supervisor to determine if the children we are
interested in are running.

This should be improved with a new public API in Ra instead of
hard-coding Ra implementation details here.
2023-12-29 12:22:05 +01:00
Jean-Sébastien Pédron 6dea7da82b
rabbit_ra_systems: Export functions to start and stop all Ra systems
[Why]
In a follow-up commit, we'll need to access this code specifically to
fix a bug in `rabbit_db_cluster:join/2`.

[How]
* Export the existing `ensure_started/0` function.
* Add and export the `ensure_stopped/0` function.
2023-12-28 18:47:28 +01:00
Jean-Sébastien Pédron cb376a8ed1
rabbit_ra_systems: Isolate code starting Ra systems
[Why]
In a follow-up commit, we'll need to access this code specifically to
fix a bug in `rabbit_db_cluster:join/2`.
2023-12-28 18:47:28 +01:00
David Ansari 78b4fcc899 Allow MQTT QoS 0 subscribers to reconnect
The solution in #10203 has the following issues:
1. Bindings can be left ofter in Mnesia table rabbit_durable_queue.
One solution to 1. would be to first delete the old queue via
`rabbit_amqqueue:internal_delete(Q, User, missing_owner)`
and subsequently declare the new queue via
`rabbit_amqqueue:internal_declare(Q, false)`
However, even then, it suffers from:
2. Race conditions between `rabbit_amqqueue:on_node_down/1`
and `rabbit_mqtt_qos0_queue:declare/2`:
`rabbit_amqqueue:on_node_down/1` could first read the queue records that
need to be deleted, thereafter `rabbit_mqtt_qos0_queue:declare/2` could
re-create the queue owned by the new connection PID, and `rabbit_amqqueue:on_node_down/1`
could subsequently delete the re-created queue.

Unfortunately, `rabbit_amqqueue:on_node_down/1` does not delete
transient queues in one isolated transaction. Instead it first reads
queues and subsequenlty deletes queues in batches making it prone to
race conditions.

Ideally, this commit deletes all rabbit_mqtt_qos0_queue queues of the
node that has crashed including their bindings.
However, doing so in one transaction is risky as there may be millions
of such queues and the current code path applies the same logic on all
live nodes resulting in conflicting transactions and therefore a long
database operation.

Hence, this commit uses the simplest approach which should still be
safe:
Do not remove rabbit_mqtt_qos0_queue queues if a node crashes.
Other live nodes will continue to route to these dead queues.
That should be okay, given that the rabbit_mqtt_qos0_queue clients auto
confirm.
Continuing routing however has the effect of counting as routing result
for AMQP 0.9.1 `mandatory` property.
If an MQTT client re-connects to a live node with the same client ID,
the new node will delete and then re-create the queue.
Once the crashed node comes back online, it will clean up its leftover
queues and bindings.
2023-12-27 20:47:06 -05:00
Ariel Otilibili 0b24d3c0bb Defined "tags" as list
Typo spotted in #4050
2023-12-27 22:47:52 +01:00
Michael Klishin 89cd282745
Merge pull request #10243 from rabbitmq/fix-issue-in-authnz-messaging-suites
Use correct user to test authentication via various messaging protocols
2023-12-27 14:02:58 -05:00
Lajos Gerecs 82e25af5d5
Grafana: make sure dashboards do not break when detailed metrics are used (#5945)
* Fix broken dashboards if detailed metrics are used

If detailed metrics are pulled into the same prometheus, then
we get an error in Grafana:

execution: many-to-many matching not allowed:
matching labels must be unique on one side

This is because both endpoints provide `rabbit_identity_info`
which is not unique to the endpoint.

* add detailed metric scraper to prometheus config

---------

Co-authored-by: Michal Kuratczyk <michal.kuratczyk@broadcom.com>
2023-12-27 15:44:05 +01:00
Marcial Rosales b9f3771f2d Use correct user to authenticate
depending on the backend we want to
exercise
2023-12-27 14:03:26 +00:00
Karl Nilsson 10fb936b84
QQ: Avoid secondary process when repairing leader record. (#10193)
* QQ: Avoid secondary process when repairing leader record.

* QQ: wait for projections before starting Ra cluster

If the leader selected is on a remote node and khepri_db is
enabled.

* dialyzer

* Fix dialyzer complaint

---------

Co-authored-by: Diana Parra Corbacho <diana.parra-corbacho@broadcom.com>
2023-12-27 13:29:53 +01:00
Michael Klishin a3815d8981
Merge pull request #10239 from rabbitmq/dependabot/maven/deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests/main/org.apache.maven.plugins-maven-compiler-plugin-3.12.1
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.0 to 3.12.1 in /deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests
2023-12-25 16:59:42 -05:00
Michael Klishin ed9153a45f
Merge pull request #10238 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.12.1
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.0 to 3.12.1 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2023-12-25 16:59:36 -05:00
Michael Klishin bf71c96244
Merge pull request #10237 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.12.1
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.0 to 3.12.1 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2023-12-25 16:59:28 -05:00
dependabot[bot] c7833ecc51
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 18:23:51 +00:00
dependabot[bot] ce8532c280
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 18:22:44 +00:00
dependabot[bot] 53790d08d9
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 18:17:45 +00:00
dependabot[bot] 67b8d30281
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.0...maven-compiler-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 18:09:25 +00:00
Michael Klishin 5af5f0cf3d
Selenium: update run-suites.sh argument to match #10200 2023-12-23 20:33:21 -05:00
Michael Klishin a374f40303
Merge pull request #10200 from rabbitmq/propagate_credentials_to_http_backend
Propagate all credentials to http backend
2023-12-23 19:09:48 -05:00
Michael Klishin 920c664fa3
Add a test originally introduced in #10062 2023-12-23 19:09:35 -05:00
Michael Klishin 0734e35614
HTTP authN/authZ backed examples: update (c) headers 2023-12-23 18:40:38 -05:00
Michael Klishin 81d79293d9
Merge pull request #10225 from ariel-anieli/pr-boolean-types
Replaced true | false by boolean()
2023-12-22 22:41:20 -05:00
Michael Klishin ec2bbb4ea3
More cosmetics 2023-12-22 22:31:46 -05:00
Michael Klishin 83d7920166
authN/authZ backend HTTP: cosmetics 2023-12-22 22:31:12 -05:00
Ariel Otilibili 336d0e5101 Replaced true | false by boolean() 2023-12-22 17:28:52 +01:00
Ariel Otilibili 4c8f7a8df2 Changed comments 2023-12-22 17:28:42 +01:00
Ariel Otilibili e1d09fbba6 Replaced true | false by boolean() 2023-12-22 17:28:31 +01:00
Michael Klishin 87c961b892
Use snake_case for these two functions 2023-12-22 10:10:14 -05:00
Marcial Rosales f3c4355cfb Clean up 2023-12-22 14:29:53 +00:00
Marcial Rosales 04658fbb6f Improve docs wording 2023-12-22 14:05:05 +00:00
Marcial Rosales f824bf0ac3 Update docs 2023-12-22 13:57:46 +00:00
Marcial Rosales 2fc8d2b3ae Propagate all credentials to http backend 2023-12-22 13:54:34 +00:00
Ariel Otilibili be302c2df6 [deps/rabbitmq_aws] Labelled boolean arguments in perform_request_has_creds/9 & perform_request_creds_expired/9 2023-12-22 14:09:19 +01:00
Ariel Otilibili 8c65469d62 [deps/rabbitmq_aws] Replaced boolean() instead of true | false 2023-12-22 14:05:52 +01:00
Ariel Otilibili 9b40af4eb2 [deps/rabbitmq_aws] Typos 2023-12-22 14:04:30 +01:00
Michael Klishin 6ba5489b82
Merge pull request #10209 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/kotlin.version-1.9.22
build(deps): bump kotlin.version from 1.9.21 to 1.9.22 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2023-12-21 13:42:35 -05:00
Michael Klishin d6734e3d60
Merge pull request #10208 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/org.springframework.boot-spring-boot-starter-parent-3.2.1
build(deps): bump org.springframework.boot:spring-boot-starter-parent from 3.2.0 to 3.2.1 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2023-12-21 13:42:29 -05:00
dependabot[bot] a295800102
build(deps): bump kotlin.version
Bumps `kotlin.version` from 1.9.21 to 1.9.22.

Updates `org.jetbrains.kotlin:kotlin-test` from 1.9.21 to 1.9.22
- [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/v1.9.21...v1.9.22)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 1.9.21 to 1.9.22

---
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>
2023-12-21 18:41:52 +00:00
dependabot[bot] 11cc1f0604
build(deps): bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.0...v3.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 18:40:59 +00:00
dependabot[bot] 92db0d3069
build(deps): bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.0...v3.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 18:33:50 +00:00
David Ansari 9487189dc6 Overwrite rabbit_mqtt_qos0_queue record from crashed node
When a node is shut down cleanly, the rabbit_mqtt_qos0_queue record is
removed from Mnesia.
When a node crashes and subsequently reboots the new node incarnation
removes the old rabbit_mqtt_qos0_queue record from Mnesia (via
rabbit_mqtt_qos0_queue:recover/2)

However, when a node crashes, the rabbit_mqtt_qos0_queue will be removed
from Mnesia table rabbit_queue, but will still be present in table
rabbit_durable_queue on the other live nodes.
Prior to this commit, when the same MQTT client (i.e. same MQTT client
ID) re-connects from the crashed node to another live node and
re-subscribes, the following error occurred:
```
[info] <0.43155.0> Accepted MQTT connection 10.105.0.18:60508 -> 10.105.0.10:1883 for client ID nodered_24e214feb018a232
[debug] <0.43155.0> Received a SUBSCRIBE for topic(s) [{mqtt_topic,
[debug] <0.43155.0>                                        <<"as923/gateway/+/command/#">>,0}]
[error] <0.43155.0> Failed to declare queue 'mqtt-subscription-nodered_24e214feb018a232qos0' in vhost '/': {absent,
[error] <0.43155.0>                                                                                         {amqqueue,
[error] <0.43155.0>                                                                                          {resource,
[error] <0.43155.0>                                                                                           <<"/">>,
[error] <0.43155.0>                                                                                           queue,
[error] <0.43155.0>                                                                                           <<"mqtt-subscription-nodered_24e214feb018a232qos0">>},
[error] <0.43155.0>                                                                                          true,
[error] <0.43155.0>                                                                                          false,
[error] <0.43155.0>                                                                                          <15486.32690.0>,
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          <15486.32690.0>,
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          [{vhost,
[error] <0.43155.0>                                                                                            <<"/">>},
[error] <0.43155.0>                                                                                           {name,
[error] <0.43155.0>                                                                                            <<"ha-all-mqtt">>},
[error] <0.43155.0>                                                                                           {pattern,
[error] <0.43155.0>                                                                                            <<"^mqtt-">>},
[error] <0.43155.0>                                                                                           {'apply-to',
[error] <0.43155.0>                                                                                            <<"all">>},
[error] <0.43155.0>                                                                                           {definition,
[error] <0.43155.0>                                                                                            [{<<"ha-mode">>,
[error] <0.43155.0>                                                                                              <<"all">>}]},
[error] <0.43155.0>                                                                                           {priority,
[error] <0.43155.0>                                                                                            0}],
[error] <0.43155.0>                                                                                          undefined,
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          undefined,
[error] <0.43155.0>                                                                                          live,
[error] <0.43155.0>                                                                                          0,
[error] <0.43155.0>                                                                                          [],
[error] <0.43155.0>                                                                                          <<"/">>,
[error] <0.43155.0>                                                                                          #{user =>
[error] <0.43155.0>                                                                                             <<"iottester">>},
[error] <0.43155.0>                                                                                          rabbit_mqtt_qos0_queue,
[error] <0.43155.0>                                                                                          #{}},
[error] <0.43155.0>                                                                                         nodedown}
[error] <0.43155.0> MQTT protocol error on connection 10.105.0.18:60508 -> 10.105.0.10:1883: subscribe_error
```

This commit fixes this error allowing an MQTT client that connects with CleanSession=true and
subscribes with QoS 0 to re-connect and re-subscribe to another live
node if the original Rabbit node crashes.

Reported in https://groups.google.com/g/rabbitmq-users/c/pxgy0QiwilM/m/LkJQ-3DyBgAJ
2023-12-21 17:30:15 +01:00
Jean-Sébastien Pédron 0816c2fc60
rabbit_peer_discovery: Wrap long line in add_tls_arguments/2 2023-12-21 13:38:29 +01:00