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 1/4] 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"] }); } From 42e8ef64cc86cb41a195f70a410ac23f5e95ed5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:22:12 -0300 Subject: [PATCH 2/4] fix(xnba): warn only when pxelinux is required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-server/lib/xcat/plugins/xnba.pm | 38 +++++++++++++++++----------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 5a2b8e92a..68a729f16 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -91,6 +91,14 @@ sub getstate { } } +sub _requires_pxelinux { + my $kern = shift; + return 0 unless ($kern and ref($kern) eq 'HASH'); + + my $kernel = $kern->{kernel} || ''; + return ($kernel =~ /!/ or $kernel =~ /\.c32\z/ or $kernel =~ /memdisk\z/) ? 1 : 0; +} + my %efistubcache; sub has_efistub { my $kern = shift; @@ -285,6 +293,7 @@ sub setstate { close($pcfg); _write_uefi_exit_script($bootloader_root, $node, $cref->{currstate}); } elsif ($kern and $kern->{kernel}) { + $::XNBA_pxelinux_required = 1 if (_requires_pxelinux($kern)); if ($kern->{kernel} =~ /!/) { #TODO: deprecate this, do stateless Xen like stateless ESXi my $hypervisor; my $kernel; @@ -610,6 +619,7 @@ sub process_request { $::XNBA_callback = shift; my $sub_req = shift; undef $::XNBA_addkcmdlinehandled; # clear out any previous value + undef $::XNBA_pxelinux_required; my @args; my @rnodes; undef %failurenodes; @@ -760,21 +770,6 @@ sub process_request { } } - #back to normal business - if (!-r "$globaltftpdir/xcat/pxelinux.0") { - 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"); - } - } - unless (-r "$globaltftpdir/xcat/pxelinux.0") { - # 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"] }); - } - - - my $inittime = 0; if (exists($::XNBA_request->{inittime})) { $inittime = $::XNBA_request->{inittime}->[0]; } if (!$inittime) { $inittime = 0; } @@ -843,6 +838,19 @@ sub process_request { } } } + + if ($::XNBA_pxelinux_required) { + if (!-r "$globaltftpdir/xcat/pxelinux.0") { + 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"); + } + } + unless (-r "$globaltftpdir/xcat/pxelinux.0") { + $::XNBA_callback->({ warning => ["Unable to find pxelinux.0 from syslinux; nodes whose xNBA configuration chains pxelinux will not boot until it is available"] }); + } + } + xCAT::MsgUtils->trace($verbose_on_off, "d", "xnba: Finish to handle configurations"); #dhcp stuff -- inittime is set when xcatd on sn is started From 1f56331435101c9bb71dedf4a466b7562fb315d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:22:12 -0300 Subject: [PATCH 3/4] test(xnba): cover conditional pxelinux warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-test/unit/xnba_semicolon.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-test/unit/xnba_semicolon.t b/xCAT-test/unit/xnba_semicolon.t index fdf998526..abcc8411e 100644 --- a/xCAT-test/unit/xnba_semicolon.t +++ b/xCAT-test/unit/xnba_semicolon.t @@ -34,4 +34,18 @@ like($src, qr/sub _use_efistub_for_uefi\b/, 'UEFI EFI-stub selection helper exis like($src, qr/sles\?11/, 'SLES 11 UEFI compatibility rule matches sle11 and sles11 images'); like($src, qr/if \(_use_efistub_for_uefi\(\$kern\)\)/, 'UEFI boot path uses compatibility helper before direct EFI-stub boot'); +# pxelinux is only needed for multiboot, COMBOOT, and memdisk configurations. +# Missing syslinux must not warn for ordinary direct-kernel nodeset requests. +like($src, qr/sub _requires_pxelinux\b/, 'pxelinux requirement helper exists'); +like( + $src, + qr/\$::XNBA_pxelinux_required = 1 if \(_requires_pxelinux\(\$kern\)\)/, + 'generated boot configuration records when pxelinux is required' +); +like( + $src, + qr/if \(\$::XNBA_pxelinux_required\) \{.*?Unable to find pxelinux\.0/s, + 'missing pxelinux warning is limited to requests that generate a pxelinux chain' +); + done_testing(); From c4ea5e284f0289c6218164c971197d16b17af39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:32:40 -0300 Subject: [PATCH 4/4] docs(xnba): update missing pxelinux warning --- docs/source/advanced/mixed_cluster/power/diskless.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/advanced/mixed_cluster/power/diskless.rst b/docs/source/advanced/mixed_cluster/power/diskless.rst index 88ca74a9b..09f0fb9ba 100644 --- a/docs/source/advanced/mixed_cluster/power/diskless.rst +++ b/docs/source/advanced/mixed_cluster/power/diskless.rst @@ -4,12 +4,11 @@ Provision x86 Diskless Troubleshooting --------------- -**Error:** The following Error message comes out when running nodeset: :: +**Warning:** The following warning appears when ``nodeset`` generates a configuration that chains pxelinux: :: - Error: Unable to find pxelinux.0 at /opt/xcat/share/xcat/netboot/syslinux/pxelinux.0 + Warning: Unable to find pxelinux.0 from syslinux; nodes whose xNBA configuration chains pxelinux will not boot until it is available **Resolution:** The syslinux network booting files are missing. -Install the sylinux-xcat package provided in the xcat-deps repository: ``yum -y install syslinux-xcat`` - +Install the syslinux-xcat package provided in the xcat-deps repository: ``yum -y install syslinux-xcat``