2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 15:18:19 +00:00
Commit Graph

28600 Commits

Author SHA1 Message Date
Vinícius Ferrão f095e5da81 test(dhcp): cover shared FIPS defaults and BIND signing 2026-10-05 22:52:49 -03:00
Vinícius Ferrão d01cb679eb fix(dhcp): share SHA-256 key policy in FIPS mode 2026-10-05 22:52:34 -03:00
Vinícius Ferrão dc2f83a2de test(ssh): exercise FIPS policy and optional host keys 2026-10-05 18:14:20 -03:00
Vinícius Ferrão 750ed7e5a5 fix(ssh): skip optional DSA host keys in FIPS mode 2026-10-05 18:14:20 -03:00
Vinícius Ferrão 449c52acfe test(dhcp): isolate compatibility fixtures from host FIPS mode 2026-10-05 18:14:20 -03:00
Daniel Hilst 4df004ee2d Merge pull request #7857 from VersatusHPC/test/r26-redaction-behavior
test(xcatd): exercise loaded password redaction
2026-10-05 11:27:27 -03:00
Daniel Hilst d7c32d2689 Merge pull request #7885 from VersatusHPC/feat/ipxe-netboot
feat(netboot): boot x86 nodes with the upstream iPXE loader
2026-10-05 11:15:47 -03:00
Vinícius Ferrão 63c4be9d7d docs: describe the ipxe netboot method
A new page describes the ipxe and xnba netboot methods: the files of the
upstream loader, UEFI Secure Boot through the shim and its limits, the
client test, the loader of nodes without a definition, the move of
nodes to the ipxe method and back, and the known limits of the upstream
loader.

The node guide, the noderes, node, group and nodeset pages list the ipxe
method, and the value lists mark xnba deprecated. The examples that
define an x86 node use netboot=ipxe. The mixed cluster and uninstall
guides name ipxe-xcat, and the DHCP validation matrix gets the iPXE
loader rows, Secure Boot included.
2026-10-02 23:58:16 -03:00
Vinícius Ferrão 45144f5a5b test(dhcp): cover an xnba node with the xNBA UEFI file only
The renderer gives the node its UEFI first-stage class. kea-dhcp4 then
gives xNBA to a UEFI firmware client of the node, and the node script to
xNBA.
2026-10-02 23:58:16 -03:00
Vinícius Ferrão b027ee05be fix(dhcp): give xNBA to the UEFI clients of an xnba node on Kea
The global UEFI class of Kea gives only the upstream loader, so each
xnba node carries its own first-stage classes. They existed only with
the local xNBA BIOS file. With the xNBA UEFI file alone, a UEFI client
of an xnba node got the upstream loader and then the discovery script,
not xNBA and its node script.

The UEFI first-stage class of an xnba node now also exists with the
local xNBA UEFI file alone.
2026-10-02 23:58:16 -03:00
Vinícius Ferrão 1fe41625c4 test(dhcp): cover an omshell that stalls after its prompt
A fake omshell writes its prompt without a newline and then waits. The
read returns at the deadline with that prompt, and the omshell stops.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão 4eacca2c9d fix(dhcp): stop an omshell query at its deadline
_run_omshell stops omshell after 10 seconds, but it read the output a
line at a time. A line read waits for a newline, and omshell writes its
prompt without one. An omshell that stalled after a prompt kept makedhcp
waiting past the deadline. The check of an external ISC server does that
read while it holds the DHCP lock.

_run_omshell now reads the output in chunks.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão a5b8fc4904 test(dhcp): cover the load of a new ISC configuration before OMAPI
The cases without an xCAT dhcpd.conf now run the whole request. dhcpd
restarts with the new configuration before omshell starts, and the
configuration written last keeps its declarations. A failed restart
changes no host, and after a run that stopped before the restart, the
next run restarts dhcpd first.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão 8cf2640ee7 fix(dhcp): load a new ISC configuration before OMAPI changes a host
makedhcp builds a new configuration when dhcpd.conf is missing or xCAT
did not write it. It replaced each host over OMAPI before dhcpd loaded
that configuration. A dhcpd that still ran an older one then rejected a
host that tests an iPXE feature option. OMAPI had already removed the
old host, so the node lost its reservation.

