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

29053 Commits

Author SHA1 Message Date
Vinícius Ferrão 447db00a81 fix(netboot): keep profile helpers with shared image utilities
Shared image utilities must not require the Debian source directory.

Keep the profile helper beside imgutils and materialize the Debian copy
when building RPM and DEB packages. Source-only Debian copies must follow
symlinks; installed Debian directories stay self-contained.
2026-10-26 18:29:45 -03:00
Vinícius Ferrão 4d5fc2b1b6 test(netboot): support copied profile payload fixtures 2026-10-26 18:00:28 -03:00
Vinícius Ferrão 8866046a4b test(netboot): preserve profile asset lookup contracts
Compare Debian and shared lookup priorities through their production
entry points and real files. Exercise Debian genimage consumers in
isolated filesystems, including custom-directory precedence and
unchanged postinstall paths.
2026-10-23 01:39:54 -03:00
Vinícius Ferrão f44c46c640 refactor(netboot): share profile asset selection
Share the readable-file search between Debian genimage and imgutils.
Keep version fallbacks and path normalization with each caller so
Debian retains its existing search order and returned paths.
2026-10-23 01:39:53 -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
Vinícius Ferrão 9653713bdd test(ci): cover Perl and Bats failure combinations
Exercise the full driver with either or both unit suites failing. Check
execution order, both result messages, and the final exit status.

Allow multiple command failures in the fixture. Encode logged commands as
JSON arrays for compatibility with older JSON::PP versions.
2026-10-20 16:20:29 -03:00
Vinícius Ferrão a1b2ac7a80 fix(ci): run Bats after Perl unit failures
Run both unit suites before stopping the CI driver. Preserve the failure
of either suite and leave later phases blocked when either suite fails.
2026-10-20 16:14:13 -03:00
Vinícius Ferrão 077e5f7b5d feat(uftp): add helpers for UFTP root image distribution
Booting nodes, nodeset, genimage and the transfer listener need one
definition of the root image that a node may receive over UFTP and of
how a request names it. xCAT::UFTP resolves a request inside the
configured image roots to the archive that packimage published with its
checksum file, and the digest that the node names must be a line of that
file. The module also reads the listener configuration and the server
key fingerprint, builds the uftp command, checks the UFTP receiver of an
image, records the initial ramdisk that genimage built with it, and
builds the nodeset kernel arguments. It accepts a uftp sender or
receiver only when it is the UFTP 5 build of xcat-dep, which marks its
version string. That build carries fixes that stock UFTP 5.0.4 lacks.

The design follows the UFTP transport that Richard Ray proposed in
xcat2/xcat-core#3560.
2026-10-20 14:18:56 -03:00
Vinícius Ferrão 32a98d6d99 docs(test): describe Genesis policy and terminal coverage 2026-10-20 13:09:32 -03:00
Vinícius Ferrão 8dab5e4989 test(genesis): exercise maintenance shell confirmation and return 2026-10-20 13:09:32 -03:00
Vinícius Ferrão 385f641e03 test(genesis): exercise journal follow and navigation 2026-10-20 13:09:32 -03:00
Vinícius Ferrão 2281b14a13 test(genesis): exercise live console status and diagnostics 2026-10-20 13:09:31 -03:00
Kevin 3926cafcff docs: replace the dead GitGuys reference for remote branches 2026-10-20 18:42:34 +03:00
Vinícius Ferrão 516e915bcc test(genesis): exercise the NetworkManager wait-online policy 2026-10-20 12:03:51 -03:00