2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 01:42:15 +00:00
Commit Graph

2858 Commits

Author SHA1 Message Date
Vinícius Ferrão 63bd36cfd4 fix(install): leave the USB NIC of the BMC down on installed EL nodes
post.rhels8 turns on every NIC that has link during the installation.
The USB NIC of a BMC host interface always has link, so the installed
node starts DHCP on it at boot, gets no lease, and
NetworkManager-wait-online fails.

post.rhels8 now skips NICs bound to a USB class driver: cdc_ether,
cdc_ncm, cdc_eem or rndis_host, which Linux binds to the USB gadget of a
BMC. USB Ethernet adapters with their own driver, the other NICs with
link, and NICs without a sysfs entry come up as before.
2026-11-07 00:59:01 -03:00
Daniel Hilst a695723541 Merge pull request #8006 from VersatusHPC/fix/el-kickstart-pre-log
fix(install): copy the kickstart pre-install log from the installer
2026-11-07 00:54:01 -03:00
Vinícius Ferrão b45dc1e85f fix(install): copy the kickstart pre-install log from the installer
The EL8 and later kickstart templates append /tmp/pre-install.log to
/var/log/xcat/xcat.log in the chroot %post. Anaconda runs that block in
the installed system, whose /tmp does not hold the installer's log, so
the %pre output, such as the install disk and the partition layout,
never reaches the node's xcat.log.

Copy the log in a %post --nochroot block before the main %post, from
the installer's /tmp to the installed system at /mnt/sysimage. The EL6
and EL7 templates use %include for this and are unchanged.
2026-11-06 23:10:32 -03:00
Vinícius Ferrão 944ac3f6e9 fix(install): keep custom partition files out of the install log
pre.rhels8 and pre.rhels10 print /tmp/partitionfile into the
pre-install log, so that the partition scheme can be inspected after
the installation. A custom partitionfile can hold credentials, such as
the --passphrase of an encrypted partition or a boot loader --password,
and the log then holds them in clear text. With site.xcatdebugmode 1 or
2, %pre also traces the decoding of a custom partitionfile or partition
script, and the trace spells out every decoded byte.

The pre-install log now shows the partition scheme only when xCAT
generated it, and says that a custom partition file is not logged. The
decoding of a custom partitionfile or partition script runs untraced.
/tmp/partitionfile, which anaconda reads, is unchanged.
2026-11-06 23:10:32 -03:00
Vinícius Ferrão 93f27a2674 fix(netboot): hand the NetworkManager lease of the initrd to diskless roots
xcatroot passes the DHCP lease of the initrd to the root image only from
/tmp/dhclient.*.lease, which the old dracut network scripts write. An
initrd that runs NetworkManager keeps its lease in /var/lib/NetworkManager.
The NetworkManager of the root takes over the same connection, finds no
lease and starts again with DHCPDISCOVER while the address stays on the
interface. A DHCP server that does not answer in time makes
NetworkManager-wait-online fail, and when the DHCP timeout expires
NetworkManager removes the address from the boot interface.

xcatroot now also copies the NetworkManager leases, so the root renews
the lease of the initrd with a DHCPREQUEST. Only the stateless xcatroot
of dracut_047 changes; statelite and the other dracut modules keep their
handoff.
2026-11-06 23:10:30 -03:00
Daniel Hilst 21b24f1e7d fix(xcat-core): use_host_resolver dies on an undefined subroutine move
imgutils.pm imports File::Copy with an empty list, so the module exports no
function and a bare move() is not defined. use_host_resolver calls move()
unqualified, so it dies with "Undefined subroutine &imgutils::move called" the
first time genimage reaches it, before it has moved either file aside.

Every other call site in the file already qualifies the name:
File::Copy::cp at line 139, File::Copy::copy at 208 and at 302, the last of
them two lines below the defect. The call is now qualified the same way.

xCAT-test/unit/imgutils_host_resolver.t and imgutils_reused_root.t both die at
load on the unfixed tree and pass with the fix, 34 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-06 17:34:05 -03:00
Daniel Hilst 0e3caac201 Merge pull request #8019 from VersatusHPC/fix/ubuntu-genimage-rerun
fix(ubuntu): reuse the root image of an earlier genimage run
2026-11-06 17:21:59 -03:00
Daniel Hilst 1b91c188ce Merge pull request #8018 from VersatusHPC/fix/ubuntu-genimage-boot-files
fix(genimage): publish the kernel and ramdisks together
2026-11-06 17:17:10 -03:00
Daniel Hilst 0c94c50f55 Merge pull request #8011 from VersatusHPC/fix/go-xcat-apt-listing
fix(go-xcat): read apt candidates in the C locale
2026-11-06 16:57:30 -03:00
Vinícius Ferrão a53b65a96d fix(genimage): take the image lock for every EL geninitrd run
The Red Hat-family genimage took the image operation lock with
--onlyinitrd only for openEuler. Two geninitrd runs on another release,
or a geninitrd run during packimage, could publish and roll back boot
files over each other.

