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

29287 Commits

Author SHA1 Message Date
Vinícius Ferrão e87c72c38d fix(template): read each partitionfile entry with its own s: prefix
linuximage.partitionfile takes a comma-separated list of layout, d: disk
and c: configuration entries, any of them prefixed with s: for a script.
The Ubuntu layout step chose between decoding a layout file and running a
layout script by the s: prefix of the last entry in the whole list, so a
layout file followed by an s:d: disk script was run as a script, and a
layout script followed by a d: disk file was copied into the layout as
text. The parser also kept a script flag set by an earlier entry of the
same kind after a later entry replaced it.

Give each kind the prefix of the entry that is used, the last one of that
kind, and decode the Ubuntu layout by it.
2026-11-03 17:53:19 -03:00
Vinícius Ferrão 94fb370ee4 test(ubuntu): cover partitionfile entries on Subiquity installs
Render the node's pre-install script through the Template entry point and
run its partitioning under dash. Without a partitionfile the storage config
keeps the disk getinstdisk chose. A disk file puts its first disk there,
resolved when it is a link, a disk script puts the disk it writes there,
and a layout file or layout script replaces the default storage config.
2026-11-03 17:53:19 -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
Daniel Hilst 753ec32eb5 Merge pull request #8001 from VersatusHPC/fix/riscv64-intel-net-drivers
fix(netboot): give riscv64 images the Intel 700 and 800 series drivers
2026-11-03 13:13:21 -03:00
Daniel Hilst 4e13265ed2 Merge pull request #8000 from VersatusHPC/fix/ipmi-sdr-reservation
fix(ipmi): read the SDR when the BMC grants an unadvertised reservation
2026-11-03 13:12:34 -03:00
Vinícius Ferrão e95818d928 docs(openeuler): say that copycds refuses mixed riscv64 builds
The openEuler guide now says that copycds refuses to copy the RVA20 and
RVA23 builds of a release over each other, and that -p copies the second
build to another directory.
2026-11-02 19:55:57 -03:00
Vinícius Ferrão c2af0283ab test(anaconda): refuse to mix the RVA20 and RVA23 openEuler media
copycds must refuse media of one build over a copy of the other, before
it opens any table, and leave the copy unchanged. Media of the same build,
in either case, a target without a copy and x86_64 media must copy on.
2026-11-02 19:55:57 -03:00
Vinícius Ferrão 3505c49b9a fix(anaconda): refuse to mix the RVA20 and RVA23 openEuler media
openEuler publishes RVA20 and RVA23 builds of each riscv64 release. Both
carry the same .treeinfo identity, so copycds copies the second one into
the directory of the first, and the result is a repository with packages
of two builds.

copycds now compares the .discinfo description, RVA23 or empty, with the
copy already in the target directory, and refuses a different build. Media
of the same build, and every other architecture, copy as before.
2026-11-02 19:55:57 -03:00
Vinícius Ferrão fd8e60c21e test(install): start kdump on openEuler nodes only with dump memory
The rendered compute and service %post, run in a sandbox through the
downloaded postscript, must leave the kdump.service drop-in that stateless
images get. A system without kdump.service must get none.
2026-11-02 19:55:57 -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 7a57007465 test(netboot): start kdump on stateless nodes only with dump memory
An image with kdump.service must get the dump-memory drop-in, once, next
to any site drop-in, and an image without it must get none. systemd itself
must start kdump.service with crashkernel= or fadump= on the command line,
and skip it with neither.
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 da5aea54f5 docs(openeuler): list riscv64 compute nodes
List openEuler 24.03 LTS SP4 on riscv64 in the openEuler guide, the
riscv64 guide and the support matrix. The scope is installed and stateless
compute nodes from the RVA23 media. riscv64 management and service nodes
stay out, because xCAT publishes no openEuler riscv64 packages.

