From b93a2e60d2da2c238b9a72156728e1a98620ac2c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 22 Aug 2017 16:47:56 -0400 Subject: [PATCH] Be more selective in IP pruning Only prune known bad IPs, not the whole list --- confluent_server/confluent/discovery/core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index f524499c..c9ef627d 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -388,9 +388,8 @@ def _recheck_single_unknown(configmanager, mac): ''.format( handler.devname, info['hwaddr'], handler.ipaddr )}) - # addresses data is bad, clear it, to force repair next - # opportunity - info['addresses'] = [] + # addresses data is bad, delete the offending ip + info['addresses'] = [x for x in info['addresses'] if x != handler.ipaddr] # TODO(jjohnson2): rescan due to bad peer addr data? # not just wait around for the next announce return @@ -499,7 +498,7 @@ def detected(info): ''.format( handler.devname, info['hwaddr'], handler.ipaddr )}) - info['addresses'] = [] + info['addresses'] = [x for x in info['addresses'] if x != handler.ipaddr] return log.log( {'info': '{0} with hwaddr {1} at address {2} is not yet running '