Commit Graph

1959 Commits

Author SHA1 Message Date
Michal Kuratczyk 1a2126676d Update CLA URL 2021-09-23 14:29:36 +02:00
Philip Kuryloski 5fd9d1f638 Use Ranch 2.1.0 in bazel build
Matches 063d32626d
2021-09-10 14:46:36 +02:00
Michael Klishin 5bfbe5b8b1
Merge pull request #3233 from britto/fix-ensure-safe-call-timeout-clause
Fix typo in ensure_safe_call_timeout/2
2021-07-26 23:48:39 +03:00
João Britto a27a9fd214 Adjust initial gen_server_call_timeout
to prevent `amqp_connection:start/2` from logging a warning when we use default
values.

The default for `connection_timeout` is already 60000. When we don't explicitly
set it to a lower value, `amqp_connection:maybe_update_call_timeout/2` adjusts
it to 70000 and logs a warning message, which may appear unexpected, especially
for users upgrading to 3.8.10+ with no config changes.

This change addresses that problem by pre-adjusting it to 70000, making it safe
by default and ensuring our default values don't conflict with each other.
2021-07-26 16:59:32 -03:00
João Britto 25b6ce1d9f Fix typo in ensure_safe_call_timeout
Matching on `ignored` instead of `ignore`, as described in the documentation of
net_kernel:get_net_ticktime/0.

https://erlang.org/doc/man/net_kernel.html#get_net_ticktime-0
2021-07-26 16:54:36 -03:00
João Britto 5c69b91e15 Remove amqp_ssl:add_verify_fun_to_opts/2,3
These functions have become no-op after d76234f.

