2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 17:02:15 +00:00
Commit Graph

29062 Commits

Author SHA1 Message Date
Vinícius Ferrão 9b47f76ca2 test(destiny): distinguish complete and overlapping chain states 2026-10-23 14:11:34 -03:00
Vinícius Ferrão 97a0c8d7ac fix(destiny): match complete states when advancing the chain
Substring and regular-expression matches can mistake a different boot state
or image name for a completed chain. Compare the full state values while
preserving the completed boot exception.
2026-10-23 14:11:33 -03:00
Vinícius Ferrão e5df3dde1b test(grub2): preserve boot artifacts on rejected updates 2026-10-23 14:11:33 -03:00
Vinícius Ferrão d9936e4a60 fix(grub2): validate boot inputs before replacing configuration
Rejected protocols, unresolved addresses and missing loaders can leave a
partial configuration after removing the previous files. Check these inputs
before replacing the node configuration and its aliases.
2026-10-23 14:07:54 -03:00
Daniel Hilst 5b0127e0fb Merge pull request #7968 from VersatusHPC/fix/release-metadata-checksums
fix(build): refresh RPM metadata after signing
2026-10-23 10:55:14 -03:00
Daniel Hilst 422c156e9e Merge pull request #7980 from xcat2/fix/grub2-aarch64-efi-bootfile
fix(grub2): give aarch64 nodes a boot file name ending in .efi
2026-10-23 10:52:51 -03:00
Daniel Hilst b11865612d Merge pull request #7978 from VersatusHPC/fix/opensuse-no-legacy-genesis-rebased
fix(xcat-core): openSUSE builds a Genesis payload its manifest cannot describe
2026-10-23 10:16:09 -03:00
Vinícius Ferrão 8bb6f4ef91 test(grub2): cover the aarch64 boot file name and node loader links
Drive the Kea reservation builder and the ISC makedhcp path for grub2
nodes of each architecture. Place the loader links in the site TFTP
directory or in noderes.tftpdir. An aarch64 node with only grub2-<node>
keeps that name. The table stub returns only the requested columns, so
a missing nodetype.arch or noderes.tftpdir read fails the aarch64 cases.

Drive grub2 setstate for the node loader links: both names for an
aarch64 node and one for the others. Cover a repeated nodeset, a node
with only the old link, and removal in the boot, offline and SLES 15
standby states.
2026-10-23 02:24:42 -03:00
Vinícius Ferrão 169f3d54eb fix(grub2): give aarch64 nodes a boot file name ending in .efi
Some aarch64 UEFI firmware ignores a DHCP boot file name that does not
end in .efi and requests grubaa64.efi from the TFTP root instead. xCAT
names grub2-<node>, so these nodes stop with a TFTP error before grub2
runs.

For an aarch64 node, nodeset now links grub2-<node>.efi to
grub2.aarch64 beside grub2-<node>. Both DHCP backends name the .efi
link once it exists in the node's TFTP directory (noderes.tftpdir, or
the site one). A node set by an older xCAT keeps grub2-<node> until its
next nodeset, so makedhcp after an upgrade does not name a missing
file. With site.sharedtftp off, every server that runs nodeset for the
node creates both links. This relies on service nodes running the same
xCAT version as the management node, which xCAT requires.

The old link stays for DHCP configurations that makedhcp did not
write. The boot and offline states remove both links. Other
architectures keep grub2-<node>.
2026-10-23 02:16:59 -03:00
Daniel Hilst c9ec8b4279 fix(xcat-core): openSUSE builds a Genesis payload its manifest cannot describe
xcat-dep-build-opensuse15-x86_64 fails its xCAT-genesis-base step. BuildRequires
resolve, and verify-genesis-payload then reports 566 missing zoneinfo/posix paths,
etc/redhat-release, and 45 EL paths and tool names -- net-tools-deprecated,
kmod-compat, iputils, systemd-sysvinit, timezone, nc, mkdosfs and the lvm symlinks.
The manifest is written for EL, so the package cannot be built on openSUSE.

openSUSE ships no legacy Genesis, so it does not need to be. package_skip_reason names
the pairs a target does not build and why, buildrpms.pl prints each skipped pair, and a
plan that skips everything returns 0 rather than failing: the dep pipeline asks for
xCAT-genesis-base alone, so on openSUSE its whole plan is empty and an empty plan is
the plan.

Dropping the package alone would make xCAT unresolvable there.
xCAT-genesis-scripts.spec requires xCAT-genesis-base-%{tarch} unconditionally and xCAT
requires xCAT-genesis-scripts, so zypper install xCAT would fail on a missing package
-- later than the build and looking like something else. That Requires now stands
behind %if ! 0%{?suse_version}; the Leap chroot's /usr/lib/rpm/suse/macros sets
%suse_version 1500, and no EL or openEuler target defines it.

xCAT-test/unit/opensuse_no_legacy_genesis.t covers the skip, the empty plan and the
conditional Requires.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:44:42 -03:00
Daniel Hilst f5a029c448 test(xcat-core): assert openSUSE builds and installs without legacy Genesis
Nothing holds the openSUSE Genesis scope down. xCAT-genesis-base is built for
every target the dep pipeline names, and xCAT-genesis-scripts requires the
payload on every family.

The test reads the build-plan decision and the payload requirement in the spec.
It fails on this commit: the build plan keeps xCAT-genesis-base for openSUSE,
and the requirement carries no condition.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:44:42 -03:00
Vinícius Ferrão d90c9e6f53 test(build): verify signed repository package checksums 2026-10-21 16:09:57 -03:00
Vinícius Ferrão 40805772bc fix(build): refresh RPM metadata after signing
RPM signing can change bytes without changing the file size or whole-second
modification time used by the metadata cache. Rebuild binary and source
indexes after signing so their checksums describe the final RPMs.

Keep incremental indexing for unsigned builds.
2026-10-21 15:57:58 -03:00
Daniel Hilst 21a0ad8089 Merge pull request #7962 from VersatusHPC/feat/uftp-rootimg-transport
feat(uftp): distribute stateless root images over UFTP multicast
2026-10-21 15:52:02 -03:00
Daniel Hilst a7bf2a180a Merge pull request #7967 from VersatusHPC/test/cumulus-discovery-bats
test(cumulus): exercise discovery key failure with Bats
2026-10-21 15:38:43 -03:00
Vinícius Ferrão 12e5a89b91 test(cumulus): wait for background listener probes 2026-10-21 14:35:09 -03:00
Vinícius Ferrão 07f3442380 test(cumulus): isolate the key-generation failure
Use a valid provisioning URL so the missing-master path cannot satisfy the
expected key-generation failure status.
2026-10-21 14:35:09 -03:00
Vinícius Ferrão b6334f7f55 docs(test): update Cumulus discovery test instructions 2026-10-21 14:35:09 -03:00
Vinícius Ferrão cc603ea2c0 test(cumulus): exercise discovery key failure with Bats
Run the complete discovery postscript in the shared shell sandbox. Keep the
key-generation, exit-status and listener side-effect checks. Preserve the
dedicated CI step and its cancellation condition.
2026-10-21 14:18:21 -03:00
Daniel Hilst 4deb10d9ca Merge pull request #7965 from VersatusHPC/docs/shared-profile-maintenance
docs(profiles): explain shared profile maintenance
2026-10-21 14:15:31 -03:00
Daniel Hilst 40292a1019 Merge pull request #7957 from VersatusHPC/fix/genesis-header-redraw
fix(genesis): clear stale identity text from the console header
2026-10-21 13:14:47 -03:00
Daniel Hilst 383f85ea14 Merge pull request #7961 from VersatusHPC/refactor/r26-fips-policy
refactor(fips): share shell policy across runtime artifacts
2026-10-21 13:13:12 -03:00
Vinícius Ferrão 632f700e44 docs(uftp): list openEuler among the UFTP images
openEuler stateless images use the rh genimage and dracut modules,
which add the UFTP receiver, and xcat-dep now builds uftp for the
openEuler targets. List openEuler with the supported images and the
uftp package.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão 126a468117 docs(uftp): describe UFTP root image distribution
Describe how genimage, nodeset, the listener and the booting node work
together, the supported images, the cases that nodeset refuses, and
what a transfer trusts. Describe the listener setup, the firewall and
multicast requirements, service nodes, and the transfer rate and jumbo
frame settings. Add the rootimgtransport attributes of the site and
the osimage to the reference pages.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão c0f99c235b test(uftp): cover the UFTP marker in imgexport and imgimport
The export of an image must name the UFTP marker of its initial
ramdisk, and the import must place the marker next to the ramdisk. An
import from a bundle that names the marker but lacks it must fail and
leave the published files.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão 1cf8dcc5e3 feat(uftp): keep the UFTP marker through imgexport and imgimport
nodeset refuses a uftp image unless the marker that genimage wrote
matches its initial ramdisk. imgexport did not carry the marker, so an
imported image could not use UFTP until genimage ran again. imgexport
and imgimport now carry it like the root image check marker.
imgimport refuses a bundle that names the marker but lacks it, before
it replaces any boot file.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão 8a425dcde8 test(uftp): cover the UFTP boot arguments of nodeset
The anaconda, sles and debian plugins must pass the listener port and
the server key fingerprint only for a stateless image set to uftp,
directly or from the site value. They must refuse a node for a managed
argument in addkcmdline, a turned off check, an https image URL, an
initial ramdisk without the receiver, a missing listener
configuration, or an unknown transport. A refused node must keep the
kernel and initial ramdisk in TFTP. A statelite ramdisk image must
ignore site.rootimgtransport.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão 9a7a690ec7 feat(uftp): pass the UFTP boot arguments in nodeset
nodeset adds xcat.uftp= and xcat.uftpfp= to the kernel command line of
a stateless node whose image has rootimgtransport uftp, directly or
from site.rootimgtransport. The node then receives the root image over
UFTP and downloads it over HTTP when that fails.

nodeset refuses a node when its image cannot use UFTP. That is the case
when the root image check is off, the image URL uses https, or the
image has a BitTorrent .metainfo file. It is also the case when the
listener does not serve the image directory, or the initial ramdisk
that nodes will boot is not the one that genimage marked as having the
receiver. nodeset also refuses a node whose linuximage.addkcmdline or
bootparams.addkcmdline sets either argument. nodeset checks this before
it copies the boot files to TFTP, so a refused node keeps its current
boot entry and the kernel and initial ramdisk that the entry names.
Statelite images ignore the attribute, as it applies to stateless
images only.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão 621c460a21 test(uftp): cover the UFTP receiver of Ubuntu stateless nodes
The Ubuntu xcatroot must receive an image over UFTP under dash and
check it like a download. It must read the UFTP arguments from the
kernel command line, which has them, and not from its environment,
which does not.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão 0c160da2d0 feat(uftp): receive the root image over UFTP on Ubuntu stateless nodes
genimage gives the stateless dracut initial ramdisk of an Ubuntu image
the same UFTP receiver as an EL image, under the same conditions.
xcatroot receives the first copy of the image over UFTP when nodeset
asks for it, and checks it like an HTTP download.

The kernel does not pass an argument with a dot, such as xcat.uftp=,
to init as a variable. The Ubuntu xcatroot reads these arguments with
the dracut getarg function, in a subshell, so its other variables keep
their sources.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão dc84312cd0 test(uftp): cover the UFTP receiver of SLES stateless nodes
The SLES xcatroot must receive an image over UFTP and check it like a
download, and fall back to HTTP in the same cases as the EL scripts.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão a4cef2c4ce feat(uftp): receive the root image over UFTP on SLES stateless nodes
genimage gives the stateless initial ramdisk of a SLES or openSUSE Leap
image with dracut 033 or later the same UFTP receiver as an EL image. It
adds the helper and uftpd when the image has the UFTP 5 receiver of
xcat-dep for its architecture, checks the built ramdisk, and marks it
for nodeset. xcatroot receives the first copy of the image over UFTP
when nodeset asks for it, and checks it like an HTTP download.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão d4ea2c6c51 test(uftp): cover the UFTP receiver of EL stateless nodes
genimage must add the helper only for an image with the UFTP 5 receiver
of xcat-dep for its architecture, and remove an older copy otherwise. It
must fail when the built ramdisk lacks the receiver files. The marker
must follow the published ramdisk.

The helper must ask the listener only for a digest that the checksum
file lists for the image, and stop its receiver on every failure.
xcatroot must check a received image like a download. It must fall back
to HTTP when UFTP fails, is not set up, or the image is not checked.
2026-10-21 11:44:22 -03:00
Vinícius Ferrão 3dcf4bdef7 feat(uftp): receive the root image over UFTP on EL stateless nodes
genimage adds the UFTP fetch helper and uftpd to the stateless initial
ramdisk of an EL image that has the UFTP 5 receiver of xcat-dep for its
architecture. It checks that the built ramdisk holds the receiver files.
It writes a marker with the digest of the published ramdisk, which
nodeset compares before it asks for UFTP. Without a usable receiver,
genimage removes the helper and the marker.

When nodeset passes xcat.uftp=, xcatroot receives the first copy of the
image over UFTP. The helper asks the listener for the archive that the
checksum file names, as fetched before the request. xcatroot checks the
received file against the checksum file like an HTTP download. A
mismatch or a failed transfer is followed by the HTTP download loop.
UFTP is used only together with rootimgchecksum=yes.
2026-10-21 11:44:21 -03:00
Vinícius Ferrão 0f2f1cfd05 test(uftp): cover the UFTP transfer listener and its package removal
The listener must send the requests for one archive with one sender. It
must refuse paths outside the image roots, archives without a checksum,
and digests that the checksum file does not list. A queued batch must
keep its archive after the next publication. The limits on
connections, queued jobs, senders, receivers and time must hold. Package
removal must stop and disable the service, and an upgrade must leave it
alone.

The unit test calls the listener subs of xCAT::UFTP in process, with a
fixed clock and a sender start that it records. native/uftp_listener.t
runs the listener script with uftp and uftp_keymgt fixtures. It covers
key creation, a read-only log directory, sender processes, shutdown and
connection limits. The pull-request workflow runs it.
2026-10-21 11:44:21 -03:00
Vinícius Ferrão 199e4733a7 feat(uftp): add the UFTP transfer listener
Booting nodes need a server that sends a published root image once to
every node that asks for it in a short window.

xcat-uftp-listener accepts HTTP/1.0 GET requests that name an image
path and its digest. It serves only an archive that packimage published
under the configured image roots, for a digest that the checksum file
lists. It keeps the archive open from the first request, so a later
packimage does not change the bytes of a queued batch. It collects the
requests for the same inode, digest and port for batch_delay seconds,
then runs one closed-group uftp session for the batch. Connections,
queued jobs, senders and receivers per job are limited.

The sender gets an argument vector built only from the configuration,
and signs the encrypted session with a persistent server key. It drops a
receiver that misses nearly every block of a section, so one node
without multicast cannot hold the session open. A sender that is not the
UFTP 5 build of xcat-dep is refused.

block_size allows larger packets on jumbo frame networks, up to the
8800-byte limit of uftp.

xCAT::UFTP holds the decisions of the listener: request checks, batches,
limits, timeouts and the runtime check. The script holds the sockets,
the key commands and the sender processes.

The packages install the service but do not enable it. Package removal
stops and disables it.
2026-10-21 11:44:21 -03:00
Vinícius Ferrão 6270fd7108 test(uftp): cover request checks, the receiver and the boot arguments
A request must resolve only to an archive that packimage published with
its checksum, under an image root, owned by root and not writable by
others, and only for a digest that the checksum file lists. An open
archive must keep the bytes of its batch after the next publication. The
UFTP checks must accept only the marked UFTP 5 build of xcat-dep, and a
receiver only for the image architecture. nodeset must refuse an image
without the checksum, with https or --tracker, outside the image roots
of the listener, or with a path that a request cannot name. It must also
refuse a statelite image, an initial ramdisk without the receiver, and a
managed argument in the addkcmdline of the image or the node.
2026-10-21 11:44:20 -03:00
Vinícius Ferrão 262bf12ae4 docs(test): describe Genesis header redraw coverage 2026-10-21 11:43:54 -03:00
Vinícius Ferrão 82fa33a0eb test(genesis): cover console header identity changes 2026-10-21 11:43:34 -03:00
Vinícius Ferrão dd26b11a01 fix(genesis): clear stale identity text from the console header
A shorter node identity leaves the prefix of the previous text on screen.
Pad the field on each redraw to erase that prefix.