The openEuler guide also says to import the openEuler key on the genimage
build host. A new installation has no key in its RPM keyring.
2026-11-02 17:49:23 -03:00
Vinícius Ferrão 72b3228f81 test(netboot): build and pack openEuler riscv64 diskless images
genimage must dispatch an openeuler24.03sp3 riscv64 image to the native
openEuler builder. packimage must pack it, and still refuse it as a
StateLite image.
2026-11-02 17:48:54 -03:00
Vinícius Ferrão 0c9860fcfa fix(netboot): build and pack openEuler riscv64 diskless images
genimage and packimage admit openEuler images only for x86_64 and
ppc64le. For the riscv64 osimage that copycds creates, genimage stops with
"Unsupported openEuler release or architecture" and packimage with
"Unsupported openEuler image release or architecture".

Admit riscv64 in both commands.
2026-11-02 17:48:53 -03:00
Vinícius Ferrão 28e447bb2e test(anaconda): publish an upper-case riscv64 media boot loader
openEuler media carry EFI/BOOT/grubriscv64.EFI. copycds must publish it as
grub2.riscv64.
2026-11-02 17:48:53 -03:00
Vinícius Ferrão a3d3926c70 fix(anaconda): publish the riscv64 boot loader of openEuler media
copycds looks for EFI/BOOT/grubriscv64.efi on riscv64 media. openEuler
media carry the same image as EFI/BOOT/grubriscv64.EFI, so copycds
publishes no grub2.riscv64. A management node with only openEuler media
then has no riscv64 network boot loader.

Match the image name case-insensitively, as UEFI does.
2026-11-02 17:48:53 -03:00
Vinícius Ferrão a112ff0f2d test(anaconda): identify the openEuler riscv64 media
The fixture holds the .treeinfo and .discinfo of the 24.03 LTS-SP3 RVA23
DVD. copycds must identify it as openeuler24.03sp3 on riscv64.
2026-11-02 17:48:52 -03:00
Vinícius Ferrão 2fb4e3b89a fix(anaconda): accept the openEuler riscv64 media
openEuler publishes 24.03 LTS installation media for riscv64, but the
openEuler media check admits only x86_64 and ppc64le. copycds stops with
"Unsupported openEuler architecture in .treeinfo".

Admit riscv64 as well. aarch64 stays refused.
2026-11-02 17:48:52 -03:00
Vinícius Ferrão 6d5f8bcec5 test(netboot): cover the EL10 initrd network handoff
The dracut_105 xcatroot must not copy dhclient leases or write an ifcfg
file. With the earlier script the case fails on the "cannot stat" and
ifcfg errors that an EL10 boot printed.
2026-10-30 17:51:15 -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 3e514bc6ee test(netboot): cover the NetworkManager defaults of EL10 images
An EL10 image must turn off the automatic DHCP profiles. An EL9 image
must keep the NetworkManager defaults, and an image without
NetworkManager must get no NetworkManager configuration.
2026-10-30 17:43:54 -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 5609c8f811 test(netboot): cover the otherifce profiles of diskless images
An EL10 image must get a DHCP keyfile for each requested interface,
also when it has a network-scripts directory. Only root can read the
keyfiles, and the interface of the initial ramdisk gets none. A rebuild
must drop the keyfile of an interface that is no longer requested and
keep other profiles. An EL9 image must keep its ifcfg files.
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 a09bc8eb07 test(install): cover riscv64 boot entries on other disks
The EL10 fix-up must keep the boot entry of a system on another disk,
and must remove nothing when lsblk reports no ESP partition GUID. Both
cases fail with the earlier code, which removed every matching entry.
2026-10-30 15:55:21 -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 0f978df984 test(install): give the riscv64 EFI fixtures partition GUIDs
The efibootmgr fixture printed HD(1,GPT,...) without a partition GUID or
the tab that ends an entry label, and the lsblk fixture could not answer
a PARTUUID query, so no test could tell which partition a boot entry
points at. The fixtures now print real GUIDs and labels, and lsblk
reports the ESP partition GUID.
2026-10-30 15:54:47 -03:00
Daniel Hilst c0698fa253 Merge pull request #7995 from VersatusHPC/fix/opensuse-mn-package-requires
fix(xcat-core): xCAT cannot be installed on an openSUSE management node
2026-10-30 09:57:51 -03:00
Daniel Hilst 10c30c80ba Merge pull request #7993 from VersatusHPC/fix/getpostscript-client-identity-v2
fix(xcat-core): getpostscript serves no node when the client reverse lookup is empty
2026-10-30 09:57:22 -03:00
Daniel Hilst 2aceb80102 Merge pull request #7991 from VersatusHPC/fix/xcat-test-scapy-optional
fix(xcat-test): scapy is a hard Depends on Debian and only a Recommends on EL
2026-10-30 09:56:54 -03:00
Vinícius Ferrão b0c02900b7 test(go-xcat): cover apt packages the repositories do not provide
An unknown package and a package with no candidate are skipped with a warning
while the others install, and a translated apt still installs the packages
that have a candidate. A missing xcat metapackage or a failed apt-cache
policy query stops the install before apt-get runs.
2026-10-29 20:32: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 756a2a6358 test(go-xcat): answer apt-cache policy in the activation sandbox
The apt-cache double printed nothing, so a go-xcat that asks apt which
packages have a candidate would find none. Report a candidate for every
package. go-xcat today reads that answer only for its package listing.
2026-10-29 20:32:05 -03:00
Vinícius Ferrão 7bebb608b7 test(go-xcat): cover the apt key without apt-key
The default xcat-core repository installs the decoded key blocks as one
binary keyring in trusted.gpg.d while apt-key fails as it does on apt 3.
An empty or HTML download, a block truncated after a valid base64 prefix,
a body that is not base64 and a block without a public key stop go-xcat
and keep the installed key. A complete uninstall removes that key and
keeps the other keys.
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 fd3f1889be test(ipmi): cover an SDR reservation that is not advertised
Replay the Get SDR Repository Info reply of an OpenBMC build that clears the
reservation bit. The read asks for the reservation and uses the ID it gets.
An invalid command refusal still reports "SDR reservation unsupported."
against the node, a busy or privilege refusal reports its completion code,
and a BMC that sets the bit is asked as before.
2026-10-29 18:08:05 -03:00
Vinícius Ferrão c6dcdb9b57 fix(ipmi): read the SDR when the BMC grants an unadvertised reservation
rinv, rvitals and reventlog stopped with "SDR reservation unsupported." when
Get SDR Repository Info did not set the reservation bit. An OpenBMC build
clears that bit but grants Reserve SDR Repository, so these commands failed on
a server that ipmitool reads.

