From 151fb1efc8e8a686b679025e30ec5023466f87cf Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 10 Aug 2026 23:01:00 +0200 Subject: [PATCH] Await the coroutines in osdeploy local node trust setup local_node_trust_setup() called get_cluster_list() and sign_host_key() without awaiting them, so "osdeploy initialize -l" aborted with "TypeError: cannot unpack non-iterable coroutine object" before doing any work. Both awaits have to land together: sign_host_key() is called in a loop that unlinks the existing ssh_host_*_key-cert.pub before writing the new one, so fixing only the unpack would delete every host certificate and then fail. --- confluent_server/bin/osdeploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index c2ad0323..6a851636 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -164,7 +164,7 @@ def init_confluent_myname(): async def local_node_trust_setup(): init_confluent_myname() - allnodes, domain = selfservice.get_cluster_list() + allnodes, domain = await selfservice.get_cluster_list() myname = collective.get_myname() myprincipals = set([myname]) restorecon = os.path.exists('/usr/sbin/restorecon') @@ -180,7 +180,7 @@ async def local_node_trust_setup(): myprincipals.add(addr) for pubkey in glob.glob('/etc/ssh/ssh_host_*_key.pub'): currpubkey = open(pubkey, 'rb').read() - cert = sshutil.sign_host_key(currpubkey, myname, myprincipals) + cert = await sshutil.sign_host_key(currpubkey, myname, myprincipals) certfile = pubkey.replace('key.pub', 'key-cert.pub') neededlines.add('HostCertificate {0}'.format(certfile)) if os.path.exists(certfile):