genimage now takes the lock with --onlyinitrd for every release, as it
already does for a full build.
2026-11-06 15:31:39 -03:00
Vinícius Ferrão 8a059f4665 fix(genimage): restore boot files from the recorded backups
publish_staged_boot_files looked for the backup of a file during the
rollback to decide whether to restore it or remove the published file.
When that lookup failed, it removed the published file, and the staging
cleanup then removed the backup.

publish_staged_boot_files now records each backup that it makes and
rolls back from that record. A file without an earlier copy is one for
which link reports ENOENT. Any other link error stops the publication.
2026-11-06 15:25:36 -03:00
Vinícius Ferrão 9a02347d97 fix(genimage): put back a boot file that a failed rename moved
On NFS, a rename can take effect and still report a failure after the
client retries the request. publish_staged_boot_files then put back
only the files that it published before, so the new file stayed next
to the older set, and the staging cleanup removed its backup.

When the staged copy of the file is gone after a failed rename,
publish_staged_boot_files now puts back that file too.
2026-11-06 15:19:24 -03:00
Vinícius Ferrão 876ff7bfe0 fix(genimage): publish the EL kernel and ramdisks together
The Red Hat-family genimage staged and published the boot files only
for openEuler. For the other releases, it copied the kernel into the
image directory before it built the initial ramdisks, and it ignored a
failed kernel copy and a failed move of a ramdisk. When dracut failed,
the new kernel stayed next to the ramdisks of the earlier build. On
images without dracut, a failed cpio replaced the ramdisks with empty
archives.

genimage now builds the kernel and both ramdisks in a temporary
directory inside the image directory for every release, and publishes
them with publish_staged_boot_files after both ramdisks are built. It
stops when the kernel copy, dracut, the move of a ramdisk or any command
of the cpio pipeline fails. openEuler keeps its single stateless
ramdisk.
2026-11-06 14:56:31 -03:00
Vinícius Ferrão 555732abf9 refactor(genimage): share the kernel copy and the cpio packing
The Ubuntu and the Red Hat-family genimage each had their own code to
find and copy the kernel of the image and to pack a cpio initial
ramdisk. imgutils now has copy_kernel and pack_initrd for this, and the
Ubuntu genimage uses them.

copy_kernel also takes lib/modules/<release>/vmlinuz, which the Red
Hat-family genimage already takes.
2026-11-06 14:52:56 -03:00
Vinícius Ferrão 35b7e5a91f fix(ubuntu): publish the kernel and ramdisks of genimage together
genimage copied the kernel to the image directory before it built the
initial ramdisks. When dracut failed for either ramdisk, a new kernel
stayed next to the old ramdisks, and nodeset copied that set. The
legacy ramdisk ignored a failed cpio pipeline and published what the
compressor wrote.

genimage now builds the kernel and both ramdisks in a staging
directory in the image directory. It publishes them together with
publish_staged_boot_files after both ramdisks are built, and writes the
root image check and UFTP markers after that. A failure leaves the
previous kernel and ramdisks in place.
2026-11-05 21:38:54 -03:00
Vinícius Ferrão acc8089c2a refactor(genimage): publish a staged kernel with several initial ramdisks
publish_boot_files publishes one kernel with one initial ramdisk, so a
genimage that builds the statelite and the stateless ramdisk cannot
use it. publish_staged_boot_files publishes the kernel and the ramdisks
of several modes from one staging directory. When a rename fails, it
puts back every file that it already replaced.

publish_boot_files keeps its interface for the openEuler build.
2026-11-05 21:38:54 -03:00
Vinícius Ferrão 4ea954099a fix(ubuntu): reuse the root image of an earlier genimage run
genimage ran debootstrap on every run. For Ubuntu 19.04 and later,
debootstrap extracts with tar -k, so a second run on an existing root
image failed at base-files and blamed the mirror.

genimage now skips debootstrap when an earlier run finished it and
updates the image with apt. The image holds the dummy resolv.conf and
the otherpkgs apt sources of that run. Before the first apt command,
genimage removes the apt sources that it writes again later and gives
the image the hosts and resolv.conf of the build host. A .bak file
that an interrupted run left is kept, so the image still gets its own
file back.

