Commit Graph

58467 Commits

Author SHA1 Message Date
Michael Klishin 15b924b05e Revert "Actions, alpha build: try passing in a different prerelease_identifier"
This reverts commit de0d8cf70b.
2024-11-03 22:56:47 -05:00
Michael Klishin de0d8cf70b Actions, alpha build: try passing in a different prerelease_identifier 2024-11-03 22:56:22 -05:00
Michael Klishin a1e78dc2df Actions: trigger alpha build workflow run when workflow itself changes 2024-11-03 22:53:04 -05:00
Michael Klishin 4fb989c99d Actions: try a using short commit SHA for alpha identifier 2024-11-03 22:52:07 -05:00
Michael Klishin 313e042d1d
Merge pull request #12639 from rabbitmq/mk-actions-notify-server-trigger-packages-workflow
4.1.x: new Actions workflow for triggering alpha releases
2024-11-03 22:47:26 -05:00
Michael Klishin b063a9910e Use a known repository_dispatch event type 2024-11-03 22:45:42 -05:00
Michael Klishin 2278e4cee8 New workflow for triggering alpha releases
in rabbitmq/server-packages, an Actions-only
repo dedicated to open source RabbitMQ release
automation.
2024-11-03 22:23:35 -05:00
Michael Klishin 92a40463f8
Update SECURITY.md 2024-11-03 21:52:30 -05:00
David Ansari 3db4a97cfb Expose AMQP connection metrics
Expose the same metrics for AMQP 1.0 connections as for AMQP 0.9.1 connections.

Display the following AMQP 1.0 metrics on the Management UI:
* Network bytes per second from/to client on connections page
* Number of sessions/channels on connections page
* Network bytes per second from/to client graph on connection page
* Reductions graph on connection page
* Garbage colletion info on connection page

Expose the following AMQP 1.0 per-object Prometheus metrics:
* rabbitmq_connection_incoming_bytes_total
* rabbitmq_connection_outgoing_bytes_total
* rabbitmq_connection_process_reductions_total
* rabbitmq_connection_incoming_packets_total
* rabbitmq_connection_outgoing_packets_total
* rabbitmq_connection_pending_packets
* rabbitmq_connection_channels

The rabbit_amqp_writer proc:
* notifies the rabbit_amqp_reader proc if it sent frames
* hibernates eventually if it doesn't send any frames

The rabbit_amqp_reader proc:
* does not emit stats (update ETS tables) if no frames are received
or sent to save resources when there are many idle connections.
2024-11-02 19:08:24 +01:00
Michael Klishin ef2c8dfbda
Merge pull request #12636 from rabbitmq/gh-12635
QQ: handle case where a stale read request results in member crash.
2024-11-01 13:23:43 -04:00
Karl Nilsson 94e677987f QQ: handle case where a stale read request results in member crash.
It is possible for a slow running follower with local consumers
to crash after a snapshot installation as it tries to read an entry
from its log that is no longer there (as it has been consumed and
completed by another node but still refers to prior consumers on the
current node).

This commit makes the log effect callback function more defensive
to check that the number of commands returned by the log effect
isn't different from what was requested. if it is different we
consider this a stale read request and return no further effects.
2024-11-01 11:37:20 +00:00
Michael Klishin 889fdc9163
Merge pull request #12634 from rabbitmq/gazelle-main
bazel run gazelle
2024-11-01 00:31:21 -04:00
GitHub fa0067c22d bazel run gazelle 2024-11-01 04:02:26 +00:00
Michael Klishin 030380a4c1
Merge pull request #12629 from rabbitmq/mk-run-aws-peer-discovery-workflow-on-a-schedule
Reduce AWS peer discovery workflow run rate
2024-10-31 14:25:50 -04:00
Michael Klishin 67bc9504ed
Merge pull request #12617 from rabbitmq/amqp-log-macro
Use log macros for AMQP
2024-10-31 14:25:42 -04:00
Michael Klishin df0b76705b Actions deps: manually apply #12630 #12631 2024-10-31 14:22:59 -04:00
Michael Klishin 893a349f44 Reduce AWS peer discovery workflow run rate
By running it

 * On push, when relevant code paths change
 * Every Monday morning

