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

2692 Commits

Author SHA1 Message Date
Daniel Hilst 2d26dca480 Merge pull request #7614 from VersatusHPC/fix/xcatd-rpm-init-state
fix(packaging): preserve xcatd init state across RPM transactions
2026-07-24 12:25:28 -03:00
Vinícius Ferrão 99b197b222 Merge pull request #7644 from VersatusHPC/harvest/postscript-disable-before-run
fix(postscripts): disable xcatpostinit1 before running the postscripts
2026-07-23 17:50:31 -03:00
Vinícius Ferrão 886db49e27 fix(postscripts): disable xcatpostinit1 before running the postscripts
The generated /opt/xcat/xcatinstallpost ran the install postscripts first and
only disabled the xcatpostinit1 service afterwards.  If one of those postscripts
rebooted the node (for example a firmware or kernel update), the service was
still enabled, so on the next boot the whole postscript set ran again from the
start.  Disable the service *before* running the postscripts so a mid-postscript
reboot cannot re-trigger them.

The disable decision reads OSVER (base variant only), RUNBOOTSCRIPTS and
NODESTATUS, which the included xcatinstallpost script would otherwise set.
Moving the INCLUDE below the disable block leaves those variables unset, so read
them up front (the included script re-reads them) and source xcatlib.sh so
msgutil_r is available; the disable decision is then identical to before.

The original change (lenovobuild 9184cbe0) touched only the legacy post.xcat.
Modern EL uses the systemd variants: post.xcat.ng (RHEL/CentOS 8 and 9) and
post.xcat.rhels10 (RHEL 10).  Apply the same reorder to all three so the fix
actually takes effect on current platforms.

Lab-validated with a full AlmaLinux 9.8 stateful install (post.xcat.ng path):
the generated xcatinstallpost disables the service before running the
postscripts, the postscripts run exactly once, the node reaches "booted", and
with the default NODESTATUS=1 the service is left enabled just as before.

Recovered from the unmerged lenovobuild branch (original 9184cbe0), adapted and
extended to the .ng and .rhels10 variants.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-22 22:54:20 -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
Vinícius Ferrão ef6e037366 refactor(packaging): share systemctl readiness guard 2026-07-21 11:08:05 -03:00
Vinícius Ferrão 09d1befb62 fix(packaging): preserve fresh legacy defaults 2026-07-21 11:08:04 -03:00
Vinícius Ferrão bdbf7b894a fix(packaging): preserve custom SysV runlevels 2026-07-21 11:08:04 -03:00
Vinícius Ferrão 7df7da59b3 fix(packaging): preserve unregistered legacy state 2026-07-21 11:08:04 -03:00
Vinícius Ferrão 115c9cda7e fix(packaging): preserve unmanaged xcatd init scripts 2026-07-21 11:08:03 -03:00
Vinícius Ferrão 5495f133e8 refactor(packaging): centralize xcatd init management 2026-07-21 11:08:02 -03:00
Vinícius Ferrão 8489e15969 fix(packaging): expose explicit init target detection 2026-07-21 11:08:02 -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 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 c34db2c55f fix(packaging): avoid SysV init paths in modern RPMs 2026-07-16 01:42:40 -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 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 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
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 b34d6abf08 go-xcat: ShellCheck compliance fixes
Address ShellCheck warnings across go-xcat without breaking
distro detection. Key changes:

- Replace source /etc/os-release with awk parsing that strips
  quotes, fixing detection on distros that quote ID/VERSION_ID
- Use $() instead of backticks for command substitution
- Quote $1 and file path variables in dnf/yum repo version checks
- Use ${FUNCNAME[0]} instead of ${FUNCNAME} for dispatch calls
- Fix $@ vs $* usage in string contexts (warn_if_bad, el9 check)
- Remove useless use of cat (UUOC) in pipe chains
- Escape $releasever/$basearch/$stream in CRB repo echo
- Use xargs instead of unquoted command substitution in rm
- Split local declaration and assignment per SC2155
- Fix minor typos (secert -> secret, preform -> perform)

Signed-off-by: Vinícius Ferrão <vinicius@ferrao.net.br>
Co-Authored-By: Samveen <samveen@samveen.in>
2026-05-07 19:16:47 -03:00
Markus Hilger 6bf1d9a1cb Merge pull request #7564 from VersatusHPC/fix/rh-genimage-dnf
fix: use dnf for EL8+ RH genimage installroot
2026-05-07 19:53:51 +02:00
Vinícius Ferrão 57daff8a31 Use dnf for EL8+ RH genimage installroot 2026-05-07 12:54:38 -03:00
Vinícius Ferrão ab86139959 Support configurable ISC OMAPI TSIG policy
Add a shared OMAPI policy helper for ISC DHCP and DDNS so administrators can select the key name, signing algorithm, and omshell path from the site table while preserving the existing xcat_key hmac-md5 default.

Keep local ISC updates from hanging indefinitely when omshell does not exit, and use a static host-declaration fallback for local Ubuntu ISC releases where omshell is unstable for xCAT host updates.

Co-authored-by: gskouson <1507929+gskouson@users.noreply.github.com>
2026-05-07 03:57:10 -03:00
Markus Hilger aa180925e3 Merge pull request #7550 from VersatusHPC/fix/profile-asset-dotted-osvers
fix: handle dotted OS versions in profile asset lookup
2026-05-06 19:18:26 +02:00
Markus Hilger 2b1986d946 Merge pull request #7552 from VersatusHPC/fix/ubuntu-live-media-guardrails
fix: guardrails for Ubuntu genimage
2026-05-06 19:17:08 +02:00
Vinícius Ferrão 911c74fda6 fix: use runtime require for xCAT::DHCP::Backend in dhcpop
The xCAT-server build-readme script runs every tool in share/xcat/tools/
with --help during RPM packaging. At build time perl-xCAT is not installed,
so the compile-time 'use xCAT::DHCP::Backend' aborts before --help can run.

Switch to runtime require inside the remove-operation branch where the
module is actually needed.
2026-05-06 02:55:11 -03:00
Vinícius Ferrão 7b20bbd187 Guard Ubuntu live media package sources 2026-05-05 21:40:04 -03:00
Vinícius Ferrão 9f33b19214 fix: restore legacy SLES provisioning paths 2026-05-05 17:09:37 -03:00
Vinícius Ferrão 119b19ce14 fix: handle dotted OS versions in profile asset lookup 2026-05-05 13:50:58 -03:00
Markus Hilger d5831828d6 Merge pull request #7533 from VersatusHPC/fix/opensuse-leap-support
feat: add openSUSE Leap 15 and SLES 15 provisioning support
2026-05-04 17:20:59 +02:00
Vinícius Ferrão 88da644249 Merge pull request #7532 from VersatusHPC/fix/el10-netboot-dhcp-client
fix: use NetworkManager for EL10 netboot DHCP instead of dhclient
2026-05-04 17:20:11 +02:00
Vinícius Ferrão 4165b26a04 fix: remove Docker container lifecycle management (dead code since 2016)
Docker container lifecycle management (mgt=docker, mkdocker, rmdocker,
lsdocker) was added in 2015-2016 as an experiment targeting Docker API
v1.22 on Ubuntu only. Documentation and man pages were deliberately
removed in 2019 (PRs #6222 and #6324) with the original developer's
approval, noting that "the interface of Docker has become very simple
right now, so there is no value for xCAT to offer such functions."

The plugin was still being shipped but has had no functional code changes
since April 2016, was never listed as a valid mgt value in Schema.pm,
and no user ever filed an issue about it.

Removed:
- xCAT-server/lib/xcat/plugins/docker.pm (1,142 lines)
- xCAT/postscripts/setupdockerhost
- xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh
- xCAT-test/autotest/testcase/dockercommand/ (test cases)
- Docker attribute definitions in Schema.pm
- Client symlinks (mkdocker, rmdocker, lsdocker)
- Usage entries and dockerhost cert handling in credentials.pm
- Docker attribute documentation in man7 pages

The "Running xCAT in Docker" documentation (dockerized_xcat/) is
retained as it documents containerizing xCAT itself, not the removed
mgt=docker feature.

Closes #7518
2026-05-03 12:11:33 -03:00
Vinícius Ferrão a6145b402b Merge pull request #7534 from VersatusHPC/fix/el10-bios-stateful-biosboot
fix: add EL10 BIOS boot partition
2026-05-03 02:36:39 +02:00
Vinícius Ferrão 5aa1cda179 feat: add openSUSE Leap 15 provisioning support 2026-05-02 16:57:46 -03:00
Vinícius Ferrão 1f9173f07a Fix some EL9 and EL10 provisioning gaps (#7530)
* Fix EL9 and EL10 provisioning gaps
2026-05-02 04:27:54 +02:00
Vinícius Ferrão 023beff053 Add Ubuntu 26.04 provisioning support 2026-05-01 11:13:45 -03:00
Vinícius Ferrão 1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -03:00
Vinícius Ferrão 714c0785b6 Preserve OPAL conf-file handling for Kea 2026-04-23 19:19:29 -03:00
Vinícius Ferrão fcd22757d2 Refine Kea xNBA handling and validation notes 2026-04-23 11:14:01 -03:00
Vinícius Ferrão 8399d88509 Address Perl quality findings 2026-04-23 03:04:37 -03:00
Vinícius Ferrão 6f3d9bb9d1 Add Kea DHCP backend 2026-04-23 02:01:33 -03:00
Daniel Hilst Selli d309601a30 fix: Fix templates for EL10 in ppc64le enviroment
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-12 11:27:37 -03:00