genimage stops with an error and leaves the root image unchanged in
three cases. The root image holds another Ubuntu release or
architecture, the debootstrap directory of an unfinished run, or the
bin/uname-binary backup of an interrupted run.
2026-11-05 18:39:24 -03:00
Vinícius Ferrão 3e3ee8f108 fix(ubuntu): publish the newest kernel of a root image
genimage took the last kernel of a sorted file list. When an image
held 6.8.0-99-generic and 6.8.0-100-generic, it published -99 and
built the initrds for it. The uname of the image build also reported
-99 to the package scripts, and it ignored an explicit kernelver.

genimage and that uname now compare kernel releases number by number,
so both choose -100. An explicit kernelver decides for both.
2026-11-05 18:39:24 -03:00
Vinícius Ferrão b473ce90d0 fix(ubuntu): lock the root image while genimage builds it
packimage, rmimage and the EL genimage take the image operation lock
of a root image, but the Ubuntu genimage did not. packimage or rmimage
could work on a root image while genimage installed packages in it,
and two genimage or geninitrd runs could change one root image at the
same time.

genimage now takes the lock before it changes the root image, for a
full build and for the --onlyinitrd run of geninitrd, and holds it
until it exits.
2026-11-05 16:59:53 -03:00
Vinícius Ferrão f1d8641672 fix(ubuntu): keep a partitionfile layout on the partitionfile disk
A Subiquity layout written with "layout:" and no "match" goes to the
largest disk. With a d: or s:d: entry in linuximage.partitionfile, that
disk need not be the one the entry selected, so the install could wipe a
disk the entry was meant to keep it off.

When a disk entry is configured, give such a layout a match on the
selected disk. Refuse a use_gap layout in that case, because some
Subiquity releases ignore match in use_gap mode and would install into
free space on another disk. A layout with its own match, a "config:"
layout and a layout without a disk entry are kept as written.
2026-11-03 17:53:20 -03:00
Vinícius Ferrão 45546220be fix(ubuntu): stop a Subiquity install when a partitionfile entry fails
A disk script or layout script that failed, or a disk or layout entry that
held nothing usable, left the disk getinstdisk chose or the default layout
in place, and the install went on to wipe that disk. A layout whose
storage section is missing or empty is worse: Subiquity then puts LVM on
the largest disk. The entry exists to keep the install off some disks, so
these fallbacks can destroy the disk it protects. A valid layout that
started a YAML document also broke the install, because it was appended
to autoinstall.yaml as a second document.

When a disk or layout entry is configured, require it to succeed and to
write a disk name, or a storage section with a config or a layout, and
stop the pre-install script with an error otherwise. Subiquity then stops
before it partitions. Rewrite an accepted layout as a YAML fragment that
holds only the storage section. Without an entry, the detected disk and
the default layout are used as before.
2026-11-03 17:53:20 -03:00
Vinícius Ferrão 1f990063f5 fix(ubuntu): apply partitionfile entries on Subiquity installs
linuximage.partitionfile had no effect on Ubuntu 20.04 and later installs.
The Subiquity pre-install script decodes each entry with base64decode,
which uses read -n, and Subiquity runs the script under dash, which has no
read -n. A layout file decoded to an empty storage config, which stops the
install, and a layout script or disk script decoded to nothing. The d: and
s:d: disk step also ran after the script had written the storage config,
so a disk file could not change the disk that getinstdisk chose, which
prefers a disk that already holds an operating system.

Decode with coreutils base64, which the live system ships, and run the
disk step before the storage config is written. The storage config uses
the first disk the disk file names, because the layout uses one disk, and
names it by its device node: Subiquity matches the path literally and
finds no disk for a /dev/disk/by-id link.
2026-11-03 17:53:19 -03:00
Daniel Hilst 557a39dd0c Merge pull request #8013 from VersatusHPC/feat/openeuler-riscv64
feat(openeuler): support riscv64 compute nodes
2026-11-03 13:17:33 -03:00
Daniel Hilst a82d521152 Merge pull request #8009 from VersatusHPC/fix/el10-initrd-network-handoff
fix(netboot): drop the dhclient and ifcfg handoff from EL10 initrds
2026-11-03 13:15:15 -03:00
Daniel Hilst 3ab5de330d Merge pull request #8008 from VersatusHPC/fix/el10-netboot-auto-default
fix(netboot): keep EL10 diskless nodes from DHCP on every port
2026-11-03 13:14:44 -03:00
Daniel Hilst f5db4cb78f Merge pull request #8005 from VersatusHPC/fix/riscv64-efi-boot-entries
fix(install): keep the riscv64 boot entries of other disks
2026-11-03 13:14:14 -03:00
Daniel Hilst f76458fb4b Merge pull request #8002 from VersatusHPC/fix/go-xcat-apt-install
fix(go-xcat): install from apt without apt-key and skip missing packages
2026-11-03 13:13:49 -03:00
Vinícius Ferrão 4f8d099b19 fix(install): start kdump on openEuler nodes only with dump memory
On riscv64, an installed openEuler node reserves no dump memory, so
kdump.service fails and the node boots degraded.

