mirror of
https://github.com/xcat2/confluent.git
synced 2026-11-19 00:42:20 +00:00
Fix arm64 and bios netboot
First, try to offer shim Second, make sure boot.ipxe is as permissive as the shim variant.
This commit is contained in:
@@ -822,12 +822,13 @@ async def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, profile,
|
||||
if not profile:
|
||||
log.log({'info': 'No pending profile for {0}, skipping proxyDHCP reply'.format(node)})
|
||||
return
|
||||
bootfile = 'http://{0}/confluent-public/os/{1}/boot.ipxe'.format(myipn, profile).encode('utf8')
|
||||
if disco['arch'] == 'bios-x86' or not os.path.exists('/var/lib/confluent/public/os/{0}/boot.ipxe.shim'.format(profile)):
|
||||
bootfile = 'http://{0}/confluent-public/os/{1}/boot.ipxe'.format(myipn, profile).encode('utf8')
|
||||
else:
|
||||
bootfile = 'http://{0}/confluent-public/os/{1}/boot.ipxe.shim'.format(myipn, profile).encode('utf8')
|
||||
if len(bootfile) > 127:
|
||||
if bootfile.startswith(b'http'):
|
||||
bootshorturl = '/confluent-public/os/{0}/boot.ipxe'.format(profile)
|
||||
bootfilename = '/var/lib/confluent/public/os/{0}/boot.ipxe'.format(profile)
|
||||
bootfile = register_shorturl(bootfile.decode('utf8'), can302, bootshorturl, bootfilename).encode('utf8')
|
||||
bootfile = register_shorturl(bootfile.decode('utf8')).encode('utf8')
|
||||
else:
|
||||
log.log(
|
||||
{'info': 'Boot offer cannot be made to {0} as the '
|
||||
|
||||
@@ -260,6 +260,7 @@ async def update_boot_linux(profiledir, profile, label):
|
||||
ipxeout.write('imgload kernel\nimgexec kernel\n')
|
||||
finally:
|
||||
ipxeout.close()
|
||||
oum = os.umask(0o22)
|
||||
ipout = os.open(profiledir + '/boot.ipxe', os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0o644)
|
||||
ipxeout = os.fdopen(ipout, 'w')
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user