From 0b20e0b6347571bac2d1bbd580d783e4eb75a9fb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 7 Jun 2022 10:55:56 -0400 Subject: [PATCH] Fix confuent scan for python 3.9 Python 3.9 removes the scope from the string address, put it back if missing since it's required to actually be usable. --- .../common/initramfs/opt/confluent/bin/apiclient | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient index 579c9f86..c0a851e5 100644 --- a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient @@ -132,8 +132,11 @@ def scan_confluents(): current['mgtiface'] = line.replace(b'MGTIFACE: ', b'').strip().decode('utf8') if len(peer) > 2: current['myidx'] = peer[-1] - srvs[peer[0]] = current - srvlist.append(peer[0]) + currip = peer[0] + if currip.startswith('fe80::') and '%' not in currip: + currip = '{0}%{1}'.format(currip, peer[-1]) + srvs[currip] = current + srvlist.append(currip) r = select.select((s4, s6), (), (), 2) if r: r = r[0]