2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00
Commit Graph

10491 Commits

Author SHA1 Message Date
Vinícius Ferrão 5bfbc8edf6 Merge pull request #7627 from VersatusHPC/fix/ddns-net-dns-version-comparison
refactor(ddns): centralize Net::DNS version policy
2026-07-23 17:44:30 -03:00
Vinícius Ferrão f4965f5aac Merge pull request #7645 from VersatusHPC/harvest/dhcp-uefi-arch-0007
fix(dhcp): serve the UEFI boot loader for client architecture 00:07
2026-07-23 17:15:34 -03:00
Vinícius Ferrão 34241f680f Merge pull request #7633 from VersatusHPC/harvest/ddns-routed-local-address
fix(ddns): recognize a routed local nameserver address
2026-07-23 17:10:16 -03:00
Daniel Hilst 7cf3a28f1f Merge pull request #7625 from VersatusHPC/harvest/netboot-https-rootfs
fix(netboot): allow the rootfs image to be downloaded over HTTPS
2026-07-23 15:47:31 -03:00
Daniel Hilst 9dd025bf05 fix(ddns): retry transient DNS-update rejections and fail on persistent ones
ddns.pm's DNS-update send has a 3-try retry loop, but it only retried on
NOTAUTH and -- on the final attempt -- the `next` fell out of the loop without
reporting failure. makedns then printed "Completed updating DNS records." and
"DNS setup is completed" even when the update was never accepted.

Two problems this causes:
- SERVFAIL was never retried. named routinely replies SERVFAIL transiently
  right after a zone (re)load, before the zone is ready to accept dynamic
  updates; the update succeeds a second or two later. This reliably breaks real
  flat-cluster provisioning on el9/el10, where the test case's makedns -n runs
  right after named reloads the zone with the new compute node.
- A persistent NOTAUTH/SERVFAIL (retries exhausted) was silently swallowed and
  reported as success, so a genuinely failed DNS update looked like it worked.

Extract the batch send into send_ddns_update(), which retries NOTAUTH and
SERVFAIL (pausing on SERVFAIL), returns 0 only on NOERROR, and otherwise emits
the error and returns 1. Both batch-send sites now `return 1 if
send_ddns_update(...)`, so a real failure aborts add_or_delete_records instead
of falsely reporting success.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 11:34:50 -03:00
Vinícius Ferrão 60bd6e7cd9 fix(dhcp): serve the UEFI boot loader for client architecture 00:07
Modern x86-64 UEFI firmware (including OVMF and recent iPXE) reports DHCP
client architecture 00:07, but the xNBA network-boot conditionals only matched
00:09. A UEFI node would load xnba.efi, re-request with user-class xNBA and
arch 00:07, fail to match, and be handed xnba.efi again -- an endless boot
loop. Accept 00:07 alongside 00:09 in the xNBA UEFI branches of both the
network-level (addnet) and node-level (addnode) dhcpd statements.

Validated on an OVMF UEFI client: it progresses from xnba.efi to the .uefi
genesis config and boots, instead of looping on xnba.efi.

Recovered from the unmerged lenovobuild branch (5d697b5c, 86b0e12e).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-23 00:26:10 -03:00
Vinícius Ferrão a0dfc3343a fix(ddns): recognize a routed local nameserver address
The DNS-managed-networks check used my_ip_facing($net->{net}), which only
returns local addresses on the interface directly facing that network. A
nameserver that is a local address reachable via a different (routed)
interface was therefore treated as external, and the network was wrongly
dropped from ddns management.

Use thishostisnot(), which recognizes any local address regardless of the
interface, and keep the existing <xcatmaster> and site-nameserver special
cases.

Recovered from the unmerged lenovobuild branch (original 3c343f83), adapted
to preserve those special cases: lab validation showed the original replaced
them wholesale, which would exclude any network whose nameserver is the
literal <xcatmaster> token (thishostisnot('<xcatmaster>') is true).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-22 19:41:28 -03:00
Vinícius Ferrão ad9ac6db8a refactor(ddns): centralize Net::DNS version policy 2026-07-22 01:55:59 -03:00
Vinícius Ferrão 7d59ccaccb fix(netboot): allow the rootfs image to be downloaded over HTTPS
The diskless/statelite xcatroot scripts only recognize an http:// rootfs
image URL; an https:// imgurl falls through to the "unsupported" path even
though the download itself already uses wget/curl on the full $imgurl, both
of which handle TLS.