The peer discovery subsystem does not change
particularly often, and this plugin in particular
does not. Nonetheless, we currently run it for
every push unconditionally.
2024-10-31 13:50:19 -04:00
Michael Klishin bf4f7a4839
Merge pull request #12624 from rabbitmq/ci-flakes
Fixes for CI flakes
2024-10-31 11:10:21 -04:00
Diana Parra Corbacho 0df71d54cb Test: metrics_SUITE queue_idemp wait for queue metrics 2024-10-31 09:39:44 +01:00
Diana Parra Corbacho e1c22a0d2a Test: wait for metrics 2024-10-31 09:05:40 +01:00
Diana Parra Corbacho 34c1fd13d9 Tests: wait for connection closed in metrics_SUITE 2024-10-31 09:05:30 +01:00
Michael Klishin 7b04b4f885
Merge pull request #12616 from rabbitmq/abort-restart-cluster-on-failure
Make (rabbitmq-run.mk): abort restart-cluster if something goes wrong
2024-10-30 13:11:01 -04:00
Michael Klishin 5f6b1ccfb5
Merge pull request #12604 from rabbitmq/mqtt-fix-ssl-variable-name
MQTT, x.509 certificate-based authentication: use the correct key name for the TLS SAN type configuration parameter
2024-10-30 11:16:15 -04:00
David Ansari dbd9ede67b Use log macros for AMQP
Using a log macro has the benefit that location data is added as
explained in https://www.erlang.org/doc/apps/kernel/logger.html#t:metadata/0
2024-10-30 14:50:05 +01:00
Jean-Sébastien Pédron b9328fe586
Merge pull request #12466 from rabbitmq/enable-required-feature-flags-during-sync
rabbit_feature_flags: Introduce hard vs. soft required feature flags
2024-10-30 14:31:45 +01:00
Michal Kuratczyk 2c0fc70135
Abort restart-cluster if something goes wrong
For example, if the first restarted node doesn't start,
don't try to restart the other nodes. This mimics what
orchestrators such as Kubernetes or BOSH would do
(although they perform this check differently)
2024-10-30 12:58:35 +01:00
Jean-Sébastien Pédron 3c15d7e3e6
rabbit_feature_flags: Log controller task on a single line 2024-10-30 11:12:40 +01:00
Jean-Sébastien Pédron 2abec68708
rabbit_feature_flags: Report feature flags init error reason
[Why]
`failed_to_initialize_feature_flags_registry` was a little too vague.
2024-10-30 11:12:40 +01:00
Jean-Sébastien Pédron ea899602b0
rabbit_feature_flags: Introduce hard vs. soft required feature flags
[Why]
Before this patch, required feature flags were basically checked during
boot: they must have been enabled when they were mere stable feature
flags. If they were not, the node refused to boot.

This was easy for the developer because making a feature flag required
allowed to remove the entire compatibility code. Very satisfying.

Unfortunately, this was a pain point to end users, especially those who
did not pay attention to RabbitMQ and the release notes and were just
asking their package manager to update everything. They could end up
with a node that refuse to boot. The only solution was to downgrade,
enable the disabled stable feature flags, upgrade again.

[How]
This patch introduces two levels of requirement to required feature
flags:
* `hard`: this corresponds to the existing behavior where a node will
  refuse to boot if a hard required feature flag is not enabled before
  the upgrade.
* `soft`: such a required feature flag will be automatically enabled
  during the upgrade to a version where it is marked as required.

The level of requirement is set in the feature flag definition:

    -rabbit_feature_flag(
       {my_feature_flag,
        #{stability     => required,
	  require_level => hard
         }}).

The default requirement level is `soft`. All existing required feature
flags have now a requirement level of `hard`.

The handling of soft required feature flag is done when the cluster
feature flags states are verified and synchronized. If a required
feature flag is not enabled yet, it is enabled at that time.

This means that as developers, we will have to keep compatibility code
forever for every soft required feature flag, like the feature flag
definition itself.
2024-10-30 11:12:18 +01:00
Jean-Sébastien Pédron beebf76721
Merge pull request #12613 from rabbitmq/start-broker-once-in-rabbit_prometheus_http_SUITE-special_chars-group
rabbit_prometheus_http_SUITE: Start broker once in `special_chars` group
2024-10-30 11:11:50 +01:00
David Ansari 1778bc22aa Support AMQP 1.0 token renewal
Closes #9259.

 ## What?