Send Reserve SDR Repository in every case. When the bit is clear and the BMC
rejects the command as invalid, the error stays "SDR reservation
unsupported." Other refusals report their completion code.
2026-10-29 18:08:04 -03:00
Vinícius Ferrão 9f8f3a0a47 test(netboot): cover the Intel 700 and 800 series riscv64 drivers
The EL and Ubuntu riscv64 default driver lists carry i40e and ice, and the
Ubuntu list keeps ixgbe.
2026-10-29 17:52:23 -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
Vinícius Ferrão 7d8658e848 test(netboot): check the riscv64 default drivers by name
The EL riscv64 case compared the whole default driver list, so a driver added
to the list failed it. Check that each expected driver is in the list.
2026-10-29 17:52:23 -03:00
Vinícius Ferrão 0c3640c74f test(ipmi): cover device ID and SDR errors against the node
Each step of the device ID and SDR read reports a timeout as an error of the
node and stops, and a refused SDR reservation sends no Get SDR request.
2026-10-29 17:52:22 -03:00
Vinícius Ferrão 19242f88c2 fix(ipmi): report device ID and SDR errors against the node
When Get Device ID or a step of the SDR read failed, the plugin reported the
error through sendoutput. Seven of these calls passed an array reference,
which sendoutput takes as its return code, so the error was dropped. The other
five named the node BADCODE. A refused SDR reservation also went on to read
records with no reservation ID.

Report these errors with sendmsg against the node, as the rest of the plugin
does, and stop after a refused reservation.
2026-10-29 17:52:22 -03:00
Daniel Hilst 599cd8ac83 Merge pull request #7986 from VersatusHPC/fix/retry-install-transient-icmp
fix(xcat-test): a transient ICMP loss vetoes a node that answers SSH
2026-10-29 15:29:06 -03:00
Daniel Hilst dfad7287f0 Merge pull request #7984 from VersatusHPC/fix/genesis-ubuntu-mawk-rebased
fix(xcat-core): the Ubuntu Genesis image runs its awk programs under mawk
2026-10-29 15:24:52 -03:00