Closed francisfontoura closed 2 years ago
is not a valid DNS name @francisfontoura - however that it's supported via Docker it is incorrect to have such hostnames use something like -
instead of ``
According to RFC 2181, section 11 "Name syntax:
The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one restriction relates to the length of the label and the full name. [...] Implementations of the DNS protocols must not place any restrictions on the labels that can be used.
Despite RFC 952 defines legal internet host names restrictions, internal Docker Swarm DNS resolution doesn't have to follow It, because it's not about "internet host names", only DNS. tasks.*
names are not FQDNs, but are valid DNS addresses and, IMO at least, should not be refused by MinIO Sidekick, nor by minio/pkg/net
.
Hope you reconsider. Thanks for attention.
Despite RFC 952 defines legal internet host names restrictions, internal Docker Swarm DNS resolution doesn't have to follow It, because it's not about "internet host names", only DNS.
tasks.*
names are not FQDNs, but are valid DNS addresses and, IMO at least, should not be refused by MinIO Sidekick, nor byminio/pkg/net
.
No, for now, we may not support it - we have rejected similar requests in the past. Please change your hostnames to comply with the RFC 952
Unfortunately, I cannot. As explained in "Context" section of post, the "invalid" character _
is put by Docker:
[...] follows the
tasks.${Stack.Name}_${Service.Name}
pattern.
In my example, s3
is stack's name and minio1
is service's. There's no way to change "underscore" intentionally. Until you reconsider, we're stuck on v1. Thanks anyway.
Expected Behavior
Command
sidekick -p /minio/health/ready http://tasks.s3_minio{1...4}
should work like v1.Current Behavior
Console logs
sidekick: <ERROR> invalid endpoint "http://tasks.s3_minio1:9000" and health check path "/minio/health/ready": invalid hostname
and Sidekick fails to start.Possible Solution
Sidekicks relies on
github.com/minio/pkg/net
package to validate endpoint argument. The library identifies the hostname as FQDN and test against^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$
regular expression, what fails because of_
character.Steps to Reproduce (for bugs)
N/A.
Context
tasks.*
Docker Swarm hostnames are useful in cross stack network access between containers and always follows thetasks.${Stack.Name}_${Service.Name}
pattern.Regression
No.
Your Environment
sidekick version
): 2.0.3uname -a
): n/a.