Allow an AMQP 1.0 client to renew an OAuth 2.0 token before it expires.

 ## Why?
This allows clients to keep the AMQP connection open instead of having
to create a new connection whenever the token expires.

 ## How?
As explained in https://github.com/rabbitmq/rabbitmq-server/issues/9259#issuecomment-2437602040
the client can `PUT` a new token on HTTP API v2 path `/auth/tokens`.
RabbitMQ will then:
1. Store the new token on the given connection.
2. Recheck access to the connection's vhost.
3. Clear all permission caches in the AMQP sessions.
4. Recheck write permissions to exchanges for links publishing to
   RabbitMQ, and recheck read permissions from queues for links
   consuming from RabbitMQ. The latter complies with the user
   expectation in #11364.
2024-10-30 10:42:40 +01:00
Jean-Sébastien Pédron d6024e30f4
rabbit_prometheus_http_SUITE: Start broker once in `special_chars` group
`init_per_group/3`, which starts the broker, was already called earlier
in the function.

This fixes a bug where the node can't be stopped in `end_per_group/2`,
attecting the next group ability to start one.
2024-10-30 10:08:56 +01:00
Michael Klishin 3df967566f
Merge pull request #12610 from rabbitmq/federation-flake
Fix rabbitmq_federation queue_SUITE flake
2024-10-29 12:29:59 -04:00
Marcial Rosales e7cb2420a7 Verify non-zero DNS and email SAN 2024-10-29 16:41:20 +01:00
Marcial Rosales 4c1099950d Use the correct variable name 2024-10-29 16:41:20 +01:00
Diana Parra Corbacho 02bca637e1 queue_SUITE: use a different upstream for each queue on multi-federation tests 2024-10-29 16:01:07 +01:00
David Ansari 444df0029b
Merge pull request #12606 from rabbitmq/amqp-event-exchange
Add AMQP 1.0 event exchange test
2024-10-29 14:19:28 +01:00
Jean-Sébastien Pédron a184f6ad8f
Merge pull request #12605 from rabbitmq/fix-restart-cluster-make-recipe
rabbitmq-run.mk: Fix `restart-cluster` recipe
2024-10-29 12:19:23 +01:00
David Ansari f55cd21e52 Add AMQP 1.0 event exchange test 2024-10-29 12:04:09 +01:00
Jean-Sébastien Pédron c0be3c0648
rabbitmq-run.mk: Restart nodes in a cluster sequentially
... not in parallel.
2024-10-29 11:41:20 +01:00
Jean-Sébastien Pédron 624d9bae0c
rabbitmq-run.mk: Use a 60 seconds timeout for `rabbitmqctl wait`
... not 60 milliseconds.
2024-10-29 11:37:50 +01:00
Michael Klishin 3e57a38e1c Fix a typo in 4.0.3 release notes 2024-10-28 16:58:17 -04:00
Michael Klishin 7a96c2dd1c
Merge pull request #12601 from rabbitmq/mk-4.0.3-release-notes
4.0.3 release notes
2024-10-28 15:52:24 -04:00
Michael Klishin 17d5d82e1d 4.0.3 release notes 2024-10-28 15:52:02 -04:00
Lois Soto Lopez 2577b7e284 Remove extra keys from `gather_policy_config` out 2024-10-28 12:54:00 +01:00
Michael Klishin 69aed84c52
Merge pull request #12592 from rabbitmq/mk-management-ui-escpn
Use fmt_string in this error message
2024-10-25 22:49:15 -04:00
Michael Klishin 8ad8d3197e Use fmt_string in this error message 2024-10-25 22:14:41 -04:00
Michael Klishin d0b5605746
Merge pull request #12590 from rabbitmq/metrics-suite-flake
Fix metrics_SUITE connection_metrics flake
2024-10-25 13:44:35 -04:00
Diana Parra Corbacho 4e92841a9f Fix metrics_SUITE connection_metrics flake 2024-10-25 18:07:41 +02:00
Loïc Hoguin b351149e2f
Merge pull request #12558 from rabbitmq/loic-make-ci-mixed-versions
Make CI: Mixed version testing
2024-10-25 16:57:41 +02:00