Remove duplicate hosts from the etcd machine cache (#2127)

Close #2126
This commit is contained in:
Michael Banck
2021-12-02 11:35:11 +01:00
committed by GitHub
parent 63ee42a85c
commit 90b3736fec
+1 -1
View File
@@ -184,7 +184,7 @@ class AbstractEtcdClientWithFailover(etcd.Client):
for base_uri in machines_cache:
try:
machines = list(self._get_members(base_uri, **kwargs))
machines = list(set(self._get_members(base_uri, **kwargs)))
logger.debug("Retrieved list of machines: %s", machines)
if machines:
random.shuffle(machines)