The maybe_add_verify_fun/3 function has become unreachable and was removed too.
2021-07-15 17:28:49 -03:00
Michael Klishin 29bb9c5b0c
Merge pull request #3175 from processone/proxy_protocol_tls_info
Extract TLS informations that are delivered in PROXY protocol frame
2021-07-13 15:08:40 +03:00
Philip Kuryloski 8f9de08de7 Also assert no missing suites for all other deps 2021-07-12 18:05:55 +02:00
Philip Kuryloski 3eac3cf8a8 Remove unused load statements from bazel files 2021-07-12 12:10:26 +02:00
Paweł Chmielowski d5daf7598b Extract TLS informations that are delivered in PROXY protocol frame 2021-07-05 13:29:59 +02:00
Philip Kuryloski 0ed5f325b4 Add dialyze for amqp_client 2021-05-31 10:05:03 +02:00
Philip Kuryloski 98e71c45d8 Perform xref checks on many tier-1 plugins 2021-05-21 12:03:22 +02:00
Philip Kuryloski c13c2af614 Bazel file refactoring 2021-05-11 12:03:27 +02:00
Philip Kuryloski d194341cb8 Bazel file refactoring 2021-05-11 10:44:28 +02:00
Philip Kuryloski 418cffc9f3 Add rabbit_common to the deps in rabbitmq_integration_suite macro
While not all suites strictly require it, those same suites depend on
it via the broker dependency anyway. Thus, there is no penalty, but it
shortens the BUILD.bazel file for deps/rabbit
2021-05-11 09:40:22 +02:00
Philip Kuryloski 50adab56ba Fix and refactor amqp_client bazel tests 2021-05-10 20:25:12 +02:00
Michael Klishin 5d009304fd
amqp_network_connection:handshake/3: handle socket send failures
One rabbitmq_trust_store suite runs into a badmatch on this line.
Let's return a more sensible error.
2021-04-15 13:03:15 +03:00
Philip Kuryloski 78bb20f0aa Adopt change of suite_name -> name in ct_suite from @bazel-erlang 2021-04-08 14:25:06 +02:00
Philip Kuryloski 388654c542
Add a partial Bazel build (#2938)
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
2021-03-29 11:01:43 +02:00
Philip Kuryloski a63f169fcb Remove duplicate rabbitmq-components.mk and erlang.mk files
Also adjust the references in rabbitmq-components.mk to account for
post monorepo locations
2021-03-22 15:40:19 +01:00
kjnilsson d6e96c238c fix missing Ra deps updates 2021-03-19 13:54:43 +00:00
Michael Klishin 8b203e316e
Sync rabbitmq-components.mk in a few more places 2021-03-12 19:58:51 +03:00
Michael Klishin 97ff62d3b2
Drop trailing newlines from logged messages where possible
Lager strips trailing newline characters but OTP logger with the default
formatter adds a newline at the end. To avoid unintentional multi-line log
messages we have to revisit most messages logged.

Some log entries are intentionally multiline, others
are printed to stdout directly: newlines are required there
for sensible formatting.
2021-03-11 15:17:37 +01:00
Michael Klishin 1fc6675a42
Make this test more agnostic to stacktrace shape
The point is that both channel and connection go down,
not that a particular tuple is thrown
2021-03-09 02:48:35 +03:00
Michael Klishin a310687478
Sync rabbitmq-components.mk 2021-03-05 02:52:23 +03:00
Michael Klishin d76234f0b1
Erlang client: drop some Erlang 19-specific code 2021-03-03 18:13:49 +03:00
Michael Klishin a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility 2021-02-24 12:53:30 +03:00
Michael Klishin b11a79cccf
Bump (c) year in header files 2021-02-04 07:04:58 +03:00
Michael Klishin 210a032eb8
Naming 2021-01-28 18:23:38 +03:00
Luke Bakken 9048bc0c36
Fix unused variable 2021-01-28 07:16:46 -08:00
Pawel Antemijczuk 5d0aecd819 Resolve DNS until first success 2021-01-26 11:33:13 +01:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Michael Klishin a5c8de73ce
Use ?assertEquals here 2020-12-01 06:13:10 +03:00
Michael Klishin 4c02de62ec
Wording 2020-12-01 06:12:44 +03:00
Ayanda-D 4a6bd67bc9 Add failing direct connection safe call timeout test/mock 2020-11-27 10:28:44 +00:00
Ayanda-D 0059fd7249 Add erlang client safe_call_timeouts tests 2020-11-26 17:30:18 +00:00
Ayanda-D d817c531f2 Add timeouts to direct connection establishment
operations. At some point, these have to timeout to
avoid having lingering connection processes attempting
remote connections under unstable conditions.

Improve handling of potential call timeout exceptions
in amqp_gen_connection.
2020-11-26 17:07:44 +00:00
Ayanda-D 5c469ed519 Ensure safe amqp client call timeouts on connection
establishment. This guarantees that the effective
call timeouts are always safe, i.e. granting enough
time to the underlying network operations, which must
always timeout first in case of any unexpected
lingering operations leading to timeouts. This eliminates
the chance of leaking connection processes when call
timeouts elapse, while underlying remote cconnection
establishment call was still taking place.
2020-11-26 17:02:49 +00:00
Luke Bakken 482907e1fa No longer use amqp_util:call_timeout/0 for wait_for_confirms. Allow specifying integer dimension via a tuple 2020-11-03 09:25:29 -08:00
Luke Bakken 78b1f67e75 Document the Timeout parameter to wait_for_confirms
This parameter is in seconds. Also remove superfluous `CALL_TIMEOUT` macro.

cc @dumbbell

Also see rabbitmq/rabbitmq-server#2490
2020-11-03 09:25:29 -08:00
Arnaud Cogoluègnes 76cb60ff56 Update rabbitmq-components.mk 2020-11-03 14:27:31 +01:00
Philip Kuryloski fbf08b3669 Restore the default gen_server timeout around ssl:setopts/2
amqp_main_reader:post_init/1 is invoked within
amqp_gen_connection:connect/1  with a timeout of ?CALL_TIMEOUT, so the
same timeout interval cannot be reasonably for both
2020-10-22 14:43:27 +02:00
dcorbacho 68225c6ef9 Switch to Mozilla Public License 2.0 (MPL 2.0)
(cherry picked from commit a40b700bf8453aa74819b5c4cd17b242afdd8c16)
2020-10-22 03:01:42 +03:00
Philip Kuryloski c25acbb385 Additional error handling while a connection is opened
Treat the timeout of ssl:setopts/2 as a known error when opening a connection
2020-10-21 20:47:48 +02:00
Philip Kuryloski ffb01e60c5 Be more defensive with the SSL socket when opening connections
Specifically, handle and return the error resulting from
`ssl:controlling_process/2` when opening a connection

Also increase the timeout around `ssl:setopts/2` when opening a
connection to the global client timeout
2020-10-21 16:21:20 +02:00
Michael Klishin 820793537d Update rabbitmq-components.mk 2020-10-21 12:55:27 +03:00
Luke Bakken 6c8ac0afea Take connection / channel limits into account
Starting the supervisor children could trigger a `not_allowed` if
connection or channel limits are exceeded. This change avoids the
`badmatch` error.

See:
https://github.com/rabbitmq/rabbitmq-server/runs/1243633742?check_suite_focus=true
2020-10-13 09:09:36 -07:00
Jean-Sébastien Pédron ecfe81fa3a Travis CI: Update config from rabbitmq-common 2020-10-13 17:42:48 +02:00
Jean-Sébastien Pédron 8cb9f3b02b ci: Remove unused files 2020-08-13 15:27:32 +02:00
Luke Bakken 6e40b010d2 Update rabbitmq-components.mk 2020-08-04 08:41:45 -07:00