The openEuler kickstart %post adds the kdump.service drop-in that
stateless images get. It runs before post.rhels8, which ends the %post
script with exit 0. A node whose command line carries crashkernel= or
fadump= still starts kdump.
2026-11-02 19:55:56 -03:00
Vinícius Ferrão 48c4f81b82 fix(netboot): start kdump on stateless nodes only with dump memory
openEuler diskless images enable kdump.service, which @core brings in. A
stateless command line reserves dump memory only through linuximage.dump
or addkcmdline, so on every other node kdump.service fails and the node
boots degraded.

genimage adds a kdump.service drop-in with triggering conditions on
crashkernel and fadump, so the service is skipped when the command line
has neither. POWER firmware-assisted dumps, which xCAT configures with
fadump= and no crashkernel=, still start. An image without kdump.service
is unchanged.
2026-11-02 19:37:46 -03:00
Vinícius Ferrão 1e1ed51601 fix(go-xcat): keep tput errors out of the package table
list_xcat_packages reads the terminal width with tput cols. With an
unknown or unset TERM, tput prints "unknown terminal" or "No value for
$TERM" in the middle of the go-xcat output.

Check the terminal type with tput longname, with its output discarded,
before reading the width. tput cols keeps its stderr, because the tput
of ncurses 5 (EL7) reads the width through stderr. With stderr
discarded, it reports 80 columns on a wider terminal.
2026-10-30 21:02:43 -03:00
Vinícius Ferrão 3d30d5fd86 fix(go-xcat): read apt candidates in the C locale
check_repo_version_apt looks for the "Candidate:" label of apt-cache
policy. A translated apt prints that label in the user's language. The
package table of go-xcat check, install and update then showed every
package as "(not found)" in the repositories.

Run apt-cache policy with LC_ALL="C" inside check_repo_version_apt, so
that every caller gets the untranslated labels. Drop the LC_ALL=C that
the install filter added.
2026-10-30 21:02:42 -03:00
Vinícius Ferrão 1c42a2c729 fix(netboot): drop the dhclient and ifcfg handoff from EL10 initrds
The dracut_105 xcatroot scripts and the statelite xcat-prepivot.sh
copied dhclient leases and wrote an ifcfg file for the boot interface.
EL10 has no dhclient and no ifcfg plugin. The copy failed with "cannot
stat" on every boot, and the ifcfg write failed on a directory that the
image does not have. NetworkManager in the initrd already hands the boot
interface to the NetworkManager of the root image.

The scripts no longer copy leases or write ifcfg files.
2026-10-30 17:51:15 -03:00
Vinícius Ferrão 9da20e00cd fix(netboot): keep EL10 diskless nodes from DHCP on every port
NetworkManager in an EL10 diskless image made a DHCP profile for every
Ethernet port without one. A port with a link but no DHCP server kept
NetworkManager-wait-online from finishing, so the node booted degraded.
Diskful nodes are not affected, because anaconda writes a profile for
every port.

genimage now sets no-auto-default=* in the NetworkManager configuration
of EL10 images. The boot interface keeps the profile from the initial
ramdisk. The other interfaces get only the profiles that the image or
the xCAT network configuration gives them.
2026-10-30 17:43:53 -03:00
Vinícius Ferrão 2536ccc134 fix(netboot): write keyfiles for the otherifce interfaces of EL10 images
genimage wrote an ifcfg file for each interface that otherifce or
genimage -r names. EL10 reads no ifcfg files, and its images have no
network-scripts directory. Such an interface got DHCP only from the
profile that NetworkManager makes for any port without one.

genimage now writes a NetworkManager keyfile with DHCP for each of these
interfaces on EL10 and later. A rebuild replaces the keyfiles of the
earlier build. Older releases still get the same ifcfg files.
2026-10-30 17:43:53 -03:00
Vinícius Ferrão 2f160aea37 fix(install): keep the riscv64 boot entries of other disks
The EL10 riscv64 fix-up removed every UEFI boot entry for shimx64,
grubx64 or grubriscv64, on any disk. The default partition layout
installs to one disk and keeps the others, so an operating system on
another disk lost its boot entry.

