Commit Graph

1229 Commits

Author SHA1 Message Date
Michael Klishin 1aa2e059bb Rework two more tests
Per discussion with @pjk25.
2020-10-13 06:26:23 +03:00
Michael Klishin 5bedcf2fdc Correct status suite expectations
Per discussion with @pjk25.
2020-10-12 18:50:24 +03:00
Michael Klishin 63f0068d79 Correct upstream URIs in this test 2020-10-10 00:49:14 +03:00
Michael Klishin d9252f2342 Merge pull request #118 from rabbitmq/queue-suite-flake
Replace a fixed test suite delay with a dynamic one
2020-09-29 17:46:46 +03:00
Philip Kuryloski 287d0c67e6 Replace a fixed test suite delay with a dynamic
queue_SUITE > without_disambiguate > cluster_size_1 >
dynamic_plugin_stop_start fails often in CI
2020-09-29 16:07:37 +02:00
Jean-Sébastien Pédron 7621a74b6e exchange_SUITE: Fix format string
`~s` was used to print an integer. This was causing a badarg exception.
2020-09-23 12:04:39 +02:00
Michael Klishin 9403fe931b Merge pull request #115 from rabbitmq/rabbitmq-federation-114
Use mirrored_supervisor for queue federation
2020-09-17 03:25:01 +03:00
Luke Bakken 7040f1de25 Revert "Remove timer"
This reverts commit a621950561.
2020-09-16 13:13:20 -07:00
Luke Bakken a621950561 Remove timer 2020-09-16 11:10:31 -07:00
Michael Klishin 9ffb39c3ca Give links more time to initialize [for CI] 2020-09-16 20:12:40 +03:00
Michael Klishin a87fc37791 await_bindings for a limited amount of time 2020-09-16 19:41:45 +03:00
Luke Bakken 50df6d4d4f Use await_binding, add vhost support 2020-09-16 08:44:27 -07:00
Michael Klishin e77bea6c7d Log payloads received in exchange federation tests 2020-09-16 04:50:15 +03:00
Michael Klishin 353aebbabd More exchange federation test massaging 2020-09-16 04:43:08 +03:00
Michael Klishin df01ae64f9 More selective assertions on link status
Asserting on links across all virtual hosts makes no sense
for some tests, and creates additional shared state and
makes these assertions significantly more timing-sensitive.

Per discussion with @lukebakken.
2020-09-16 04:28:23 +03:00
Michael Klishin b599f40e8b Begin splitting test groups to reduce the amount of shared state 2020-09-16 04:06:58 +03:00
Michael Klishin bfc26c1642 Compile 2020-09-16 00:32:21 +03:00
Michael Klishin a5f32394b5 Make this test clean up its resources at the end 2020-09-16 00:31:57 +03:00
Michael Klishin cb61d620ff Take virtual host into account when detecting binding propagation cycles
The same way we do it for forwarded messages.
2020-09-16 00:13:02 +03:00
Michael Klishin c52af7aad2 A WIP integration test for multi-hop intra-cluster exchange federation
The test currently fails. Added more debug logging to ease
the investigation.

In order to inspect a running node, modify the end_per_group/2
to not shut the node down or do it after an hour long sleep,
then run [1] to inspect the topology.

[2] can be used to run a Bunny-based version of effectively
the same test, which works as expected.

Pair: @lukebakken.

1. https://gist.github.com/michaelklishin/a7bcdc9a2be3540ac6d47297976864f6
2. https://gist.github.com/michaelklishin/9b7fb572f3d22749b982a49e3b3049d7
2020-09-15 18:49:48 +03:00
Luke Bakken 9b2cee8346 Use mirrored_supervisor for queue federation
Fixes #114
2020-09-14 15:20:05 -07:00
Michael Klishin cfcbee18fa Use a combination of cluster name and virtual host when detecting cycles
This makes it possible to federate messages between more than two
virtual hosts in a single cluster. Previously cycle detection would
drop messages that have traversed a "hop" (federation link)
in the same cluster.

Pair: @lukebakken.
2020-09-08 21:13:43 +03:00
Michael Klishin 0163068eed Extract cycle detection node identifier function 2020-09-08 15:34:12 +03:00
Michael Klishin 5eacab3b7b Coerce password to a binary
when obfuscating an upstream.

