mirror of
https://github.com/xcat2/confluent.git
synced 2026-02-18 21:54:25 +00:00
Fix PXE afterm merge and have rebase work with async
This commit is contained in:
@@ -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:")
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user