makedhcp now writes the new configuration and restarts dhcpd first. It
changes no host when that restart fails. The restart marker of an
upgraded configuration now also covers a new one, so the next run
restarts dhcpd first after a run that stopped before the restart.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão bec8d403eb refactor(dhcp): restart the ISC dhcpd of Linux in one place
A later change also restarts dhcpd before the host updates, with the
same distribution steps.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão 230ef0de1b test(dhcp): cover the SAN disk of an installed node on Kea
A node in state boot or iscsiboot that boots from SAN gets the loader of
its method from its own Kea classes on a client without iSCSI: BIOS for
xnba, BIOS and UEFI for ipxe, and nothing without the local xNBA BIOS
file. The local-boot class holds it for a client with iSCSI only, and
keeps that condition when a later makedhcp writes the class again.

The packet test checks both methods with kea-dhcp4. A firmware PXE
client and an iPXE without iSCSI get the loader, and an iPXE with iSCSI
gets no boot file, though the subnet offers its network scripts.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão c63db068f9 fix(dhcp): boot the SAN disk of an installed node on Kea
Kea gave a node in state boot or iscsiboot no classes of its own and
left a node that boots from SAN out of the local-boot class. Its clients
fell to the shared classes, which now skip a client with the iPXE
features of a script. A firmware iPXE without iSCSI then got no loader,
and an iPXE with iSCSI got the discovery script of the network.

Such a node now gets the loader of its method from its own classes on a
client without iSCSI, for BIOS and, with netboot=ipxe, for UEFI, as its
ISC host statements do. A client with iSCSI is in the local-boot class,
so no class names a boot file for it and it boots the root path. Kea
tests the iSCSI feature, which xNBA and iPXE both report, for a node of
any method.
2026-10-02 23:58:15 -03:00
Vinícius Ferrão d33532f9fa test(dhcp): leave the SAN node out of the Kea local-boot case
The next change puts a node that boots from SAN in the local-boot class
of Kea for a client that can attach the disk. The local-boot case
checks the class with installed nodes only, which do not change. The
test after the change covers the SAN node.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão da59d8b317 test(dhcp): cover the omshell line limit of an ISC host
A host whose longest line has 1023 bytes gets its commands unchanged,
with the removal of the old host before its creation. A 1024-byte line
gives an error that names the node, and makedhcp sends no command of
that host or of its InfiniBand twin.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão 79461a7280 fix(dhcp): keep an ISC host whose omshell line is too long
omshell reads 1023 bytes of a line and parses the rest as a new command.
makedhcp removes the old host of a node before it creates it again, so a
longer "set statements" line, as an iSCSI node with long target and
initiator names can give, left the node without its reservation.

makedhcp now checks every command of a host before it sends any. For a
node whose command is too long, it reports the node and leaves its host
unchanged.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão 0e192f58c8 refactor(dhcp): build the omshell commands of an ISC host in one place
addnode printed the omshell commands of a host one line at a time,
starting with the removal of the old host. _isc_omapi_host_commands now
returns them as one text, so that makedhcp can check them before it
sends any. The commands and their order do not change.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão deac69a374 test(build): expect ipxe-xcat in the packaging
The specs are resolved with rpmspec and the Debian control files with
Dpkg::Deps for each architecture. xCAT and xCATsn require ipxe-xcat
and xnba-undi where they required xnba-undi, and ipxe-xcat alone on the
other architectures. The debs depend on ipxe-xcat and recommend
xnba-undi on every architecture.

The go-xcat install lists name both packages.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão 32a688b30a build: require ipxe-xcat alongside xnba-undi
Unknown x86 clients and netboot=ipxe nodes boot the upstream iPXE
loader of the ipxe-xcat package, which the xCAT packages did not
install.

The specs require ipxe-xcat where they require xnba-undi: on x86 and
ppc for xCAT, and on x86 for xCATsn. xCAT on riscv64 and xCATsn on ppc
and riscv64 require ipxe-xcat alone, because a POWER or riscv64 server
can serve x86 nodes. The xcat and xcatsn debs depend on ipxe-xcat on
every architecture for the same reason. go-xcat installs and removes
ipxe-xcat with the other packages.

xnba-undi stays a dependency, because netboot=xnba nodes still boot
xNBA.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão 96af69a118 test(build): accept more riscv64 requirements beside ipmitool-xcat
The next commit adds ipxe-xcat to the riscv64 requirements of xCAT and
xCATsn, and moves the riscv64 block of xCATsn into its ppc block. The
test now finds the block that covers riscv64 and checks that it
requires ipmitool-xcat.
2026-10-02 23:58:14 -03:00
Vinícius Ferrão 3485789af9 test(go-xcat): read the package lists from the production script
The riscv64 test copied riscv64_install_list out of go-xcat with awk and
ran it on its own copy of the install list. A change to the real lists
did not reach it.

The BATS test sources go-xcat and reads the install, riscv64 and
uninstall lists for the rpm and deb names. It checks that riscv64 drops
only the legacy Genesis, adds the OpenEmbedded Genesis and keeps the
x86 boot loaders, and that the uninstall list covers every package
go-xcat installs.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão 5461b767ca refactor(go-xcat): define the riscv64 filter before a sourced run returns
A sourced go-xcat returns before the main program, which defined
riscv64_install_list, so a test that sources the script could not call
the filter. The function is now defined above the main program. A run of
the script does the same as before.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão aa6a8a19e5 test(probe): cover the discovery download match
The network boot script of the upstream loader and of xNBA, and the
pxelinux configuration, start the discovery. A node script, a loader
and a Genesis file do not.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão c3c2351fd9 fix(probe): check the discovery scripts of the upstream loader
An unknown x86 client now fetches its Genesis script from
xcat/ipxe/nets. xcatprobe discovery checked the scripts of each network
under xcat/xnba/nets, and marked the boot loader stage only for a
download from there. It now checks xcat/ipxe/nets, and marks the stage
for a download from either directory.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão f6a67af473 test(probe): cover the boot loader download match
The xNBA loaders, the upstream iPXE loaders with the UEFI shim, the
POWER grub2 image and yaboot count as a boot loader download. Genesis
files, pxelinux.0, the POWER grub2 configuration and a similar-looking
name do not.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão fae705d969 fix(probe): recognize the upstream loader download
osdeploy marked a node as loading its boot loader only when it fetched a
file under xcat/xnba, the POWER grub2 image, or yaboot. A node on the
upstream loader fetches xcat/ipxe/..., so osdeploy missed that stage.

Move the match into probe_utils and add xcat/ipxe/.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão 916e92f206 test(destiny): cover the SAN loader check of each netboot method
For each loader file that a TFTP tree can hold, the check accepts an
xnba node or an ipxe node when that file can SAN-boot it: undionly.kpxe
in the root for both, xnba.kpxe for xnba, and the upstream BIOS loader
for ipxe. The upstream UEFI loader alone is not enough.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão 0f87fd2a00 fix(destiny): test the SAN loader of the netboot method of each node
setdestiny accepted an x86 iscsiboot node without iSCSI boot data only
when undionly.kpxe was in the TFTP root. The check read
-f ("$tftpdir/undionly.kpxe" or -f "$tftpdir/xcat/xnba.kpxe"): the or
was inside the -f argument, so xnba.kpxe never counted.

Accept the node when undionly.kpxe is there, or the BIOS file of the
loader of its netboot method: the upstream loader for netboot=ipxe, and
xNBA for any other method.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão ac94a62696 test(dhcp): cover the upstream loader readiness warnings
A server without x86 network boot scripts gets no warning, and a ready
server gets none. An upgraded server with only the xNBA scripts gets one
warning for each missing upstream loader file, the UEFI shim and the
snponly.efi it loads included, and one for the network scripts. A single
missing file gets its own warning, and a directory under xcat/ipxe/nets
is not a network boot script.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão 6052edad42 feat(dhcp): warn when the upstream loader is not ready
makedhcp -n and -a now warn when a server that serves x86 discovery
lacks an upstream loader file in its local TFTP directory, the
snponly.efi that the UEFI shim loads included, or has no network boot
script under xcat/ipxe/nets, which mknb writes. A server
serves x86 discovery when it has network boot scripts under xcat/ipxe
or xcat/xnba. A node can load from another TFTP server, so the check
warns and does not stop.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão 1d4819ac0b test(netboot): cover the ipxe default of new x86 nodes
A node of an x86_64 or x86 image profile gets netboot=ipxe, and the
ppc64le and riscv64 profiles keep grub2. The x86 node templates, read
with the stanza parser of mkdef, define netboot=ipxe, the ppc64le
template keeps petitboot, and the e1350 noderes table gives the compute
group ipxe.

A profile change keeps netboot=xnba, and gives a node without a method,
a netboot=pxe node and a node of another architecture the method of its
profile.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão 5269d7bf1c feat(netboot): define new x86 nodes with netboot=ipxe
netboot=xnba is deprecated, but profile-based node definitions, the x86
node templates of mkdef --template, the e1350 noderes table and the
SoftLayer importer still gave new x86 nodes xnba. They now give
netboot=ipxe, as node discovery does. Existing nodes keep their method,
and a profile change keeps netboot=xnba on a node that has it: moving a
node to the upstream loader is the choice of the site.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão 03e9855445 test(netboot): stop pinning xnba as the profiled x86 default
The next commit gives the x86 nodes of an image profile netboot=ipxe.
The rule test keeps its riscv64, ppc64le and aarch64 rows.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão c30f08cf13 test(nodediscover): cover the ipxe default of discovered x86 nodes
An x86 node without an x86 method gets netboot=ipxe, and one that
already has ipxe, pxe or xnba keeps it.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão 48d774dfee feat(nodediscover): set netboot=ipxe on discovered x86 nodes
A discovered x86 node without an x86 method got netboot=xnba, which
names the xNBA loader that xCAT retires. It now gets netboot=ipxe, the
method of the upstream iPXE loader that discovery itself uses. A node
that already has pxe, ipxe or xnba keeps it.
2026-10-02 23:58:12 -03:00
Vinícius Ferrão c480f4dac9 test(nodediscover): stop pinning xnba as the x86 default
The next change makes discovery set netboot=ipxe on an x86 node, so the
two checks that expect xnba for an x86 node without an x86 method go.
The checks that keep an x86 method that is already set stay.
2026-10-02 23:58:11 -03:00
Vinícius Ferrão bf5e2bdb20 test(dhcp): cover the upstream loader dispatch
The packet test runs dhcpd and kea-dhcp4 in a network namespace with the
rules that BootPolicy renders, and sends relayed DHCPDISCOVER packets
from a second namespace. It checks the boot file of firmware PXE, xNBA
and iPXE clients, with each iPXE feature present or missing, for an xnba
node and an ipxe node that install, for both methods with a SAN disk,
and for an unknown node. On ISC it also covers an iSCSI node of each
method in the boot state, and repeats the node rows after a restart,
when dhcpd reads the host statements back from dhcpd.leases. On Kea it
repeats the rows of the ipxe nodes with a configuration that makedhcp
upgraded, which keeps the xNBA global classes of the older makedhcp -n.
It also checks that the UEFI clients of an xnba node get xNBA when the
server lacks the xNBA UEFI file.

The Kea validation test checks the x86 classes of xnba and ipxe nodes
with kea-dhcp4 -t. XCAT::Test::DHCP builds the packets, and the
integration case expects seven files.
2026-10-02 23:58:11 -03:00
Vinícius Ferrão 128e7fe197 test(dhcp): cover the upstream loader of unknown x86 clients
The global Kea classes give the upstream loader to an x86 client that
cannot fetch its script, and the Etherboot class gives it the BIOS
loader. The network classes and the ISC x86 lines give the Genesis
script under xcat/ipxe/nets to a client with the iPXE features of its
path, and the Kea subnet lists those classes. Without an upstream loader
file on the server, neither backend names it or the second stage that it
would fetch, and the ISC lines stop such a client before the fallback.
The xNBA files name no global class.

An xnba node gets xNBA from its own first-stage classes when the server
has the xNBA BIOS file, and still xcat/xnba.efi without the local UEFI
file. Without the xNBA BIOS file it has no first-stage classes, as it
has no ISC host statements. An ipxe node without a SAN disk carries the
upstream loader in its own first-stage classes.

The ISC configuration test also checks these lines in configurations
that makedhcp upgraded, one of them with indented declarations.

The DHCP wire cases now expect the upstream loader for an x86 client
with no reservation, and its network script for a second stage that
reports the features in option 175. A second stage without them gets the
loader again, and an xnba node still gets xNBA.
2026-10-02 23:58:11 -03:00
Vinícius Ferrão 0766c7213b test(ci): prepare syslog for dispatch redaction checks
Install rsyslog and create its xCAT log directory before installing xCAT.
Wait for a unique syslog marker before changing test state, including when
the log does not exist yet. Reuse that wait for the completion marker.
2026-10-02 22:35:57 -03:00
Vinícius Ferrão fd0e28bf4b docs(test): describe the live dispatch redaction case 2026-10-02 22:11:59 -03:00
Vinícius Ferrão dc071ba50b test(xcatd): verify dispatch redaction in syslog
Replace the dispatch trace fixture with an installed-node xcattest case.
Check the stored password, masked dispatch output, and absence of the
unmasked password in syslog. Restore the debug setting and remove the
temporary node on exit. Keep the redactor unit checks unchanged.
2026-10-02 22:11:59 -03:00
Vinícius Ferrão 80b6bb91f7 test(xcatd): require complete redacted output
Secret-absence checks accept missing values and lost command context.
Require the expected masked output for attributes, options, operands
and loaded schema mappings. Production and dispatch fixtures are unchanged.
2026-10-02 22:11:59 -03:00
Vinícius Ferrão 490d40ca01 test(xcatd): exercise loaded password redaction
Load the production redactor and schema instead of extracting source.
Check audit, syslog, and dispatch trace output through their real owners.
Keep production code unchanged.
2026-10-02 22:11:59 -03:00
Daniel Hilst f6e3257c92 Merge pull request #7895 from VersatusHPC/fix/buildrpms-shared-sources
fix(xcat-core): concurrent package builds stage into one SOURCES directory
2026-10-02 21:50:17 -03:00
Daniel Hilst 3bf54ecba5 Merge pull request #7856 from VersatusHPC/test/r26-ci-driver-behavior
test(ci): exercise the GitHub action driver
2026-10-02 21:49:21 -03:00
Vinícius Ferrão 5e4993255b feat(dhcp): boot unknown x86 clients with the upstream iPXE loader
An x86 client without a node definition, such as a node in discovery,
now gets xcat/ipxe/i386/undionly.kpxe for BIOS and
xcat/ipxe/x86_64-sb/snponly-shim.efi for UEFI. Once it reports the iPXE
features of its path, it gets the Genesis script of its network from
xcat/ipxe/nets, which mknb writes. ISC and Kea apply the same test. As
for xNBA, neither backend names a loader that the local TFTP directory
lacks, or the second stage that the loader would fetch.

Kea gave every x86 client its first-stage loader from the global
classes, which now name the upstream loader. An xnba node therefore
carries its own first-stage classes, which name xcat/xnba.kpxe and
xcat/xnba.efi when the local xNBA BIOS file exists, as its ISC host
statements do. An ipxe node carries its own classes for the upstream
loader, because an upgrade keeps the global classes of an older
makedhcp -n until the next makedhcp -n. The ISC host statements of a
node do not change.
2026-10-02 20:11:20 -03:00