Accept xhttps alongside xhttp in the protocol test. Applied to every current
xcatroot variant (rh dracut/dracut_033/dracut_047/dracut_105 stateless and
statelite, plus fedora, sles and ubuntu), so HTTPS works uniformly rather
than only on the three rh scripts the original touched.

Recovered from the unmerged lenovobuild branch (original 751bce24, extended
to the dracut generations and distros that postdate it).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-22 00:49:04 -03:00
Daniel Hilst cf44f51463 Merge pull request #7616 from VersatusHPC/harvest/xcat-server-perl-deps
fix(xCAT-server): declare Perl deps used only by xCAT-server code
2026-07-21 16:07:38 -03:00
Vinícius Ferrão 3825677ad4 fix(xCAT-server): declare Perl deps used only by xCAT-server code
xCAT-server.spec sets "AutoReqProv: no", so RPM does not auto-generate
dependencies from the Perl modules this package ships. Modules that are
loaded (compile-time "use") only by xCAT-server code are therefore neither
auto-required here nor pulled in transitively by perl-xCAT (which does have
AutoReqProv on and already covers SNMP, Expect, JSON, Net::Ping, Time::HiRes
and Text::Balanced). On a host without them the package installs cleanly and
the affected subcommands then fail at load time with "Can't locate <M>.pm".

Add the five that are genuinely uncovered, each a compile-time "use" in a
module shipped by xCAT-server and used nowhere in perl-xCAT:

  perl-Net-Telnet       xCAT/SSHInteract.pm        (telnet switch/console)
  perl-Net-DNS          plugins/activedirectory.pm
  perl-Crypt-CBC        xCAT/IPMI.pm               (IPMI 2.0 RMCP+ crypto)
  perl-Crypt-Rijndael   xCAT/IPMI.pm               (IPMI 2.0 RMCP+ crypto)
  perl-DB_File          Confluent/Client.pm

The Crypt::CBC / Crypt::Rijndael gap is the notable one: IPMI.pm fails to
load without them, disabling all IPMI-based hardware control on a host where
those modules are absent.

Recovered from the unmerged lenovobuild branch (Jarrod Johnson; originals
807d30d3, c2e22f6f, 792e41727), reduced to the subset that master's current
packaging does not already satisfy.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-21 14:26:17 -03:00
Daniel Hilst 1b5938969c fix(xcat-core): stop go-xcat aborting the install on obsolete/missing packages
go-xcat's install list still named yaboot-xcat, which was obsoleted in the
xcat-dep 2.18 rebuild and is no longer published. It also lists the cross-arch
ppc64 genesis packages, which the arch-split 2.18 dep repo no longer places in
the x86_64 view an x86 management node reads. Because EL dnf is strict by
default, any one of these unresolvable names aborts the entire `dnf install`
transaction, so `go-xcat install` fails outright on EL9/EL10 even though every
package the node actually needs is available.

Drop yaboot-xcat from the install list (kept in the uninstall list so existing
installs are still cleaned up) and pass `dnf --setopt=strict=0` so a package
missing from the enabled repository is warned and skipped instead of failing
the whole install. The existing post-install smoke test still catches a
genuinely broken install.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-20 12:14:10 -03:00
Daniel Hilst ec2bbb9a6a Merge pull request #7588 from VersatusHPC/fix/issue-6495-nfs-root-options
feat: add configurable NFS root options for statelite images
2026-07-17 23:46:14 -03:00
Daniel Hilst 419d6c262c Merge pull request #7596 from VersatusHPC/fix/issue-7593-systemd-packaging
fix: avoid sysvinit paths on systemd enabled systems
2026-07-17 21:35:45 -03:00
Vinícius Ferrão 68a4855c7f fix(statelite): reject invalid NFS root options early 2026-07-17 20:36:51 -03:00
Vinícius Ferrão 5fc111b3b3 Merge pull request #7590 from VersatusHPC/fix/issue-4082-makehosts-index 2026-07-17 20:12:54 -03:00
Vinícius Ferrão 08428ee667 Merge pull request #7589 from VersatusHPC/codex/issue-5843-copycds-sles-media 2026-07-17 19:41:09 -03:00
Daniel Hilst 428c63cdb1 Merge pull request #7598 from VersatusHPC/fix/issue-6498-mknb-xcatd-address
fix(mknb): avoid transient discovery addresses
2026-07-17 19:02:50 -03:00
Vinícius Ferrão cd799cd0e6 Merge pull request #7597 from VersatusHPC/feat/omapi-sha256-default
feat: use HMAC-SHA256 by default on new EL and Ubuntu sites
2026-07-17 18:23:33 -03:00
Daniel Hilst 4a1cf4b0e8 Merge pull request #7586 from VersatusHPC/fix/issue-7512-ipmi-rakp2
fix(xcat-server): retry suite 3 on zero RAKP2 HMAC
2026-07-17 13:26:00 -03:00
Vinícius Ferrão 6e4cffddc3 feat(dhcp): default new Ubuntu sites to HMAC-SHA256
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-16 17:19:19 -03:00
Vinícius Ferrão 424b2e3e9b feat(dhcp): default new EL sites to HMAC-SHA256
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-16 17:18:13 -03:00
Vinícius Ferrão 6a3f71bf68 fix(packaging): avoid SysV init paths in modern DEBs 2026-07-16 01:43:16 -03:00
Vinícius Ferrão c34db2c55f fix(packaging): avoid SysV init paths in modern RPMs 2026-07-16 01:42:40 -03:00
Vinícius Ferrão d829be9e94 fix(packaging): make xcatd callers init-agnostic 2026-07-16 01:41:38 -03:00
Vinícius Ferrão 3cd74bbab0 fix(mknb): avoid transient discovery addresses 2026-07-15 21:20:26 -03:00
Vinícius Ferrão 009150823f fix(makehosts): index host lookups 2026-07-15 00:29:26 -03:00
Vinícius Ferrão 4918dfa9b7 fix(copycds): keep SLE 15 source media separate 2026-07-14 23:28:14 -03:00
Vinícius Ferrão 24e2c98957 style(statelite): align image cache assignments 2026-07-14 19:11:28 -03:00
Vinícius Ferrão aa086a1bc9 feat(statelite): support NFS root mount options 2026-07-14 19:04:09 -03:00
Vinícius Ferrão 695dd485cf fix(xcat-server): retry suite 3 on zero RAKP2 HMAC 2026-07-13 17:57:36 -03:00
Daniel Hilst c1db278e1a fix(xcat-server): install tmux on KVM hosts for the serial console
cons/kvm drives the KVM guest serial console through a shared tmux session on
the hypervisor (tmux, unlike screen, is present on every libvirt host we target
incl. ppc64le hosts that ship no screen). The KVM host package lists were never
updated for that switch, so an xCAT-provisioned KVM host got 'screen' (now
unused) -- or nothing -- where tmux is required, leaving rcons broken.

Ship tmux in the KVM host pkglists:
  - install/rh, install/ubuntu: screen -> tmux / add tmux.
  - netboot/{alma,centos,rocky}: were symlinks to the RHEL 5.4 list; make them
    real lists with tmux (the rhel5/6/7 lists keep screen).
  - install/suse: add a KVM host list (SUSE had none) carrying tmux.

screen stays where it is still used: the Xen console, and the EOL rhel5/6/7 and
centos6/7 lists.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-13 09:55:47 -03:00
Daniel Hilst 9ea3de343b fix(xCAT-server): ship rhels10 ppc64le service-node otherpkgs pkglist
The diskful service-node otherpkgs pkglist exists for every EL version and
both arches EXCEPT rhels10 ppc64le: install/rh/ has
service.rhels10.x86_64.otherpkgs.pkglist (and install/alma/ symlinks it) but
no ppc64le counterpart, while rhels5/6/7/8/9 and the netboot/ tree carry both
arches. xcat-test's SN_setup_case points a ppc64le service node's osimage
otherpkglist at install/<distro>/service.<ver>.ppc64le.otherpkgs.pkglist; with
the file absent the list resolves empty, so the otherpkgs postscript installs
nothing -- xCATsn never lands, xcatd never starts on the service node, and
every hierarchical dispatch fails with "<sn>:3001 No route to host /
Connection refused", cascading the whole *_hierarchy test suite.

Add install/rh/service.rhels10.ppc64le.otherpkgs.pkglist (xCATsn + the rh10
ppc64le goconserver, mirroring rhels9) and the install/alma symlink to it,
matching the existing x86_64 layout.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-01 13:25:53 -03:00
Daniel Hilst e331290414 fix(console): drive the KVM serial console via tmux+virsh, not screen
cons/kvm ran `ssh -t <vmhost> screen ... <pty>`, which requires screen on every
hypervisor. Bare libvirt hosts (notably ppc64le power servers) ship tmux but not
screen, so goconserver's console fork failed and no console was captured.

Use tmux (present on all our libvirt hosts) for the shared detach/reattach
session, wrapping `virsh console` keyed on the domain name (== the xCAT node name
for KVM) -- stable across guest reboots, unlike the raw serial pty. The session
status bar is disabled so the captured console log stays clean serial.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-01 06:00:02 -03:00
Daniel Hilst 37666b92cd fix(kvm): emit a pseries domain for ppc64le KVM hypervisors
build_xmldesc only recognised cpumodel "ppc64" (big-endian) when deciding to set
<os type arch='ppc64' machine='pseries'>, but ppc64le hosts report cpumodel
"ppc64le" (virNodeGetInfo model). A guest on a ppc64le hypervisor was therefore
emitted as an x86-style domain -- no machine type and with pae/acpi/apic -- and
libvirt rejected it: "machine type 'pseries-*' does not support ACPI".

Recognise "ppc64le" alongside "ppc64" for the arch/machine block, and omit the
x86-only pae/acpi/apic features on both. Little- and big-endian pseries guests
both use libvirt <os> arch "ppc64".

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-01 06:00:02 -03:00
Daniel Hilst 529c821177 fix(packaging): install-time DHCP rich dep + genesis-base out of flat core
The single flat xcat-core repo serves el8/el9/el10 from one build, but two spec
decisions were resolved at BUILD time and so were wrong for the other ELs that
share the same repo.

1. DHCP backend. xCAT.spec and xCATsn.spec selected the dhcp provider with a
   build-time %if (rhel >= 10 -> kea, else dhcpd), so an el10 build wrongly
   required kea on el8/el9 (and an el8/el9 build wrongly required dhcpd on
   el10). Replace it with an install-time RPM rich dependency:

     Requires: (kea if (system-release >= 10) else /usr/sbin/dhcpd)
     Requires: (kea-hooks if (system-release >= 10))

   dnf now resolves it per client: kea on el10+ (which dropped ISC dhcp from the
   distro), dhcpd on el8/el9. SLES has no "system-release" provide, so the
   condition is false there and it falls back to /usr/sbin/dhcpd, preserving
   prior behavior. system-release is versioned per release package
   (el10=10.x, el9=9.x, el8=8.x).

2. openssl. Make the xCAT-server openssl Requires uniform across EL (non-SUSE)
   instead of el10-only, so the produced package set does not depend on which EL
   the build host happened to be.