credentials_obfuscation:encrypt/1 requires a binary and
in some rare cases we've seen that the password value can
be passed in as a string.
2020-08-14 08:36:50 +03:00
Luke Bakken 5f436dae28 Update rabbitmq-components.mk 2020-08-04 08:41:47 -07:00
Jean-Sébastien Pédron 6bb45a5992 Update rabbitmq-components.mk 2020-07-30 12:06:53 +02:00
Luke Bakken 3ec36d2e9f Update rabbitmq-components.mk 2020-07-29 10:02:03 -07:00
dcorbacho a2b5d4433b Update erlang.mk 2020-07-21 14:32:24 +01:00
Michael Klishin be67c3d203 Update rabbitmq-components.mk 2020-07-21 13:12:47 +03:00
Michael Klishin 0992a2d434 Update rabbitmq-components.mk 2020-07-21 03:42:54 +03:00
dcorbacho 9355b957ed Revert drop of Exhibit B on MPL 2.0 2020-07-20 16:59:20 +01:00
dcorbacho 1d720569c5 Update LICENSE 2020-07-20 10:53:52 +01:00
Michael Klishin ef0b262d02 Update MPL2 license file, drop Exhibit B
and add a VMware copyright notice.

We did not mean to make this code Incompatible with Secondary Licenses
as defined in [1].

1. https://www.mozilla.org/en-US/MPL/2.0/FAQ/
2020-07-17 14:53:07 +03:00
Michael Klishin eb33152de4 Handle more pgroup_name_cluster_id values 2020-07-15 18:15:43 +03:00
Michael Klishin 81809c741a Handle cases where rabbitmq_federation.pgroup_name_cluster_id is undefined
it's highly unusual to see but being more defensive is
very easy in this case.
2020-07-15 17:35:13 +03:00
dcorbacho 26a4365188 Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-12 22:52:53 +01:00
Jean-Sébastien Pédron 12c186d0b0 Update erlang.mk 2020-06-23 17:13:56 +02:00
Michael Klishin fcec5c61bd Log effective internal exchange check interval 2020-06-17 20:29:31 +03:00
Michael Klishin 25b712527d Handle more failures around one-off connection calls
Timeouts were not handled gracefully which could disrupt
the link for no good reason. Such one-off checks are
meant to be best effort and not performed particularly
frequently. Their failures should result in visible
log messages but not link restarts.

While at it, improve logging in related code paths.

Per discussion with @kjnilsson.
2020-06-17 18:12:15 +03:00
Michael Klishin 468c4b7cb7 Decrease internal exchange check frequency
it should not run more often than a connection timeout.
90s is a reasonable default interval for this check.
2020-06-17 14:15:23 +03:00
Michael Klishin 51d1939c12 Bump Recon to 2.5.1
for Erlang 23 compatibility of 'rabbitmq-diagnostics observer'

References zhongwencool/observer_cli#68.
2020-06-09 08:22:14 +03:00
Michael Klishin 9b9ca65690 Ditto 2020-04-07 04:01:21 +03:00
Michael Klishin 8d20112e1b Wording 2020-04-07 03:58:47 +03:00
Michael Klishin 3e1cd1d566 Introduce a new upstream parameter, resource-cleanup-mode
Set it to 'never' to make sure the link never removes its internal queue.
It's highly advisable to then specify queue expiration (TTL) to avoid
resource leaks.
2020-04-04 02:18:05 +03:00
Michael Klishin 834f0044bf Remove a log message we ended up not adding 2020-04-01 20:08:35 +03:00
Michael Klishin 2dffac287c Handle one more possible termination reason 2020-04-01 19:59:08 +03:00
Michael Klishin 758234687f Exchange federation: do not clean up internal queue on abnormal link termination
The queue is durable and might contain valuable data.
On the other hand, when federation link is shutting down
because policies have changed or the plugin is being disabled,
it makes sense to delete the resources it was using.

