Nomad service name validation stricter than Consul validation #11097
Labels
good first issue
help-wanted
We encourage community PRs for these issues!
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/consul
theme/service-discovery/consul
type/bug
Nomad version
Nomad v1.1.3 (8c0c814)
Operating system and Environment details
Linux ip-172-25-216-30.ap-southeast-2.compute.internal 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Issue
The validation of service name when registering services in Consul via the service{} block is stricter than that of Consul. Consul allows registering service names that don't comply with RFC1123, since that restriction is purely to satisfy DNS based service discovery, and not everyone uses Consul DNS.
Example Error:
Service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes: "com.daml.ledger.api.v1.ActiveContractsService"
Reproduction steps
Expected Result
The service is registered with Consul.
Actual Result
Service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes: "com.daml.ledger.api.v1.ActiveContractsService"
The text was updated successfully, but these errors were encountered: