Etcd router bug fixing etcd path prefix matching name (#1899)

* add logging and don't get nodes where they exist in router

* add more logging

* Fix the etcd bug for name matching of keys and prefixes matching names
This commit is contained in:
Asim Aslam
2020-08-06 12:42:14 +01:00
committed by GitHub
parent 2b79910ad9
commit aefd052dd7
4 changed files with 104 additions and 23 deletions

View File

@@ -197,6 +197,7 @@ func (r *rtr) manageRegistryRoutes(reg registry.Registry, action string) error {
// fetchRoutes retrieves all the routes for a given service and creates them in the routing table
func (r *rtr) fetchRoutes(service string) error {
logger.Tracef("Fetching route for %s domain: %v", service, registry.WildcardDomain)
services, err := r.options.Registry.GetService(service, registry.GetDomain(registry.WildcardDomain))
if err == registry.ErrNotFound {
logger.Tracef("Failed to find route for %s", service)