Commit Graph

47648 Commits

Author SHA1 Message Date
dcorbacho 6778c1fea3 Small code enhancements 2021-02-25 11:27:40 +01:00
Jean-Sébastien Pédron 561d2e660d
rabbit_env: Use consistent style 2021-02-25 11:13:23 +01:00
Jean-Sébastien Pédron ba6059b1eb
rabbitmq_stream_management: Ignore more dirs created by `gmake dist` 2021-02-25 10:51:25 +01:00
Jean-Sébastien Pédron a45e87e57b
mk/rabbitmq-run.mk: Compute rabbitmq_stream TCP port based on $(RABBITMQ_NODE_PORT)
We already do this for other TCP ports RabbitMQ listens on. This fixes
the use of `gmake start-cluster` with the rabbitmq_stream plugin
enabled.
2021-02-25 10:47:50 +01:00
Michael Klishin 98b46b2ffb
rabbit_env: pass Dialyzer again 2021-02-25 06:22:36 +03:00
Michael Klishin 7e93cc8d3b
rabbit_env: remove one more direct call to os:list_env_vars/0 2021-02-25 06:13:41 +03:00
Michael Klishin 26b676f021
Try ignore_xref 2021-02-25 06:11:18 +03:00
Michael Klishin cdd0c1662c
Pass xref on OTP 22 and 23 2021-02-25 06:08:16 +03:00
Michael Klishin 752f16abf7
os:list_env_vars/0 was renamed to os:env/0 in OTP 24 2021-02-25 01:10:40 +03:00
Michael Klishin 5f72779d57
Squash a warning on OTP 24 2021-02-25 01:06:41 +03:00
Michael Klishin cd1a271499
As of Lager 3.8.2, Lager has a log_root default
so override it unconditionally.
2021-02-25 00:43:02 +03:00
Michael Klishin 046db4be92
OTP 22 compatibility
(cherry picked from commit 652ffd2a15)
2021-02-24 22:37:55 +03:00
Michael Klishin 7ea841f5e9
Consumer utilization => consumer capacity in Prometheus metrics
the original metric is kept around for backwards compatibility.
2021-02-24 22:10:52 +03:00
Michael Klishin b04d1cc3db
Improve UI help hint for consumer capacity 2021-02-24 21:27:04 +03:00
Michael Klishin 93721bfa2d
Whitelist consumer_capacity in 'rabbitmqctl list_queues' 2021-02-24 21:26:46 +03:00
Michael Klishin 71c3eec506
Merge pull request #2842 from rabbitmq/mk-vesc-1003-shorter-direct-reply-to-key
Encode direct reply-to "client identifiers" in a more compact way
2021-02-24 21:00:24 +03:00
Michael Klishin f183ee4609
Adapt to the types used by string:lexemes/2 2021-02-24 20:41:32 +03:00
Michael Klishin 7ba2bde260
Correctly use string:lexemes/2 2021-02-24 20:31:10 +03:00
Michael Klishin 33d8ac4f79
Revisit type signatures that tripped up Dialyzer 2021-02-24 20:17:20 +03:00
Michael Klishin a11f98ccd8
Fall back to v1 direct reply-to encoding 2021-02-24 20:03:02 +03:00
Michael Klishin 00b7a84191
Limit direct reply-to identifier length growth
as node names grow.

Prior to this change, direct reply-to consumer channels
were encoded using term_to_binary/1, which means the result
would grow together with node name (since node name
is one of the components of an Erlang pid type).

This means that with long enough hostnames, reply-to
identifiers could overflow the 255 character limit of
message property field type, longstr.

With this change, the encoded value uses a hash of the node name
and then locates the actual node name from a map of
hashes to current cluster members.

