mirror of https://github.com/status-im/consul.git
agent: clarify the valid characters for dns
This commit is contained in:
parent
c6ec9dd844
commit
103e9e7fc1
|
@ -604,14 +604,16 @@ func (a *Agent) AddService(service *structs.NodeService, chkTypes CheckTypes, pe
|
||||||
// Warn if the service name is incompatible with DNS
|
// Warn if the service name is incompatible with DNS
|
||||||
if !dnsNameRe.MatchString(service.Service) {
|
if !dnsNameRe.MatchString(service.Service) {
|
||||||
a.logger.Printf("[WARN] Service name %q will not be discoverable "+
|
a.logger.Printf("[WARN] Service name %q will not be discoverable "+
|
||||||
"via DNS due to invalid characters", service.Service)
|
"via DNS due to invalid characters. Valid characters include "+
|
||||||
|
"all alpha-numerics and dashes.", service.Service)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn if any tags are incompatible with DNS
|
// Warn if any tags are incompatible with DNS
|
||||||
for _, tag := range service.Tags {
|
for _, tag := range service.Tags {
|
||||||
if !dnsNameRe.MatchString(tag) {
|
if !dnsNameRe.MatchString(tag) {
|
||||||
a.logger.Printf("[WARN] Service tag %q will not be discoverable "+
|
a.logger.Printf("[WARN] Service tag %q will not be discoverable "+
|
||||||
"via DNS due to invalid characters", tag)
|
"via DNS due to invalid characters. Valid characters include "+
|
||||||
|
"all alpha-numerics and dashes.", tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue