2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-04 08:07:04 +00:00
Commit Graph

29266 Commits

Author SHA1 Message Date
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 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
Daniel Hilst 89b9213e4d Merge pull request #7977 from VersatusHPC/fix/boot-node-template
fix(boot): stop unsupported node-template keys from looping
2026-10-29 15:00:28 -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
Daniel Hilst d257780576 Merge pull request #7990 from VersatusHPC/fix/genesis-openssl-config-missing
fix(xcat-core): Genesis node stops at "Getting initial certificate"
2026-10-29 14:50:08 -03:00
Daniel Hilst b7076359f4 fix(xcat-test): xcat-test can install without python3 on Debian
python3-scapy was the only Depends of xcat-test that pulled in
python3. With scapy moved to Recommends, apt-get install
--no-install-recommends xcat-test can leave python3 absent, and every
blackboxtest command fails before it starts, not only the DHCP steps.

Add python3 to Depends. xcat_test_scapy_optional.t checks that python3
is a hard Depends, and fails without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:42:47 -03:00
Daniel Hilst e3429791c6 fix(xcat-core): getpostscript serves a node's postscripts to a password or token login
With nodeauthentication off and no peer name, getpostscript used
_xcat_authname as the client identity and expanded it with noderange.
becomeuser and tokens set _xcat_authname to an account name, so a user
named after a node group received the postscripts of the first node in
that group.

xcatd now records the CN of the validated client certificate as
_xcat_certname, and only while no becomeuser or token replaced it. It
deletes any _xcat_certname the client sent. getpostscript uses that
name only when it names exactly one node, with no group or range
expansion. _xcat_authname is no longer a candidate.

getpostscript_client_identity.t drives the plugin with these requests.
On the previous head the group and node login checks fail, and
dropping the exact match fails the group and range checks.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:41:25 -03:00
Daniel Hilst 001edc1a9f fix(xcat-core): package_relations.t expects perl-DB_File on openSUSE
xCAT-server now asks for the perl(DB_File) capability on openSUSE,
because no openSUSE release ships a package named perl-DB_File. The
native package relation test still counted perl-DB_File in the SLES12
and SLES15 requirements, so both checks failed in xcat_pr_test.

Expect perl(DB_File) on the SLES platforms and keep perl-DB_File for
the others. The test fails against the upstream master spec and
passes with this branch.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:36:35 -03:00
Daniel Hilst 7f4c7dbda0 Merge pull request #7983 from VersatusHPC/fix/vm-machine-type-unsupported-on-host
fix(xcat-test): libvirt refuses the compute node machine type pseries-rhel7.6.0
2026-10-29 14:32:40 -03:00
Daniel Hilst 5260c899a2 Merge pull request #7987 from VersatusHPC/fix/diskless-mount-snapshot-kernel-mounts
fix(xcat-test): the diskless cases fail when the kernel mounts binfmt_misc
2026-10-29 14:32:18 -03:00
Daniel Hilst d150233cfc Merge pull request #7988 from VersatusHPC/fix/genesis-sshd-privsep-upstream
fix(xcat-core): Genesis on Ubuntu answers no ssh, so every case that reaches a node fails
2026-10-29 14:31:56 -03:00
Daniel Hilst 213be1a5b0 Merge pull request #7989 from VersatusHPC/fix/selinux-avc-path-upstream
fix(xcat-test): a path that only starts with an xCAT directory name is counted as xCAT
2026-10-29 14:31:21 -03:00
Daniel Hilst b8eb0170cf Merge pull request #7994 from VersatusHPC/fix/xcattest-opensuse-os-detection
fix(xcat-core): xcattest runs no case on an openSUSE management node
2026-10-29 14:30:55 -03:00
Vinícius Ferrão a2eaa50a7c docs(netboot): explain standalone Debian source copies 2026-10-26 18:29:45 -03:00
Vinícius Ferrão c35fabe185 test(netboot): cover copied profile helper layouts 2026-10-26 18:29:45 -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
Vinícius Ferrão 4d5fc2b1b6 test(netboot): support copied profile payload fixtures 2026-10-26 18:00:28 -03:00
Vinícius Ferrão ef5ae32891 test(boot): reject cyclic node-template values 2026-10-26 17:44:58 -03:00
Vinícius Ferrão a09fd53acd fix(boot): bound recursive node-template replacements 2026-10-26 17:44:52 -03:00
Daniel Hilst ca5587a73b Merge pull request #7976 from VersatusHPC/fix/debian-package-lifecycle
fix(debian): preserve upgrade context and skip chroot service actions
2026-10-26 14:41:46 -03:00
Daniel Hilst d28b9c31ca Merge pull request #7981 from VersatusHPC/fix/release-source-only-signing
fix(build): preserve binaries in source-only runs
2026-10-26 11:44:23 -03:00
Daniel Hilst ef7989112f fix(xcat-core): xcatd does not start on an openSUSE node
xCAT installs on the leap15.6 node and the install gate still fails:

  GATE FAIL: xcatd not active
  GATE FAIL: lsdef cannot reach xcatd
  GATE FAIL: site.xcatdport not seeded

journalctl for xcatd has no entries, and loading the library by hand on the
node says why:

  Can't locate JSON.pm in @INC ... (@INC contains: /opt/xcat/lib/perl ...)

openSUSE has no perl-generators. Nothing generates a perl(...) requirement for
any xCAT package there, so no spec installs the modules its code loads, and
perl-xCAT names no Requires at all. Measured on xcat20-mn against the 85
external modules the EL build auto-requires: five are absent -- Date::Parse,
Expect, HTML::Form, JSON and SNMP -- and the other 80 are present.

Each openSUSE branch now names the modules EL's generator emits for that
package, as capabilities, so the same core build serves the sles15 and sles12
cells: both Leap releases provide all five, from perl-TimeDate, perl-Expect,
perl-HTML-Form, perl-JSON and perl-SNMP.

Verified with rpmspec that only openSUSE gets these; EL and openEuler are
unchanged and keep generating them.

xCAT-test/unit/opensuse_mn_requires.t fails on the commit before this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:22:32 -03:00
Daniel Hilst f47541e19b fix(xcat-core): an openSUSE management node is not recognised, so no case runs
current_os reads /etc/os-release and returns undef for openSUSE. The word sles
appears nowhere in Leap's os-release -- ID is opensuse-leap on 15.x and
opensuse on 42.3 -- and Leap ships none of /etc/redhat-release,
/etc/lsb-release or /etc/SuSE-release, so no other arm is reached. xcattest
rejects every case on the resulting undef, and 328 of the shipped cases declare
os:Linux.

openSUSE now answers with the SLE family whose package set it shares, which is
the answer decided on 2026-09-18 for the same bug: sles.pm claims leap15 and
xcat.org publishes the Leap dependencies under sles15. It also lets the 18
cases written os:sles select a Leap node, which a name of its own would not.
current_os has one consumer -- the os: comparison at xcattest:1052 -- so the
answer affects nothing else.

The match is on the whole file rather than on ID alone, because Leap 42.3
spells its ID opensuse and Tumbleweed opensuse-tumbleweed. It is placed after
the sles test, so a real SLES node is unaffected.

xcattest_os_selection.t passes, 19 of 19. Reverting this file alone fails its
five openSUSE assertions and nothing else.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:22:32 -03:00