diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index 946c5ef0..488dee27 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -74,7 +74,7 @@ async def main(args): if cmdset.command == 'updateboot': return await updateboot(cmdset.profile) if cmdset.command == 'rebase': - return rebase(cmdset.profile) + return await rebase(cmdset.profile) ap.print_help() def symlinkp(src, trg): @@ -498,9 +498,9 @@ async def updateboot(profilename): print(repr(rsp)) -def rebase(profilename): +async def rebase(profilename): c = client.Command() - for rsp in c.update('/deployment/profiles/{0}'.format(profilename), {'rebase': 1}): + async for rsp in c.update('/deployment/profiles/{0}'.format(profilename), {'rebase': 1}): if 'updated' in rsp: print('Updated: {0}'.format(rsp['updated'])) elif 'customized' in rsp: @@ -510,7 +510,7 @@ def rebase(profilename): sys.exit(rsp['errorcode']) else: print(repr(rsp)) - +/opt/confluent/bin/confluent def oslist(): c = client.Command() print("Distributions:") diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index 90f726e8..d70256bd 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -401,11 +401,10 @@ async def snoop(handler, protocol=None, nodeguess=None): cloop.add_reader(net6, new_dhcp6_packet, handler, net6, cfg, nodeguess) -async def process_dhcp6req(handler, rqv, addr, net, cfg, nodeguess): - _mac_to_uuidmap = {} +async def process_dhcp6req(handler, rqv, addr, net, cfg, nodeguess): ip = addr[0] req, disco = v6opts_to_dict(bytearray(rqv[4:])) req['txid'] = rqv[1:4] diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 5e4cb41f..b2115494 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -731,7 +731,7 @@ async def rebase_profile(dirname): profiledir = dirname else: profiledir = '/var/lib/confluent/public/os/{0}'.format(dirname) - currhashes = get_hashes(profiledir) + currhashes = await get_hashes(profiledir) festfile = os.path.join(profiledir, 'manifest.yaml') try: with open(festfile, 'r') as festfile: