From 8023f436c1764d434e5ced499f5095205f2c87fe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 26 Oct 2026 15:44:49 -0400 Subject: [PATCH] Fix URL shortening for ARM boot The special ARM accommodation for dubious firmware behavior failed to include the URL shortening for unreasonably long profile names. --- .../confluent/discovery/protocols/pxe.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index 33c96c81..648023ef 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -823,6 +823,18 @@ async def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, 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 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') + else: + log.log( + {'info': 'Boot offer cannot be made to {0} as the ' + 'profile name "{1}" is {2} characters longer than is supported ' + 'for this boot method.'.format( + node, profile, len(bootfile) - 127)}) + return else: bootfile = b'confluent/aarch64/ipxe-shim.efi' repview[108:108 + len(bootfile)] = bootfile