In addition, instead of generating non-predictable "secure"
GUIDs the feature now generates "regular" predictable GUIDs
which compensates some of the additional PID pre- and post-processing
outlined above.
2021-02-24 18:21:26 +03:00
Michael Klishin 129a57dcef
Extract direct reply-to PID encoding into a new module 2021-02-24 18:21:26 +03:00
dcorbacho 930c78795c Rename consumer_utilisation to consumer_capacity
Capacity is 100% when there are online consumers and no messages
2021-02-24 16:20:52 +01:00
Michael Klishin f73e851f9c
Bump observer_cli to 1.6.0 2021-02-24 12:53:55 +03:00
Michael Klishin a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility 2021-02-24 12:53:30 +03:00
Gabriele Santomaggio c30861e334
Merge pull request #2838 from rabbitmq/rabbitmq-server-2837
Fix the docker image for use with uncompressed plugins
2021-02-23 13:56:30 +01:00
Philip Kuryloski e76f0e0bb4 Fix the docker image for use with uncompressed plugins
Historically the docker image build extracts the rabbitmqadmin cli from the
management .ez. This step is now conditional.
2021-02-23 12:40:55 +01:00
Philip Kuryloski 7c63b8e4fb Adjust the version and tag selection mechanism for `make docker-image`
The previous approach assumed `make package-generic-unix` had only been run once.
This borrows a snippet from rabbitmq-components.mk to select the `current` version
for the docker build by default.
2021-02-23 11:26:29 +01:00
Philip Kuryloski 15e6beea2a `make docker-image` no longer pushes the image by default
`make docker-image-push` maintains the previous behavior
2021-02-23 11:26:29 +01:00
Philip Kuryloski b1eaf8c9e2 Remove directories used by the server release pipeline
These directories are mutated by the server-release concourse
pipelines, and so their contents will remain in the separate
rabbitmq-packaging repository
2021-02-23 11:26:29 +01:00
Gerhard Lazu 9d798dedc1 Remove redundant SOURCE_DIST_FILE
It was a package-generic-unix dep requirement, which is now gone.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu 4f0973620d Build the docker image, don't just echo
Also, don't depend on package-generic-unix, otherwise that will be
re-built every time we want to build the docker image, which is
unnecessary. It will fail now if a generic-unix doesn't exist, but
that's OK.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu a937c6c7c7 Fix OPENSSL_PGP_KEY_IDS ENV in Dockerfile
I copied the pre-templating version from the official Dockerfile

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu aacec68c34 Use same docker config as the official rabbitmq image
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Philip Kuryloski d041315336 Revert "Remove the packaging directory"
This reverts commit 2067a68735.
2021-02-23 11:26:29 +01:00
Michael Klishin 9f089071d2
Log Shovel restart events 2021-02-23 12:42:06 +03:00
Michael Klishin b2b37f5626
Merge pull request #2791 from Appva/feature/jwks
Support fetching JWT signing keys from JWKS endpoint
2021-02-23 09:48:25 +03:00
Michael Klishin 0dc46b41de
Merge pull request #2833 from rabbitmq/oauth2-cuttlefish-support
Oauth2 cuttlefish support
2021-02-22 18:13:47 +03:00
Arnaud Cogoluègnes 047e87137c
No global response code for metadata in stream protocol 2021-02-22 15:24:24 +01:00
Arnaud Cogoluègnes 9696861181
Fix stream protocol documentation after review 2021-02-22 15:19:58 +01:00
Michael Klishin 2a5ee5b407
Destructure in the function head 2021-02-22 17:14:04 +03:00
Michael Klishin 0d615080f2
Remove a clause that would never match 2021-02-22 17:12:44 +03:00
Michael Klishin 2273797d36
Bindings in Erlang use CamelCase 2021-02-22 17:07:47 +03:00
Michael Klishin 7a4b0783c8
cuttlefish:unvalid/1 expects a string 2021-02-22 17:01:43 +03:00
Michael Klishin fb3818707e
Merge pull request #2830 from rabbitmq/fix-amqp1_0_reader-crashes
Fix AMQP 1.0 reader crashes
2021-02-22 15:49:53 +03:00
Michal Kuratczyk 53fc8ebbe0 Make the tests green
Fix the snippet and make it more through.
2021-02-22 13:35:30 +01:00
Arnaud Cogoluègnes b61be1e409
Mention stream protocol responses can have extra info 2021-02-22 11:42:34 +01:00
Michal Kuratczyk c729e15112 WIP: cuttlefish support for oauth2 plugin
No support for symmetric key key options as this would make the
implementation much more complex and shouldn't really be used anyway.

WIP becasue while the code seems to work but tests fail.
2021-02-22 10:33:35 +01:00
Loïc Hoguin 4fe0b2f24a
Don't crash on rabbit_net:setopts
This function may return an error tuple typically indicating
that the connection has been closed. In that case we perform
the same action as when the recv function returns the same.
2021-02-22 09:38:12 +01:00
Loïc Hoguin cdac517884
Fix conserve_resources alarm handling
The alarm must have changed format at some point and this
was not updated at the time.
2021-02-22 09:36:52 +01:00