Limit the field to the context buffer before padding. This keeps leading
spaces from truncating the identity on wide terminals.
2026-10-21 11:43:06 -03:00
Vinícius Ferrão 88f8d3f92d docs(fips): remove misleading generation order comment 2026-10-21 11:36:55 -03:00
Vinícius Ferrão 0b42cb5fd4 test(fips): reject malformed artifacts before writes 2026-10-21 11:36:55 -03:00
Vinícius Ferrão 26be5646f9 test(fips): preserve the policy command contract 2026-10-21 11:29:41 -03:00
Vinícius Ferrão 0d95f40775 docs(profiles): explain shared profile maintenance 2026-10-21 11:17:08 -03:00
Daniel Hilst cfa3073da7 refactor(fips): generate the shell policy through a module sub
xCAT-test/unit/fips_policy_sources.t ran build-utils/sync-fips-policy as a
subprocess, so a file in the unit directory measured a program rather than a
routine, and it asserted on the diagnostics the script printed instead of on an
answer. buildrpms.pl and builddebs.pl started the same script with system() to
check the generated libraries before packaging xCAT or xCAT-genesis-scripts.

XCAT::BuildUtils gains fips_policy_artifacts, fips_policy_plan and
sync_fips_policy. fips_policy_plan reads the canonical policy and both runtime
libraries and reports what generation would write, without writing.
sync_fips_policy applies that plan in write mode and returns the stale paths,
the paths it rewrote and the diagnostics for its caller to print. The two
builders now call sync_fips_policy in their own process and print the
diagnostics before they stop, which keeps the output xCAT-test/native/
fips_build_guard.t asserts on. build-utils/sync-fips-policy keeps its
--check and --write contract and its exit status, and is now a thin caller.

The unit test calls the sub in-process and asserts on the returned hash. It
also covers a library holding two policy blocks and a library replaced by a
symbolic link, which the subprocess form did not reach. Ten mutants of the
module, one per guard, each fail the assertion that names that guard.

xCAT-test/bats/fips_policy_artifacts.bats copies XCAT::BuildUtils into its
fixture, because the script it runs now loads the module.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:42:37 -03:00
Daniel Hilst b74a0f27aa Merge upstream/master into refactor/r26-fips-policy
Two files needed a resolution. Both are unions of independent additions.

XCAT::Test::Lifecycle::build_deb takes master's new $source argument and its
-xpf extraction, and keeps the control-$arch selection this branch adds for
xCAT-genesis-scripts. $source defaults to the repository root, so the branch
behaviour does not change.

.github/workflows/xcat_test.yml keeps master's profile_package_payload.t on
both lifecycle prove lines and master's Perl module list, and keeps this
branch's FIPS steps, bzip2 and openssl.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:32:47 -03:00
Daniel Hilst ee6b4f5328 Merge pull request #7964 from VersatusHPC/fix/ci-run-bats-after-perl-failure
fix(ci): run Bats after Perl unit failures
2026-10-21 09:33:40 -03:00
Vinícius Ferrão e87e226412 Merge pull request #7963 from KevinSpek/fix-dead-links
docs: replace the dead GitGuys reference for remote branches
2026-10-21 09:22:52 -03:00
Daniel Hilst 47168d7adf Merge pull request #7934 from VersatusHPC/refactor/r26-provisioning-reuse
refactor(provisioning): share package defaults and identical profiles
2026-10-21 08:21:57 -03:00
Daniel Hilst c0724ea08c Merge pull request #7959 from VersatusHPC/test/r26-oe-behavior-gaps
test(genesis): cover console interaction and NetworkManager policy
2026-10-21 07:59:14 -03:00