Also drop xCAT-genesis-base from the default @PACKAGES set in buildrpms.pl: its
initramfs bundles the build-chroot kernel/glibc and is therefore OS- and
arch-dependent, so it cannot ship in the single flat core. It is now built per
target by the xcat-dep pipeline (mockbuild-all.pl, via
`buildrpms.pl --package xCAT-genesis-base`) and ships in xcat-dep/rh<N>. The
explicit `--package xCAT-genesis-base` build path is retained.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-30 19:19:33 -03:00
Daniel Hilst 3a5cbef630 fix(xcat-server): stop Ubuntu diskless images carrying the builder's identity
The Ubuntu netboot image inherited the build host's /etc/hostname --
genimage's chroot shares the build host's UTS namespace, so /etc/hostname
ended up as the MN's name and every diskless node booted as that name
instead of its own ("hostname poisoning"). xCAT keys on IP/MAC so
provisioning still succeeds, but the node's local identity (hostname,
prompt, syslog) is wrong and N nodes share one name. The image also
shipped no netplan, so systemd-networkd-wait-online failed. In
compute.postinstall, clear /etc/hostname so each node takes its name at
boot from DHCP (udhcpc option host-name) / xCAT, and drop in a DHCP
netplan (optional, dhcp-identifier mac) so systemd-networkd configures the
boot NIC. Ubuntu-only.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:27 -03:00
Daniel Hilst 03e1559989 fix(xcat-server): default the Ubuntu apt mirror for netboot and Subiquity
The Ubuntu live-server ISO copycds imports is not a complete apt pool, so
both Ubuntu install paths fail without an external mirror: the netboot
genimage's debootstrap from the ISO-only pkgdir cannot resolve packages,
and the Subiquity diskful install (Template.pm) fell back to the airgapped
file:///cdrom config. Default site.ubuntu_apt_mirror to
http://archive.ubuntu.com/ubuntu when unset (overridable for local/geo/
ports mirrors). In the Ubuntu genimage, when pkgdir has no http mirror,
build the debootstrap source and chroot sources.list from that mirror with
the codename derived from osvers and the release/-updates/-security pockets
(main + universe) -- the compute pkglist needs universe (busybox-static,
dracut*) and the security-updated openssh. Ubuntu-only; EL netboot
(netboot/rh) and copycds/packimage are untouched.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:27 -03:00
Daniel Hilst c6e38483fb fix(xcat-server): fix Ubuntu autoinstall netplan for match-by-MAC nodes
When a node's install NIC is selected by MAC (installnic=mac), the generated
netplan was invalid: it named the ethernet device the literal string 'mac' and
set its MAC match to the full pipe-delimited list of all node MACs. The result
had no valid interface, so neither the installer environment nor the installed
system came up on the network. Match the install NIC by interface-name glob in
the installer, and in the target use only the primary MAC and omit set-name
when the install NIC is selected by MAC.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:27 -03:00
Daniel Hilst 86e77bcd7f fix(xcat-server): add an identity section to the Ubuntu autoinstall config
The generated Subiquity autoinstall config defined no identity section. Newer
Subiquity treats a config without an identity as incomplete and stops at an
interactive "Continue with autoinstall?" confirmation, so the install never
proceeds unattended (the prompt's advice to add 'autoinstall' to the kernel
command line is a red herring -- it was already present). Provide an identity
with a password sourced from the cluster passwd table so the install runs
non-interactively.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:27 -03:00
Daniel Hilst 846e611772 fix(xcat-server): allow an online apt mirror for Ubuntu Subiquity installs
The Ubuntu live-server install media is not a complete apt package mirror.
With the generated apt configuration pinned to the media only, an install that
needs a package absent from the media stalls instead of fetching it. Emit an
online-mirror apt configuration when one is configured (site.ubuntu_apt_mirror)
so missing packages are retrieved from the archive; offline behaviour is
unchanged when it is unset.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:26 -03:00
Daniel Hilst 638f0d75c4 Fix xCAT 2.18 EL10 x86_64 package build issues
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-20 18:48:14 -03:00
Markus Hilger dcb4c86b5b Merge pull request #7573 from VersatusHPC/fix/addkcmdline-r-prefix
fix: strip R:: prefix from netboot config
2026-05-11 15:40:31 +02:00
Vinícius Ferrão 644084cd99 Point EL10 clone distro symlinks to rhels10 instead of rhels9
Update all alma10, ol10, and rocky10 netboot symlinks to reference
the new rhels10 base files. Fixes service otherpkgs pointing to
wrong xcat-dep path (rh9 instead of rh10).
2026-05-10 01:57:34 -03:00
Vinícius Ferrão f568251df1 Add EL10 netboot profile files for rh base directory
Create proper rhels10 versions of exlist, postinstall, service
pkglist, and service otherpkgs files instead of reusing rhels9.

Key differences from rhels9:
- service otherpkgs: xcat-dep path rh9 -> rh10
- service pkglist: drop dhclient (NetworkManager handles DHCP)

Compute exlist and postinstall are identical to rhels9 for now but
kept separate to allow EL10-specific changes without affecting EL9.
2026-05-10 01:57:12 -03:00
Vinícius Ferrão ea7ecee70e Add Oracle Linux 10 netboot symlinks for stateless provisioning
Add compute and service profile symlinks for ol10 x86_64 and the
missing dracut_105 symlink required by EL10's dracut v107.
2026-05-10 01:52:08 -03:00
Vinícius Ferrão 539ecf9bf4 Add AlmaLinux 10 ppc64le netboot symlinks
Match Rocky Linux 10 ppc64le coverage for AlmaLinux 10.
2026-05-10 01:52:03 -03:00
Vinícius Ferrão ca764c39c4 Add AlmaLinux 10 netboot symlinks for stateless provisioning
Add compute and service profile symlinks for alma10, following the
existing pattern used by alma8 and alma9. Also add the missing
dracut_105 symlink required by EL10's dracut v107.

Tested with BIOS and UEFI stateless provisioning on AlmaLinux 10.1.
2026-05-10 01:51:58 -03:00
Vinícius Ferrão c8b21c1cca fix: strip R:: prefix from netboot config when all options are persistent
When all addkcmdline options have R:: prefix (persistent options for
the installed OS), the volatile check in xnba.pm and pxe.pm would fail
because volatile was undefined. This left the original R::-prefixed
string in the netboot config instead of stripping it.

The fix ensures we always use the volatile portion after calling
splitkcmdline, even if it's empty. Persistent (R::) options are
handled separately by Template.pm via PERSKCMDLINE for the installed
OS bootloader.

Fixes #7442
2026-05-08 02:18:40 -03:00
Markus Hilger 9bbd5644bc Merge pull request #7569 from VersatusHPC/fix/go-xcat-shellcheck
fix: ShellCheck compliance fixes in go-xcat
2026-05-08 02:00:55 +02:00