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

29296 Commits

Author SHA1 Message Date
Daniel Hilst d4f080ce77 Merge pull request #8004 from VersatusHPC/fix/ubuntu-subiquity-install-disk
fix(ubuntu): apply partitionfile entries on Subiquity installs
2026-11-05 15:58:54 -03:00
Daniel Hilst ac4a63d67d Merge pull request #8003 from VersatusHPC/docs/riscv64-ubuntu-support-matrix
docs(support-matrix): list Ubuntu 24.04 and 26.04 on riscv64
2026-11-05 15:58:11 -03:00
Vinícius Ferrão 00fb5843cf docs(ubuntu): describe partitionfile on Subiquity installs
State that on Subiquity installs the partition definition file or script
provides a curtin storage section that replaces the default layout, that
a layout without a match is restricted to the disk a disk entry selects,
that a failed layout or disk entry stops the install, that the first disk
of a disk file is used, and that a disk script runs in the live installer
under dash. Name the file that the disk file and the disk script write as
/tmp/xcat.install_disk, which both Ubuntu installers read, instead of
/tmp/install_disk.
2026-11-03 17:53:21 -03:00
Vinícius Ferrão 75c874ebad test(ubuntu): cover a partitionfile layout on the partitionfile disk
A layout without a match that follows a disk file gets a match on the
disk the file selects, resolved when it is a link, and a use_gap layout
that follows a disk file stops the install. A layout with its own match
and a layout without a disk entry are kept as written.
2026-11-03 17:53:20 -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 1d378818dd test(ubuntu): cover a failed partitionfile entry on Subiquity installs
A disk script or layout script that fails, or that writes no disk or
layout, and a disk file or layout file that holds only blank lines,
comments or an empty storage section each stop the pre-install script and
leave no storage config for Subiquity. A layout file that starts a YAML
document still leaves autoinstall.yaml one document.
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 ff870a0723 test(template): cover partitionfile entries read with their own s: prefix
A layout file followed by a disk script and a layout script followed by a
disk file each replace the default storage config with the administrator
layout. A layout file after a layout script and a disk file after a disk
script are read as files, on Subiquity and in the debian-installer recipe
step.
2026-11-03 17:53:20 -03:00
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 3c85a7180c docs(support-matrix): list Ubuntu 24.04 and 26.04 on riscv64
The overview support matrix marked Ubuntu unsupported on riscv64 and limited
riscv64 support to EL 10. The riscv64 guide and the mixed cluster support
matrix document Ubuntu 24.04 and 26.04 riscv64 management and compute nodes,
and the xcat-core and xcat-dep apt repositories index riscv64 for both
releases. Mark both releases supported on riscv64 and name Ubuntu in the
riscv64 note.
2026-10-29 22:03:30 -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