The fix-up now removes only the entries on the ESP of the new install.
Anaconda removes the entries with its own label before it adds its own,
so an install that recreated the ESP leaves no old entry behind. When
lsblk reports no partition GUID for the ESP, the fix-up removes nothing
and still adds the new entry.
2026-10-30 15:55:05 -03:00
Vinícius Ferrão 15f208ad0c fix(go-xcat): skip packages the apt repositories do not provide
On apt, go-xcat handed its whole list to one apt-get install, so a package the
repositories lack aborted the install. ipxe-xcat is in the install list but
not in the latest apt repositories, and no riscv64 apt repository has
xcat-genesis-openembedded-riscv64.

Install the packages that have a candidate and warn about each one that has
none, as dnf --setopt=strict=0 already does on EL. A missing xcat metapackage
still stops the install, because it depends on every package a management
node needs. A failed apt-cache policy query also stops it, so a broken cache
is not taken for missing packages. The query runs in the C locale, because a
translated apt prints no "Candidate:" label.
2026-10-29 20:32:05 -03:00
Vinícius Ferrão f937b60a71 fix(go-xcat): install the apt key without apt-key
apt 3, which Ubuntu 26.04 ships, has no apt-key, so go-xcat stopped with
"import xcat apt key failed" before it configured a repository. On Ubuntu
18.04 to 24.04, apt-key also fails when gnupg is not installed, and go-xcat
does not install it.

Decode the armored key with base64 and install it as the binary keyring
/etc/apt/trusted.gpg.d/xcat.gpg. Every apt release reads that file, while
apt 1.0 and 1.2 on Ubuntu 14.04 and 16.04 ignore an armored key there. The
key stays trusted for all repositories, as it was with apt-key. A complete
uninstall removes the key with the repository files.

As with apt-key, a download that holds no public key stops go-xcat and
leaves the installed key in place. go-xcat refuses a download whose armored
blocks do not all end with their END line, as a truncated download does. It
accepts the keyring only when it starts with a public key packet, the check
apt applies to a binary keyring.
2026-10-29 20:32:04 -03:00
Vinícius Ferrão 9ed498e50f fix(netboot): give riscv64 images the Intel 700 and 800 series drivers
The riscv64 default driver lists had no i40e or ice, so the initrd of a
diskless image could not bring up the network of a riscv64 server with an
Intel X710 or E810 adapter. Add both drivers to the EL and Ubuntu rows.
genimage pulls their module dependencies from modules.dep.
2026-10-29 17:52:23 -03:00
Daniel Hilst ac0ec70821 Merge pull request #7979 from VersatusHPC/refactor/debian-profile-lookup
refactor(netboot): share profile asset selection
2026-10-29 14:58:18 -03:00
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
Daniel Hilst c768025739 Merge upstream/master into feat/selinux-netboot
Twelve conflicts, all from xcat-core/#7970 landing.

Eleven are the one sed line in the netboot postinstall profiles, where #7970 and
this branch replaced the same line with different patterns. Master's wins: it
anchors on optional leading blanks and preserves a trailing comment, which this
branch's `s/^SELINUX=.*$/SELINUX=disabled/` would have eaten. This branch's own
postinstall_selinux_config.bats asserts "the comment that names permissive keeps
its text", so the better pattern is the one its test already wanted -- 6 of 6
pass on master's version. What master's pattern does not catch is a value
outside enforcing|permissive, which nothing here tests and no stock config
ships.

The twelfth is .github/workflows/xcat_test.yml: master added a step to the
existing job and this branch adds a whole selinux_policy_test job after it.
Resolved as the union, with master's step where it put it; the file still parses
and names three jobs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 14:42:37 -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
Vinícius Ferrão 88915f34cf fix(netboot): use POSIX firewalld checks in postinstall profiles
Use separate test commands under /bin/sh. Remove regular files and symlinks,
including dangling links, while retaining absent entries and directories.
2026-10-21 18:07:11 -03:00
Vinícius Ferrão ce335ba3b3 fix(netboot): correct SELinux assignments in postinstall profiles
Match the complete enforcing or permissive setting. Preserve comments and
whitespace, and do not change unrelated lines or create a missing policy
file.
2026-10-21 18:01:27 -03:00
Daniel Hilst 141f5b62ef Merge remote-tracking branch 'upstream/master' into feat/selinux-netboot
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>

# Conflicts:
#	.github/workflows/xcat_test.yml
2026-10-21 16:51:43 -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
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 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 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 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