mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Show only 1 warning if srv discovery failed (#362)
This commit is contained in:
committed by
GitHub
parent
d138a8db17
commit
47cc572a3d
+3
-2
@@ -226,8 +226,7 @@ class Client(etcd.Client):
|
||||
try:
|
||||
return [(r.target.to_text(True), r.port) for r in resolver.query(host, 'SRV')]
|
||||
except DNSException:
|
||||
logger.warning('Can not resolve SRV for %s', host)
|
||||
return []
|
||||
return []
|
||||
|
||||
def _get_machines_cache_from_srv(self, srv):
|
||||
"""Fetch list of etcd-cluster member by resolving _etcd-server._tcp. SRV record.
|
||||
@@ -254,6 +253,8 @@ class Client(etcd.Client):
|
||||
if ret:
|
||||
self._protocol = protocol
|
||||
break
|
||||
else:
|
||||
logger.warning('Can not resolve SRV for %s', srv)
|
||||
return list(set(ret))
|
||||
|
||||
def _get_machines_cache_from_dns(self, host, port):
|
||||
|
||||
Reference in New Issue
Block a user