From 2fc4483bba0316c09931268b4daa19ba5e8e2042 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 8 Aug 2024 17:09:33 -0400 Subject: [PATCH 1/2] Backport SLP performance enhancement from async branch Same concept that could bog down async variant could be a slowdown for normal confluent. --- confluent_server/confluent/discovery/protocols/slp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/discovery/protocols/slp.py b/confluent_server/confluent/discovery/protocols/slp.py index f1e334f3..3ca7cd01 100644 --- a/confluent_server/confluent/discovery/protocols/slp.py +++ b/confluent_server/confluent/discovery/protocols/slp.py @@ -493,6 +493,8 @@ def snoop(handler, protocol=None): (rsp, peer) = s.recvfrom(9000) if peer in known_peers: continue + if peer in deferpeers: + continue mac = neighutil.get_hwaddr(peer[0]) if not mac: probepeer = (peer[0], struct.unpack('H', os.urandom(2))[0] | 1025) + peer[2:] From 8fd39c36bb55b94f6fed48fb1163d4afdf713661 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 9 Aug 2024 07:55:42 -0400 Subject: [PATCH 2/2] Fix some mistakes in confignet --- confluent_osdeploy/common/profile/scripts/confignet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/common/profile/scripts/confignet b/confluent_osdeploy/common/profile/scripts/confignet index 72462834..cb5684a8 100644 --- a/confluent_osdeploy/common/profile/scripts/confignet +++ b/confluent_osdeploy/common/profile/scripts/confignet @@ -86,7 +86,7 @@ def map_idx_to_name(): for line in subprocess.check_output(['ip', 'l']).decode('utf8').splitlines(): if line.startswith(' ') and 'link/' in line: typ = line.split()[0].split('/')[1] - devtype[prevdev] = typ if type != 'ether' else 'ethernet' + devtype[prevdev] = typ if typ != 'ether' else 'ethernet' if line.startswith(' '): continue idx, iface, rst = line.split(':', 2) @@ -413,7 +413,8 @@ class NetworkManager(object): cargs.append(arg) cargs.append(cmdargs[arg]) if u: - cmdargs['connection.interface-name'] = iname + cargs.append('connection.interface-name') + cargs.append(iname) subprocess.check_call(['nmcli', 'c', 'm', u] + cargs) subprocess.check_call(['nmcli', 'c', 'u', u]) else: