From 40f754d6578477d11d5e4a8f63e418e23a58d34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sat, 25 Jul 2026 16:53:25 -0300 Subject: [PATCH] fix(xnba): warn instead of failing when pxelinux.0 is unavailable nodeset aborted with "Unable to find pxelinux.0 from syslinux" when neither the copy under the tftp directory nor the one under XCATROOT existed. Only legacy BIOS clients chain pxelinux and not every distribution still ships syslinux, so a UEFI-only environment could not run nodeset at all. Copy pxelinux.0 when it is available and warn, rather than fail, when it is not. Recovered from the unmerged lenovobuild branch (4f0a5106), which skipped silently; warn so the missing loader is still reported. Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> --- xCAT-server/lib/xcat/plugins/xnba.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 88c09c5e6..5a2b8e92a 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -762,16 +762,15 @@ sub process_request { #back to normal business if (!-r "$globaltftpdir/xcat/pxelinux.0") { - unless (-r $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0") { - $::XNBA_callback->({ error => [ "Unable to find pxelinux.0 at " . $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0" ], errorcode => [1] }); - return; + if (-r $::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0") { + copy($::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0", "$globaltftpdir/xcat/pxelinux.0"); + chmod(0644, "$globaltftpdir/xcat/pxelinux.0"); } - copy($::XCATROOT . "/share/xcat/netboot/syslinux/pxelinux.0", "$globaltftpdir/xcat/pxelinux.0"); - chmod(0644, "$globaltftpdir/xcat/pxelinux.0"); } unless (-r "$globaltftpdir/xcat/pxelinux.0") { - $::XNBA_callback->({ error => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] }); - return; + # only legacy BIOS clients chain pxelinux, and not every distribution + # still ships syslinux, so warn instead of failing the whole request + $::XNBA_callback->({ warning => ["Unable to find pxelinux.0 from syslinux, legacy BIOS nodes that chain pxelinux will not boot until it is available"] }); }