add support for using domain name in configuration #46
No reviewers
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#46
Loading…
Reference in a new issue
No description provided.
Delete branch "trinity-1686a/garage:bind-domain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From documentation
While not an insurmountable issue, it's certainly less than ideal. This pull request uses
std::net::ToSocketAddrs
to resolve domains.Care should be taken for the domain to provide only the right ip. For instance
localhost
usually resolves to both[::1]
and127.0.0.1
, and the wrong address might get picked.I'm not too keen on resolving domain names for the
*_bind_addr
configuration variables, as they will mostly look something likelocalhost:3901
, which is ambiguous between IPv4 and IPv6, or[::]:3901
, which does not have a named equivalent.This is a great addition for the bootstrap peer list though!
1bb44fa8a2
to319ec42805
319ec42805
toc8a7ce5cdf
Also, here's a suggestion: if a domain name resolves to many IPs, the current PR takes only the first one, but what if we put all Garage node IPs in a single domain? If all IPs were taken this would make bootstrap possible with a single domain name!
This is possible, and simple enough to implement, however IPs are only resolved at config deserialization, not after, so adding new IPs to the domain name would get detected only by restarting the server
Well bootstrap is done once anyway, at server start only. The Consul module enables regular polling of a Consul service to get new nodes, but in the non-Consul case it is expected that the new nodes will be the one bootstraping by contacting the existing nodes, and not the other way around, so if the DNS contains at least the existing nodes when a new node is launched then it will work.