From 3925c6dcbcaf5b04e8a2140d31fe9d7753a78f0a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Oct 2026 12:10:19 -0400 Subject: [PATCH] Fix arm64 and bios netboot First, try to offer shim Second, make sure boot.ipxe is as permissive as the shim variant. --- confluent_server/confluent/discovery/protocols/pxe.py | 9 +++++---- confluent_server/confluent/osimage.py | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index 648023ef..ada20b36 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -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 ' diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index b8ce288b..5bf6f1ca 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -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: