2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-22 07:38:08 +00:00
Commit Graph

762 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 dc2f83a2de test(ssh): exercise FIPS policy and optional host keys 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
Vinícius Ferrão 76bf639910 test(dhcp): stop pinning the loader of unknown x86 clients
The next change gives unknown x86 clients the upstream iPXE loader, and
an xnba node carries its own first-stage classes in Kea. These checks
describe the xNBA loader for unknown clients, so they go: the files,
tests and architectures of the global x86 classes, the network classes,
the Etherboot class, the UEFI class of the proxyDHCP case, and the xNBA
branches and missing-loader cases of the ISC x86 lines.

The node class checks of an xnba node and of an ipxe node compare only
the second-stage classes, which do not change. The test after the change
covers the new loader.
2026-10-02 20:11:20 -03:00
Vinícius Ferrão 191551d722 test(dhcp): cover the upstream loader rules of ipxe nodes
The Kea classes and the ISC host statements of a netboot=ipxe node name
the ipxe-xcat loaders without a local file. The node script goes to a
client with HTTP, bzImage and PXE on BIOS and HTTP and EFI on UEFI, and
the first-stage classes negate the same test. A SAN node needs iSCSI as
well. An xnba node beside an ipxe node keeps its classes. dhcp.pm gives
node classes to ipxe and xnba nodes, with their method and SAN flag. Kea
defines option 175, the ISC header declares every feature that a host
statement tests, and no host statement depends on parentheses: each
feature test sits inside its architecture test.
2026-10-02 20:11:19 -03:00
Vinícius Ferrão 7e1157aeb4 test(mknb): cover the discovery scripts under xcat/ipxe/nets
mknb writes the BIOS, UEFI and elilo discovery scripts of a network
under xcat/ipxe/nets, with the same content as under xcat/xnba/nets.
2026-10-02 20:11:19 -03:00
Vinícius Ferrão 0f2a9c6227 test(netboot): cover the ipxe netboot method
nodeset through the ipxe plugin writes the BIOS, UEFI, elilo and
pxelinux files of a node under xcat/ipxe/nodes, and the scripts name
that directory. An xnba node still gets xcat/xnba/nodes. SvrUtils reads
the nodeset state of both. An x86_64 osimage accepts netboot=ipxe, and
the noderes.netboot description lists it.
2026-10-02 20:11:19 -03:00
Vinícius Ferrão 9cd1bca4c8 test(netboot): check the x86_64 netboot methods as a set
lookupNetboot lists the netboot methods that an osimage accepts. The
x86_64 case compared the whole list, so any new x86 method broke it.
It now checks that xnba, pxe and grub2 are accepted, in any order.
2026-10-02 20:11:18 -03:00
Vinícius Ferrão dfcb48ab72 test(dhcp): cover the check of an external ISC server
A local dhcpd, and an external one without netboot=ipxe nodes, get no
check. An external dhcpd that returns the check host updates every
node, after one omshell run that creates the host, whose statement
tests every iPXE feature option, and one that reads it back and removes
it. The first run opens no host, and each run creates a host with its
own name and address.

A rejected statement, a run cut short or without a reply, a lost
connection and the host of another run leave the netboot=ipxe nodes
unchanged, and the error names the server and the nodes. The replies
are those of dhcpd 4.4.
2026-10-02 20:11:18 -03:00
Vinícius Ferrão da3c4e9dfe test(dhcp): cover the iPXE feature options of an upgraded configuration
makedhcp adds the missing ISC declarations after the gpxe option space,
and the missing Kea definitions after the existing ones, once. Indented
ISC declarations and declarations with more blanks count. An ISC
configuration without the gpxe space gives an error and stays as it is,
and so does a Kea definition of option 175 without the gpxe
encapsulation, and makedhcp then writes nothing.

makedhcp writes the ISC configuration and restarts dhcpd at once. When
the configuration declares no gpxe option space, or makedhcp cannot
write the file or restart dhcpd, it reports the error and changes no
subnet or host. A marker beside the configuration stays until a restart
succeeds, so the next run restarts dhcpd before it changes a host.
Without a dhcpd.conf, or with one that xCAT did not write, it gives no
error and goes on to write a new configuration. Kea restarts to load the
definitions, also when the Control Agent applies the host reservations.

Every option code stays a number: JSON::XS writes a number that Perl has
used as a string as a JSON string, and Kea rejects it. kea-dhcp4 -t
checks an upgraded and a current configuration that makedhcp writes
back.
2026-10-02 20:11:18 -03:00
Vinícius Ferrão b781f25b70 test(dhcp): pin the xNBA boot statements and classes
Hold the Kea classes, the ISC x86 lines, and the ISC host statements of
each netboot=xnba and netboot=pxe branch to the exact text the renderers
produced before the x86 loader became selectable.
2026-10-02 19:33:19 -03:00
Vinícius Ferrão c97b8d412b test(ci): exercise the GitHub action driver
Run the unchanged driver with command and filesystem fixtures instead of
matching its source. Check apt arguments, syntax exclusions, and failure
propagation. Parse the workflow with YAML::PP and install it in CI.
2026-10-02 19:24:04 -03:00
Daniel Hilst e3d8ebf699 fix(xcat-core): a SOURCES directory per package and target outlives the build
The staging directory was keyed by package, target and uniqueext. Nothing
deleted it, so every pair left a SOURCES tree under $HOME/rpmbuild, and an
archive from an earlier run stayed beside the next run's sources.

Each forked builder now stages into $HOME/rpmbuild/sources/SOURCES.<host>.<pid>.
The pid is unique among live processes on one host, and the host name keeps two
hosts apart when $HOME is on NFS. prepare_build_sources_dir creates the directory
empty. The parent deletes it when it reaps the builder, whatever the exit, and
abort_builds deletes it for each builder that exits after SIGTERM. At start, the
run deletes the directories of this host whose pid is not alive.

buildrpms_sources_per_package.t covers the name, the empty directory, the
deletion after success and failure, and the sweep of a dead pid next to a live
one and another host.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-02 14:05:50 -03:00
Daniel Hilst 827cde7a6f test(xcat-core): xCATsn installs its templates under share/xcat/xCAT
xCATsn.spec extracts templates.tar.gz in %{prefix}/share/xcat. buildrpms.pl
creates that archive from the checkout root, so its members start with
xCAT/templates and the templates install under share/xcat/xCAT/templates.
With one shared SOURCES directory the xCAT build often wrote the archive
first, rooted at templates/, and the existence check kept it.

The tar step moves unchanged into stage_xcatsn_templates in
XCAT::BuildUtils. xcatsn_templates_staged.t stages the archive and reads its
members. It fails on this commit: the members start with xCAT/, and a second
staging keeps the old archive.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-02 14:02:27 -03:00
Daniel Hilst 6c229bed68 test(xcat-core): Kea node class sync dies without the noderes or mac table
kea_node_client_classes_for_nodes returns early, without a localboot
list, when it cannot open the noderes or mac table.
kea_sync_node_client_classes then dereferences that missing list and
dies with "Can't use an undefined value as an ARRAY reference".
dhcp_kea_ddns_deferral.t takes this path, so the unit tests fail on
master since #7830 added the localboot list.

Check the early answer and the sync with both tables unavailable.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-02 12:39:16 -03:00
Daniel Hilst e63756bdbf fix(xcat-core): the xCAT-probe source tarball is staged outside the build tree
Every RPM target of every family failed in buildrpms.pl before it built a package:

  Can't rename('.xCAT-probe-2.20.0.UNf6IG', '/xCAT-probe-2.20.0.tar.gz'):
      Invalid cross-device link at ./buildrpms.pl line 386

The staging directory is set per package in the child that buildall forks. main()
staged the xCAT-probe tarball before that fork, where $SOURCES is still the empty
string, so the destination was composed as /xCAT-probe-<version>.tar.gz.

stage_xcat_probe_sources in XCAT::BuildUtils replaces prepare_xcat_probe_source_tar.
It takes the staging directory, refuses an unset or absent one, and composes the file
name itself. buildsources calls it for the xCAT-probe package, in the child, where the
directory exists.

xcat_probe_sources_staged.t runs the staging and reads the archive: the helpers are at
xCAT-probe/lib/perl/xCAT, no temporary file is left behind, and each refusal names the
guard that fired. Removing either guard turns it red. On the unfixed tree
"./buildrpms.pl --package xCAT-probe --source-only" dies at line 386; with this change
it reaches the build lock.

Seven assertions in xcat_probe_package_payload.t matched the text of buildrpms.pl
rather than running it, and four could not fail: three matched the xCAT-release
routine, which stages the same way, and one spanned the rest of the file. All seven
stayed green while every RPM target died. They are gone.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-02 08:24:14 -03:00
Daniel Hilst d5165cadcc fix(xcat-core): concurrent package builds stage into one SOURCES directory
A core build failed in %prep with "File
/builddir/build/SOURCES/xCAT-test-2.20.0.tar.gz is smaller than 13 bytes". Its
src.rpm carried 0 bytes where two sibling builds of the same commit carried
1671225.

buildrpms.pl staged every tarball into one $HOME/rpmbuild/SOURCES while forking
a child per package and target, so one child's tar overwrote an archive another
child was copying with mock --sources.

build_sources_dir keys the staging directory per package and target, like the
mock chroot. buildrpms_sources_per_package.t covers it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 20:04:46 -03:00
Daniel Hilst 0d2f1f6450 Merge pull request #7833 from VersatusHPC/fix/remove-xcat-genesis-builder
fix(xcat-core): Remove legacy xCAT-genesis-builder
2026-10-01 10:29:29 -03:00
Daniel Hilst 4a1a3a7eae Merge pull request #7830 from VersatusHPC/test/client-server-testing
test(xcat-core): Add client/server tests to xcat criticial points
2026-10-01 10:18:31 -03:00
Daniel Hilst 7950283276 Merge pull request #7891 from VersatusHPC/fix/kea-makedhcp-before-makedns
fix(dhcp): makedhcp -n fails on a new Kea management node before makedns -n
2026-10-01 09:05:12 -03:00
Daniel Hilst 0682d56de6 Merge master into fix/remove-xcat-genesis-builder
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 09:03:27 -03:00
Daniel Hilst 6ee1045479 Merge pull request #7888 from VersatusHPC/fix/service-node-el
fix(xcat-server): an EL service node cannot install xCATsn
2026-10-01 09:02:22 -03:00
Daniel Hilst 988b1654e1 Merge master into test/client-server-testing
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 08:22:20 -03:00
Daniel Hilst 2cbd20c066 Merge pull request #7892 from VersatusHPC/fix/xcattest-openeuler-os
fix(xcat-core): xcattest runs no test case on an openEuler management node
2026-09-30 21:06:14 -03:00
Daniel Hilst 86d33741d7 Merge pull request #7889 from VersatusHPC/fix/service-node-ub
fix(xcat-server): an Ubuntu service node never installs, and never serves its compute node
2026-09-30 20:34:06 -03:00
Daniel Hilst 90813ba7d4 test(xcat-core): the Debian xCAT-test package misses xCAT::Test::OS
xcattest loads xCAT::Test::OS from /opt/xcat/lib/perl. xCAT-test.spec
installs it, but xCAT-test/debian/install does not, so xcattest on an
Ubuntu management node dies at startup with "Can't locate
xCAT/Test/OS.pm in @INC".

Check that the RPM spec and the Debian install list both ship every
module under xCAT-test/lib/xCAT. The Debian check fails.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-30 20:26:49 -03:00