mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-07-31 18:19:40 +00:00
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>
This commit is contained in:
@@ -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"] });
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user