References #105.
2020-04-01 19:27:50 +03:00
Jean-Sébastien Pédron 80651fe605 README.md: Add Travis CI badge 2020-03-31 10:46:06 +02:00
Jean-Sébastien Pédron 57a4683bbd exchange_SUITE: Remove the `binding_recovery` testcase
It still fails way too often and I can't find the appropriate wait
condition.
2020-03-30 17:38:31 +02:00
Jean-Sébastien Pédron fab830b862 queue_SUITE: Wait for federation in `dynamic_plugin_stop_start` 2020-03-30 17:07:07 +02:00
Jean-Sébastien Pédron 75a80d7eb4 exchange_SUITE: Bump wait in several testcases 2020-03-30 14:52:57 +02:00
Jean-Sébastien Pédron f902ef5377 exchange_SUITE: Add a wait condition in `dynamic_plugin_stop_start` 2020-03-30 13:16:23 +02:00
Jean-Sébastien Pédron a845aad507 exchange_SUITE: Review all wait conditions
They should be closer to the expected states now. Hopefully this will
further reduce the number of transient test failures.
2020-03-27 15:25:07 +01:00
Jean-Sébastien Pédron 4fee32b989 exchange_SUITE: Improve wait condition in `binding_recovery`
We wait for the new parameter to be applied, not just any federation to
be ready.
2020-03-27 14:32:47 +01:00
Jean-Sébastien Pédron a34fe8d106 exchange_SUITE: Wait for federation on the correct node 2020-03-27 11:48:03 +01:00
Jean-Sébastien Pédron 7987940c9d exchange_SUITE: Bump a few more timeouts
Follow-up to commit 2e8cdd5ba6.
2020-03-26 17:55:05 +01:00
Jean-Sébastien Pédron 2e8cdd5ba6 exchange_SUITE: Throw an exception if wait_for_federation() times out
While here, increase two timers in the `binding_recovery` testcase.
Hopefully this will help in Concourse.
2020-03-26 17:32:42 +01:00
Jean-Sébastien Pédron c278947717 Update copyright (year 2020) 2020-03-10 16:10:02 +01:00
Gerhard Lazu d2a72bba64 Update rabbitmq-components.mk 2020-03-06 09:19:15 +00:00
Gerhard Lazu bfe5c1108c Update erlang.mk 2020-03-06 09:17:40 +00:00
Jean-Sébastien Pédron 0858bdff4a Travis CI: Update config from rabbitmq-common 2020-03-04 14:24:28 +01:00
Jean-Sébastien Pédron 3ef26b5b30 Travis CI: Update config from rabbitmq-common 2020-03-04 11:17:15 +01:00
Michael Klishin 1c7bf496c7 Transitionary step for OTP 23 [master] compatibility 2020-02-11 21:16:24 +03:00
Michael Klishin a07c6f49ad Transitionary step for OTP 23 [master] compatibility 2020-02-11 21:11:26 +03:00
Gerhard Lazu 346c7435da Update rabbitmq-components.mk 2020-02-11 15:31:44 +00:00
Michael Klishin 8b5bd10c43 (c) bump 2019-12-29 05:50:28 +03:00
Michael Klishin 407f095955 Error handling around command channel 2019-12-22 08:31:31 +03:00
Michael Klishin c0e73759e9 Merge branch 'cmd-channel' of https://github.com/velimir/rabbitmq-federation into velimir-cmd-channel 2019-12-22 04:23:30 +03:00
Luke Bakken aba6f430ab Merge branch 'lrb-delete-federation-exchange' 2019-12-12 11:58:03 -08:00
Michael Klishin d196789164 Merge pull request #99 from rabbitmq/delete-federation-exchange
Use vhost to delete federated exchange
2019-12-12 20:17:16 +03:00
Jean-Sébastien Pédron 5e566144ce Git: Ignore copied CLI 2019-12-12 13:30:17 +01:00
Jean-Sébastien Pédron ce7c0a5ac6 Update rabbitmq-components.mk 2019-12-12 13:14:54 +01:00
Luke Bakken d9183e1372 Filter by vhost for federated queues 2019-12-11 17:05:20 -08:00
Luke Bakken 1f123eed05 add test that fails for queue 2019-12-11 16:18:42 -08:00
Michael Klishin 1629d2ae1e Clarify the intent 2019-12-10 23:23:06 +03:00
dcorbacho db2ab26930 Use vhost to delete federated exchange
Avoids deleting several links with the same upstream, but on different vhosts
[#169936237]
2019-12-10 17:08:58 +01:00
Grigory Starinkin 7eacec1497 use separate channel for command operations
using `bind-nowait` and separate channel for bindings operations allows
to avoid message forwarding delays on the federation link
2019-11-07 07:21:07 +00:00
kjnilsson e59df101df Update rabbitmq-components.mk 2019-09-13 10:24:20 +01:00
kjnilsson 7326faf205 Update rabbitmq-components.mk 2019-09-04 10:30:57 +01:00
Jean-Sébastien Pédron 0af17a2333 Update erlang.mk 2019-08-29 20:45:08 +02:00
Diana Corbacho 69af5dfb02 Obfuscate credentials for federated queues and exchanges.
Credentials are also obfuscated in the ETS table of rabbit_federation_status
so they are not shown in plain text in a crash dump

[#167070941]
2019-08-16 13:35:00 +01:00
Arnaud Cogoluègnes c1b5812cee Start obfuscating credentials for federated queue
WIP

[#167070941]

References rabbitmq/rabbitmq-erlang-client#123
2019-08-14 16:53:04 +02:00
Michael Klishin fab7c2c969 Update rabbitmq-components.mk 2019-08-11 01:47:54 +10:00
Jean-Sébastien Pédron d68e8cb578 Update erlang.mk 2019-08-02 09:53:55 +02:00
Michael Klishin 20a0ea61e7 Update rabbitmq-components.mk 2019-08-01 17:13:15 +03:00
Arnaud Cogoluègnes 355217ba97 Update rabbitmq-components.mk 2019-07-09 16:05:56 +02:00
Jean-Sébastien Pédron 692c91d3c5 Update rabbitmq-components.mk 2019-06-28 16:05:30 +02:00
Jean-Sébastien Pédron 1d854fdcd8 Update erlang.mk 2019-06-28 16:02:02 +02:00
Gerhard Lazu 6839d73a96 Update rabbitmq-components.mk 2019-06-03 02:23:36 +01:00
Jean-Sébastien Pédron 2f6b51046a Update rabbitmq-components.mk 2019-05-17 15:17:18 +02:00
Michael Klishin 6ffd956072 Update rabbitmq-components.mk 2019-05-17 08:36:38 +03:00
Michael Klishin ad13fb97de Update rabbitmq-components.mk 2019-05-16 23:22:49 +03:00
Michael Klishin b39000b716 Update rabbitmq-components.mk 2019-05-14 11:50:47 +03:00
Michael Klishin 36912b6418 Update rabbitmq-components.mk 2019-05-13 16:40:31 +03:00
Gerhard Lazu 0c62a98142 Update rabbitmq-components.mk 2019-05-01 13:18:13 +01:00
Luke Bakken 5aca057fec Update rabbitmq-components.mk 2019-04-30 16:20:56 -07:00
Jean-Sébastien Pédron 99400a53da Update rabbitmq-components.mk 2019-04-30 14:47:29 +02:00
Daniil Fedotov 04adb8fa6a Custom consumer tag for federaion.
Consumer tag is currently generated from the upstream name.
Consumer tag serves to identify a downsream from the upstream queue,
while upsream name identifies upstream from the downstream node.
It would be more convenient to use different values.

Addresses #66
2019-04-26 16:07:59 -04:00
Daniil Fedotov a90b709548 Chenge federation consumer name from "consumer" to "federation-link-<upstream_name>".
This would make it easier to distinguish federation links from other
consumers and from each other (if configured with different names)

Adresses #66 in a way
2019-04-26 13:02:19 -04:00
Gerhard Lazu cb94ce1506 Update rabbitmq-components.mk 2019-04-22 21:55:04 +01:00
Michael Klishin 5e3affdcec CLI commands: provide more information to the new help command 2019-03-26 19:50:16 +03:00
Michael Klishin ce6e4b79af Error message wording 2019-03-22 15:07:22 +03:00
Michael Klishin 05c89aae39 Minor test improvements 2019-03-22 14:59:52 +03:00
Luke Bakken dd10964e48 Change regex to pattern 2019-03-21 12:03:35 -07:00
Diego Herrera Celedón 1ab3c5071c Implement some tests 2019-03-20 19:11:07 -03:00
Diego Herrera Celedón 4522305d98 Implement federation-upstream-regex upstream parameter 2019-03-20 19:11:07 -03:00
Spring Operator ef766e32f0 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://erlang.2086793.n4.nabble.com/initializing-library-applications-without-processes-td2094473.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.2086793.n4.nabble.com/initializing-library-applications-without-processes-td2094473.html) result SSLHandshakeException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rabbitmq.com/federation.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/federation.html ([https](https://www.rabbitmq.com/federation.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 27 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 08:16:24 -05:00
Michael Klishin 56dc9cb59e Travis: use Erlang 21.3, Elixir 1.8.1 2019-03-20 10:33:14 +03:00
Michael Klishin bb39dc0fa1 Help section improvements for CLI commands
To go with rabbitmq/rabbitmq-cli#332.

(cherry picked from commit 6fba7b7d92e35515da3747f5f53e06803af2a4fd)

Conflicts:
	src/Elixir.RabbitMQ.CLI.Ctl.Commands.FederationStatusCommand.erl
	src/Elixir.RabbitMQ.CLI.Ctl.Commands.RestartFederationLinkCommand.erl
2019-03-19 18:22:12 +03:00
Michael Klishin 99b1b97b5d Add a spec for rabbit_federation_util:fail/2 2019-03-15 22:24:14 +03:00
Michael Klishin 1fa5c9e7ff One less Dialyzer warning 2019-03-15 22:24:04 +03:00
Luke Bakken 010532b449 Correctly handle already_started case
Follow-up to #85 and #86
2019-03-15 10:33:07 -07:00
Michael Klishin 3b3f9be386 Update rabbitmq-components.mk 2019-03-15 05:32:54 +03:00
Michael Klishin c09397b251 Update rabbitmq-components.mk 2019-03-15 05:05:44 +03:00
Michael Klishin 1e511044a0 Make link sup sup startup idempotent
By handling `{error, already_started}` which can be seen in the wild
due to distributed race conditions.

Per discussion with @lukebakken.
2019-03-06 23:14:42 +03:00
Michael Klishin 3bdc83d6be Drive by change: format this message as one line 2019-03-06 22:34:27 +03:00
Michael Klishin eb3b0183ca Wording 2019-02-21 20:13:42 +03:00
Daniil Fedotov 1545cd67c1 Description for help command.
Requires https://github.com/rabbitmq/rabbitmq-cli/pull/316
2019-02-20 14:23:27 -05:00
Michael Klishin 5f91a3377c Update rabbitmq-components.mk 2019-02-12 23:23:53 +03:00
Jean-Sébastien Pédron 269dcb6699 unit_inbroker_SUITE: Create `#amqqueue{}` on the broker
... and use it locally in the `get_connection_name()` testcase. With
this, we don't need to query the feature flag file and initialize the
registry locally.

This works because the feature flags are only checked when the
`#amqqueue{}` record is created. When we use it afterwards, the
`amqqueue` module doesn't care: the argument determines the version of
the record to use.
2019-02-08 16:44:18 +01:00
Daniil Fedotov c1c3660c98 Update unit_inbroker suite to support amqqeueue module. 2019-02-07 17:41:37 -05:00
Jean-Sébastien Pédron b7221e4fef Make #amqqueue{} a private record
See the corresponding commit in rabbitmq-server for all the
explanations.

Now, all accesses to the #amqqueue{} record are made through the
`amqqueue` module (available in rabbitmq-server). The new type name is
`amqqueue:amqqueue()`.

The `amqqueue.hrl` header also provides some macros to help with pattern
matching and guard expressions.

[#159298729]
2019-01-23 14:18:48 +01:00
Michael Klishin fe090d41c5 .travis.yml: use 21.2 as 21.2.2 builds are no available 2019-01-14 01:20:20 +03:00
Michael Klishin 93dd31d031 .travis.yml: sync Erlang and Elixir versions, require Erlang/OTP 21.2 2019-01-13 05:49:59 +03:00
Luke Bakken 29e73ba8fc Update rabbitmq-components.mk 2019-01-09 12:55:03 -08:00
Luke Bakken 040d475e59 Update rabbitmq-components.mk 2019-01-08 11:58:27 -08:00
Jean-Sébastien Pédron 1b74ff9ff6 Travis CI: Update config from rabbitmq-common 2019-01-08 15:44:23 +01:00
Michael Klishin 5f765689ae Update rabbitmq-components.mk 2018-12-06 18:28:46 +03:00
Michael Klishin 3e965c94dc Update rabbitmq-components.mk 2018-12-06 03:15:12 +03:00
Jean-Sébastien Pédron 58979bb5e2 Update rabbitmq-components.mk 2018-11-30 14:56:49 +01:00
Jean-Sébastien Pédron 17251fad30 Update rabbitmq-components.mk 2018-11-22 09:19:34 +01:00
kjnilsson e86e9cad8e Update rabbitmq-components.mk 2018-10-29 12:43:19 +00:00
Jean-Sébastien Pédron 06b917c1a2 Update rabbitmq-components.mk 2018-09-19 10:38:15 +02:00
Jean-Sébastien Pédron c28efc9326 Update rabbitmq-components.mk 2018-09-11 14:22:29 +02:00
Luke Bakken 4330755d17 Update git-commit-msgs link 2018-08-28 16:18:46 -07:00
Jean-Sébastien Pédron 2122142e74 Update rabbitmq-components.mk 2018-08-09 17:44:14 +02:00
Jean-Sébastien Pédron 1c8281618e Update rabbitmq-components.mk 2018-08-09 12:17:00 +02:00
Ayanda Dube 91953d93e6 avoid multiple creation of upstream queue name
when defining upstream exchange name. Use that
already held in the link state.
2018-07-20 19:15:11 +01:00
Ayanda Dube 0c6fec525f acquire upstream & downstream connection names once
per exchange or queue link initialization
2018-07-13 11:41:30 +01:00
Ayanda Dube 1b86aed04a make federation util name/1 helper for resource
translation more explicit (it translates both
exchange and queue resources, from both links)
2018-07-13 11:38:57 +01:00
Ayanda Dube 6aca39fc56 fix exchange link child-spec release handling module 2018-07-12 11:39:46 +01:00
Michael Klishin ce582ec250 Wording 2018-06-25 20:53:47 +03:00
Ricardo Goncalves 665271f8b1 When trying to open a channel, don't expect that the connection is up and running.
Protect against connection being down or closing.

This happened when upstream federation links were forcibly closed, crashing the downstream federated exchange process when calling the following 2 lines on terminate/2:
```
    %% Cleanup of internal queue and exchange
    delete_upstream_queue(Conn, Queue),
    delete_upstream_exchange(Conn, IntExchange),
```
2018-06-25 13:38:35 +01:00
Ricardo Goncalves 5b9311b846 Fixes the "zombie" direct connections, when using Federated Exchanges and forcibly closing the upstream connections. This happens deterministically 100% of the time.
The fact that direct connections do not close, causes a process and memory leak on RabbitMQ.

If the exchange_link process first closes the direct connection, before dealing with the remote TCP connection, the issue completely disappears.
2018-06-25 10:50:32 +01:00
Jean-Sébastien Pédron db15d39738 Update rabbitmq-components.mk 2018-06-07 11:31:35 +02:00
Michael Klishin 50a6a64ea1 Coerce upstream set element to a proplist
Closes #75, references #67, #70, #73.
2018-04-30 13:41:32 -05:00
Jean-Sébastien Pédron cec3c373ec Update erlang.mk 2018-04-11 10:53:12 +02:00
Jean-Sébastien Pédron 4a9e826492 Update rabbitmq-components.mk 2018-04-11 10:51:20 +02:00
Jean-Sébastien Pédron 6d442974e7 Update rabbitmq-components.mk 2018-04-11 10:10:03 +02:00
Michael Klishin a4cac21e5a Be more defensive when operating on proplists
They can be passed from the outside as maps.

References #67, #70.
Closes #73.
2018-04-09 15:00:25 +02:00
Jean-Sébastien Pédron c225e7cc81 Travis CI: Update config from rabbitmq-common 2018-04-09 14:30:46 +02:00
Jean-Sébastien Pédron fca2c44812 Travis CI: Update config from rabbitmq-common 2018-04-09 11:59:12 +02:00
Michael Klishin 5e2145b090 Merge branch 'v3.7.x'
Conflicts:
	.travis.yml
2018-03-08 04:14:49 +03:00
Michael Klishin 46f257b0ae Swap these tests
Troubleshooting a Concourse failure.
2018-03-07 04:54:15 +03:00
Jean-Sébastien Pédron c1c1b5ea29 Update erlang.mk 2018-03-02 19:05:49 +01:00
Jean-Sébastien Pédron f1cc1de7b2 Update erlang.mk 2018-03-02 18:38:02 +01:00
Michael Klishin c4835ae646 Coerce upstream definition to a proplist
So that maps do not fail validation.

References #68.
Closes #70.

(cherry picked from commit 8b0c5dbbd99df79045e766033f47dd74a98707a2)
2018-02-06 17:57:06 +01:00
Michael Klishin 4e42529af4 Coerce upstream definition to a proplist
So that maps do not fail validation.

References #68.
Closes #70.
2018-02-06 17:54:49 +01:00
Michael Klishin 3ea21a6e65 Coerce upstream set definition to proplists
So that it passes validation.

Closes #67.

[#154751618]
2018-01-31 15:50:52 +03:00
Michael Klishin dcc78781b7 Coerce upstream set definition to proplists
So that it passes validation.

Closes #67.

[#154751618]
2018-01-31 15:49:42 +03:00
Jean-Sébastien Pédron a9d99070c9 Update rabbitmq-components.mk 2018-01-30 16:37:27 +01:00
Jean-Sébastien Pédron b0666f47bc Update rabbitmq-components.mk 2018-01-30 15:23:38 +01:00
Luke Bakken 2d9c673dfc Update rabbitmq-components.mk 2018-01-29 16:22:13 -08:00
Jean-Sébastien Pédron 39146af95a Update rabbitmq-components.mk 2018-01-23 18:02:50 +01:00
Jean-Sébastien Pédron 79b37e2646 Update rabbitmq-components.mk 2018-01-23 17:21:28 +01:00
Jean-Sébastien Pédron 8a72acd8c6 Update rabbitmq-components.mk 2018-01-23 15:31:17 +01:00
Diana Corbacho 35fe9908eb Update rabbitmq-components.mk 2018-01-22 22:13:22 +00:00
Jean-Sébastien Pédron c865289bbd Travis CI: Update config from rabbitmq-common 2017-12-15 15:12:14 +01:00
Jean-Sébastien Pédron a5d37f30d2 Travis CI: Update config from rabbitmq-common 2017-12-15 14:53:05 +01:00
Jean-Sébastien Pédron 5f14a780a2 Update rabbitmq-components.mk 2017-12-01 15:16:27 +01:00
Jean-Sébastien Pédron bf7b2efc16 Update rabbitmq-components.mk 2017-12-01 11:06:29 +01:00
Jean-Sébastien Pédron 65432bfcd0 Merge branch 'rabbitmq-federation-63' into v3.7.x 2017-11-29 12:35:07 +01:00
Jean-Sébastien Pédron 5348c433fb Merge pull request #64 from rabbitmq/rabbitmq-federation-63
Cleanup internal exchanges and queues when links are removed
2017-11-29 12:33:21 +01:00
Diana Corbacho 44d2f3895c Use assert macros. Wait for link to be recreated
rabbitmq-federation#63
[#153011041]
2017-11-29 10:33:38 +00:00
Jean-Sébastien Pédron 8145fea83a Update rabbitmq-components.mk 2017-11-28 14:00:49 +01:00
Jean-Sébastien Pédron 9c1261338f Update rabbitmq-components.mk 2017-11-28 13:28:51 +01:00
Diana Corbacho a8953cd6ce Cleanup internal exchanges and queues after plugin is disabled or policy removed
rabbitmq-federation#63
[#153011041]
2017-11-27 11:24:14 +00:00
Jean-Sébastien Pédron f6949e37e8 Travis CI: Update config from rabbitmq-common 2017-11-07 18:54:45 +01:00
Luke Bakken f8e2121fc0 Add GitHub templates and contributing doc 2017-10-13 15:55:50 -07:00
Jean-Sébastien Pédron 21cc1449a8 Merge branch 'stable' 2017-10-13 15:08:05 +02:00
Jean-Sébastien Pédron 0673533894 Update rabbitmq-components.mk 2017-10-13 14:33:08 +02:00
Jean-Sébastien Pédron b8e75fd6b3 Update rabbitmq-components.mk 2017-10-13 14:13:07 +02:00
Jean-Sébastien Pédron ee366396b1 Update rabbitmq-components.mk 2017-10-13 12:15:43 +02:00
Michael Klishin 67531af421 Update rabbitmq-components.mk 2017-09-13 17:54:19 -04:00
Michael Klishin acabc37eb3 Update rabbitmq-components.mk 2017-09-13 17:45:30 -04:00
Michael Klishin bba2eafb11 Update rabbitmq-components.mk 2017-09-12 19:53:10 -04:00
Michael Klishin 66dcb2c834 Update rabbitmq-components.mk 2017-09-12 12:41:51 -04:00
Daniil Fedotov 247f58317f Merge branch 'stable' 2017-08-30 19:20:34 +01:00
Daniil Fedotov 5a9ec72c9f Update erlang.mk 2017-08-30 18:46:44 +01:00
Daniil Fedotov c90d9cf13f Use lager sink API for logs.
Lager sink parse-transform allows us to use a fake module name
to select sinks.
The parse-transform will fail if a sink is not defined, making sure
log is working.

[#149634975]
2017-08-07 14:47:19 +01:00
Jean-Sébastien Pédron f80c8e2db6 Merge branch 'stable' 2017-07-31 10:12:08 +02:00
Jean-Sébastien Pédron 3e3ebdf081 exchange_SUITE: Cleanup policies at the end of `restart_upstream` testcase
Without this cleanup, the `cycle_detection` testcase which follows fails
with the following error:

    ** Reason for termination ==
    ** {function_clause,
           [{rabbit_federation_exchange_link,
                '-ensure_internal_exchange/2-fun-0-',
                [406,
                 <<"PRECONDITION_FAILED - inequivalent arg 'x-max-hops' for exchange 'federation: cycle -> rmq-ct-with_disambiguate-cluster_size_2-1-21000@localhost B' in vhost '/': received '1' but current is '10'">>],
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,540}]},
            {rabbit_federation_link_util,disposable_connection_call,3,
                [{file,"src/rabbit_federation_link_util.erl"},{line,305}]},
            {rabbit_federation_exchange_link,ensure_upstream_bindings,2,
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,489}]},
            {rabbit_federation_exchange_link,'-go/1-fun-1-',8,
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,423}]},
            {rabbit_federation_link_util,start_conn_ch,5,
                [{file,"src/rabbit_federation_link_util.erl"},{line,58}]},
            {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1048}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}

[#149584741]
2017-07-27 17:50:45 +02:00
Michael Klishin 88287acbf5 Erlang/OTP 19.2 is now the minimum supported version.
Part of rabbitmq/rabbitmq-server#1305.

[#149563549]
2017-07-26 19:02:50 +03:00
Jean-Sébastien Pédron 96230a39a7 exchange_SUITE: Use a dedicated key in `cycle_detection`
The testcase is affected by other testcases not cleaning what they
created or not waiting for those resources to disappear.

By using a dedicated binding key (instead of the same `key` as all other
testcases), it seems to improve the success rate of the testcase.
2017-07-26 15:26:41 +02:00
Jean-Sébastien Pédron d4c33e11dc exchange_SUITE: No need to import rabbit_federation_test_util:no_plugins() 2017-07-26 15:25:57 +02:00
Michael Klishin 42e916d8e4 Update rabbitmq-components.mk 2017-07-26 03:48:24 +03:00
Michael Klishin 1a94d68983 Update rabbitmq-components.mk 2017-07-26 02:27:05 +03:00
Michael Klishin c1d9733e12 Merge branch 'stable' 2017-07-24 18:07:54 +03:00
Diana Corbacho 0bd9a9f5c0 Detect internal upstream exchange deletion and restart the link
When network partitions happen, two nodes might connect to the upstream
swapping the exchange (A -> B, B -> A). The last surviving link
after healing might have lost its exchange. The periodic check using
a passive declare allows to detect the situation and restart the link,
restoring the connectivity.

Related to rabbitmq-federation#43
rabbitmq-federation#59
2017-07-21 17:37:21 +01:00
Michael Klishin d29bef40c8 Merge pull request #58 from rabbitmq/rabbitmq-server-1246-master
Change algorithm for federation link ID generation from term_to_binary to phash2.
2017-06-13 18:36:07 +03:00