Michael Klishin
968eefa1bb
Bump (c) line year
...
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
Michael Klishin
d3a3acee16
Refactor: as_list/1 belongs to rabbit_data_coercion
2024-11-25 12:33:33 -05:00
Michael Klishin
55411e6ea4
Peer discovery cleanup: be more defensive
...
See discussion #12807 for details.
rabbit_peer_discovery:normalize/1 can be
changed to only return lists of nodes but then
there is a number of core code paths that
treat a single node as a special "preselected"
value.
So let's keep that part and convert both
sets of nodes to lists before computing the
difference.
2024-11-25 12:28:34 -05:00
Michael Klishin
9c79ad8d55
More missed license header updates #9969
2024-02-05 12:26:25 -05:00
Michael Klishin
01092ff31f
(c) year bumps
2024-01-01 22:02:20 -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
Alex Valiushko
4916a39d74
fix types
2023-12-12 14:50:38 -08:00
Alex Valiushko
5e3bbb3336
fix list coercion
2023-12-12 14:50:38 -08:00
Michael Klishin
1b642353ca
Update (c) according to [1]
...
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:18:22 -05:00
Michael Klishin
013628db15
Pass Dialyzer
2023-05-07 21:31:36 +04:00
Michael Klishin
3835a137d6
Intentionally ignore return value here
...
the node is being removed
2023-05-07 21:25:04 +04:00
Michael Klishin
4da3ae0e05
Wording
2023-05-07 21:21:03 +04:00
Simon Unge
0c649b3687
See #2882 . Also call quorum shrink command
2023-05-07 21:21:03 +04:00
Jean-Sébastien Pédron
cd2b4c7585
Use `rabbit_nodes` to list nodes in two plugins
...
... instead of using an internal implementation.
The plugins are `rabbitmq_peer_discovery_common` and
`rabbitmq_sharding`.
References #7058 .
2023-02-22 15:28:04 +01:00
Jean-Sébastien Pédron
42bcd94dce
rabbit_db_cluster: New module on top of databases clustering
...
This new module sits on top of `rabbit_mnesia` and provide an API with
all cluster-related functions.
`rabbit_mnesia` should be called directly inside Mnesia-specific code
only, `rabbit_mnesia_rename` or classic mirrored queues for instance.
Otherwise, `rabbit_db_cluster` must be used.
Several modules, in particular in `rabbitmq_cli`, continue to call
`rabbit_mnesia` as a fallback option if the `rabbit_db_cluster` module
unavailable. This will be the case when the CLI will interact with an
older RabbitMQ version.
This will help with the introduction of a new database backend.
2023-02-22 15:28:04 +01:00
Alexey Lebedeff
183a260290
Fix all dialyzer warnings in peer discovery plugins
2023-01-23 22:32:06 +00:00
Michael Klishin
ec4f1dba7d
(c) year bump: 2022 => 2023
2023-01-01 23:17:36 -05:00
Michal Kuratczyk
04de0c704a
Delete function clauses that can never match
2022-12-15 18:17:18 +01:00
Rin Kuryloski
bef2756b5f
Fixes for various dialyzer warnings
2022-12-02 09:14:08 +01:00
Luke Bakken
7fe159edef
Yolo-replace format strings
...
Replaces `~s` and `~p` with their unicode-friendly counterparts.
```
git ls-files *.erl | xargs sed -i.ORIG -e s/~s>/~ts/g -e s/~p>/~tp/g
```
2022-10-10 10:32:03 +04:00
Michael Klishin
b77d8631dc
Peer discovery HTTP client: more override that accept HTTP options
...
Part of #5116
2022-07-05 10:37:44 +04:00
Michael Klishin
c38a3d697d
Bump (c) year
2022-03-21 01:21:56 +04:00
Philip Kuryloski
49a47586b0
Simplify erlc opts for rabbitmq_peer_discovery_common
2021-10-07 09:53:11 +02: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
Jean-Sébastien Pédron
0867200195
rabbitmq_peer_discovery_{common,consul}: Switch to Logger macros
...
... from `rabbit_log:*` calls.
Many rabbitmq_peer_discovery_consul testcases are executed outside of a
RabbitMQ server node. When we had Lager `parse_transform` enabled, calls
to `rabbit_log` were converted to something which happened to not break
when executed outside of RabbitMQ.
Now that `rabbit_log` calls are kept (there is no `parse_transform`),
the missing dependency to rabbit_common in the common_test node surfaces
nad hilights the breakage which has always been there.
Calls to `rabbit_log` are now replaced with Logger macros and this works
again, even in the context of the common_test node.
2021-03-11 15:17:36 +01:00
Michael Klishin
52479099ec
Bump (c) year
2021-01-22 09:00:14 +03:00
Michael Klishin
1611c1fd94
Switch to MPL2
2020-07-14 16:04:17 +03:00
Michael Klishin
81be66427d
Squash a compiler warning
2020-05-22 16:40:46 +03:00
Michael Klishin
b171888e33
Update type specs to communicate the idea
2020-05-22 15:35:53 +03:00
Michael Klishin
78fa1e42b5
rabbit_peer_discovery_config: introduce a way to get integer values
...
Unlike arbitrary values, if environment variable that corresponds to the key
is blank, the function will fall back to the default. The assumption here is
that a blank value cannot be parsed to an integer in a sensible way and
thus using the default is the best we can do.
Part of rabbitmq/rabbitmq-peer-discovery-consul#41 .
2020-05-22 15:19:20 +03:00
Michael Klishin
51b50b874d
More debug logging
2020-03-24 17:16:19 +03:00
Jean-Sébastien Pédron
3d489a03b4
Update copyright (year 2020)
2020-03-10 16:40:54 +01:00
Michael Klishin
ce68e36738
Migrate away from http_uri for warning-free OTP 23 compatibility
...
This changes the API of rabbit_peer_discovery_httpc. All callers
in RabbitMQ peer discovery plugins were updated accordingly.
While at it, fix some issues discovered by Dialyzer.
Note: uri_string is only available starting with OTP 21.
2019-12-29 17:04:03 +03:00
Michael Klishin
c875a77d9e
(c) bump
2019-12-29 05:50:32 +03:00
Gabriele Santomaggio
f7fe39f537
Add headers to the post method missing documentation
2019-12-06 15:15:09 +01:00
Gabriele Santomaggio
f8d59fb54a
Add headers to the post method
2019-12-06 15:07:44 +01:00
Luke Bakken
9dd20a4e6c
Export function to facilitate config
...
Part of rabbitmq/rabbitmq-peer-discovery-etcd#20
2019-12-02 14:58:09 -08:00
Luke Bakken
168fc8e772
If inet6 is defined in inetrc, use it in httpc
...
If the user configures `{inet6, true}` in `ERL_INETRC` file, then use it for all `httpc:` calls in peer discovery.
Fixes rabbitmq/rabbitmq-peer-discovery-k8s#55
2019-10-23 09:10:09 -07:00
Michael Klishin
e19a1048d4
Make it possible for config entries to not have an env variable
...
In preparation for rabbitmq/rabbitmq-peer-discovery-consul#34 .
2019-10-22 16:35:10 +03:00
Spring Operator
e57f1a682e
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://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://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ) 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/cluster-formation.html with 1 occurrences migrated to:
https://www.rabbitmq.com/cluster-formation.html ([https](https://www.rabbitmq.com/cluster-formation.html ) result 200).
* http://www.rabbitmq.com/github.html with 1 occurrences migrated to:
https://www.rabbitmq.com/github.html ([https](https://www.rabbitmq.com/github.html ) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
https://www.rebar3.org ([https](https://www.rebar3.org ) result 200).
* 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 9 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 03:19:37 -05:00
Luke Bakken
58f1bdcd06
Set connect and request timeouts
...
httpc:request has a default timeout of infinity. This PR ensures that both the connect and request phase uses a timeout
Part of rabbitmq/rabbitmq-peer-discovery-aws#25
2019-01-11 12:31:35 -08:00
Jean-Sébastien Pédron
97c22e0d08
Use -include() for local headers
...
... not -include_lib(). Otherwise the build may fail with:
src/rabbit_peer_discovery_cleanup.erl:21: can't find include lib "rabbitmq_peer_discovery_common/include/rabbit_peer_discovery.hrl"
2017-11-08 11:06:55 +01:00
Andrew Colin Kissa
91cb428095
Add utility as_list function
2017-10-18 18:00:50 +02:00
Andrew Colin Kissa
3f6eb8099e
Add header support to the put method
2017-10-18 18:00:15 +02:00
Gabriele Santomaggio
16e12e0eb4
Add normalize on service_discovery_nodes
2017-09-05 16:08:26 +02:00
Michael Klishin
4a35eb8509
Port HTTP[S] proxy settings from rabbitmq-autocluster
...
While at it, add tests for the Cuttlefish schema.
[#150681519 ]
2017-08-30 13:37:33 -06:00
Michael Klishin
0e4936d989
cluster_formation.node_cleanup.only_log_warning should be set true by default
...
We don't want to forcefully remove nodes until the user opts in.
2017-08-27 14:47:08 -06:00
Michael Klishin
19a2a1e2bb
Merge branch 'master' into rabbitmq-server-1257
2017-06-12 18:01:16 +03:00