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

27070 Commits

Author SHA1 Message Date
Vinícius Ferrão 3d842ce944 docs: fix CUDA samples verification 2026-07-14 00:19:09 -03:00
Markus Hilger ec751f07a5 Merge pull request #7578 from VersatusHPC/master
Fixes for xCAT 2.18 release - Ubuntu (noble)
2026-06-24 22:32:52 +02: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 c0731a5e33 fix(xcat-test): run testcase commands under bash, not /bin/sh
xcattest's runcmd ran each RUN: command via Perl backticks, i.e. /bin/sh.
On Ubuntu /bin/sh is dash, so testcases using bashisms ([ x == y ],
[[ ... ]]) error with "unexpected operator": the [ exits non-zero, the
enclosing if is taken as false, and the case's distro-specific branch is
silently skipped while the case still reports Passed -- a false pass. Run
the command through bash via list-form open() so no intervening /bin/sh
re-parses or re-expands the command's embedded quotes and backticks. EL
is unaffected (its /bin/sh is already bash).

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 d8953b0ea6 fix(xcat-genesis-base): bump package version to satisfy genesis-scripts
The genesis-base deb version was frozen at an ancient value, below the lower
bound required by xcat-genesis-scripts (xcat-genesis-base-amd64 >= 2.13.10).
apt therefore refused to install it and its dependents. Bump the version to
track current xCAT so the dependency resolves.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:26 -03:00
Daniel Hilst 37212eea3c fix(xcat): drop unsatisfiable ppc64 genesis-scripts dependency
xcat and xcatsn declared a hard dependency on xcat-genesis-scripts-ppc64. In
an amd64-only build that package is never produced, so apt could not satisfy
the dependency and refused to install xcat. Depend only on the amd64
genesis-scripts package.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:26 -03:00
Daniel Hilst e2e15184f2 fix(build-ubunturepo): derive a stable, filesystem-safe repo path
The apt output directory is built from the current branch name. A branch
containing a slash created nested directories, and builds run as root against
a repository owned by another user collapsed the value to empty because git
aborted with "dubious ownership". Resolve the branch with safe.directory and
replace unsafe characters, so the output path is stable across branch names
and run contexts.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-24 14:20:26 -03:00
Markus Hilger c34f4db734 Merge pull request #7577 from VersatusHPC/master
xCAT 2.18.0 Release
2.18.0
2026-06-22 21:44:14 +02:00
Daniel Hilst 1d0a604116 Add 2.18 release info
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-22 13:28:51 -03:00
Markus Hilger b0303cf623 Merge pull request #7576 from VersatusHPC/master
Fix regressions for xCAT 2.18 release in EL10 x86_64
2026-06-21 01:15:28 +02: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 0e16eb6f1a Merge pull request #7575 from VersatusHPC/fix/7487-xcatprobe-tftp-umask
fix: xcatprobe TFTP check fails with wrong umask
2026-05-11 22:07:55 +02:00
Vinícius Ferrão 701e9e00c0 Fix xcatprobe TFTP check failure with restrictive umask
The is_tftp_ready() function creates test files that inherit the
shell's umask. With umask 027, files get 640 permissions and the
TFTP daemon (running as nobody/tftp) cannot read them, causing a
false negative even when TFTP service is healthy.

Temporarily set umask to 022 during test file creation so files
are world-readable (644), then restore the original umask.

Fixes: https://github.com/xcat2/xcat-core/issues/7487
2026-05-11 13:13:05 -03:00
Markus Hilger c0f93fbdde Merge pull request #7574 from VersatusHPC/fix/7379-xcat-csh-syntax
fix: csh syntax error in /etc/profile.d/xcat.csh
2026-05-11 15:42:47 +02: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 3f833fcabd Fix csh syntax error in /etc/profile.d/xcat.csh
The PERL5LIB conditional block added in commit 3cc4a39c8 used bash
if-then-fi syntax instead of csh if-then-endif syntax, causing
"Illegal variable name" errors for tcsh/csh users logging into
the xCAT manager node.

Fixes: #7379
2026-05-11 01:56:31 -03:00
Markus Hilger 2623c6889b Merge pull request #7572 from VersatusHPC/fix/missing-install-links
fix: missing install links
2026-05-11 04:29:14 +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
Markus Hilger a10f0ccc38 Merge pull request #7571 from VersatusHPC/fix/confignetwork-remove-option
feat: confignetwork: add -r option to remove undefined NICs
2026-05-08 09:41:44 +02:00
Markus Hilger f004021b19 Merge pull request #7570 from VersatusHPC/fix/nicutils-ipv4-validation
fix: nicutils IPv4 address validation
2026-05-08 09:40:58 +02: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
Vinícius Ferrão b69d9ca1f8 confignetwork: add -r option to remove undefined NICs
Port the -r option from the deprecated confignics postscript to
confignetwork. This allows removing network configuration for NICs
that are not defined in xCAT, useful when nodes have extra interfaces
that get DHCP addresses by default.

Safety checks ported from confignics:
- Skip non-ethernet interfaces
- Skip bridge members
- Skip xCAT-defined NICs
- Skip install NIC
- Skip VLAN interfaces
- Skip bonding members (SLAVE/MASTER)

Closes: https://github.com/xcat2/xcat-core/issues/6142
Supersedes: https://github.com/xcat2/xcat-core/pull/7092

Co-Authored-By: Christopher Walker <cjw1006@gmail.com>
2026-05-07 23:45:34 -03:00
Vinícius Ferrão adb93b3eac Fix nicutils IPv4 address validation
Co-authored-by: JDiprose <3533220+JDiprose@users.noreply.github.com>
2026-05-07 23:00:07 -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
Markus Hilger 7425c1b490 Merge pull request #7568 from VersatusHPC/fix/genesis-scripts-shell-hygiene
fix: improve genesis-scripts shell quoting and syntax hygiene
2026-05-08 01:59:53 +02:00
Markus Hilger 4aa3205bca Merge pull request #7567 from VersatusHPC/fix/makedhcp-remote-networks
fix: non-local networks being skipped in makedhcp
2026-05-08 01:57:19 +02:00
Markus Hilger 2b987fed98 Merge pull request #7566 from VersatusHPC/fix/nicutils-uuid-hardening
fix: harden nmcli connection handling against spaces in NM profile names
2026-05-08 01:55:42 +02: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
Vinícius Ferrão e239e04843 genesis-scripts: improve shell quoting and syntax hygiene
Replace backtick command substitutions with $(), quote variable
expansions to prevent word splitting, replace useless cat pipes with
redirections, use grep -q instead of redirecting to /dev/null, and use
bash parameter expansion for case conversion.

Based on the work from PR #6366, rebased and adapted to current master.
Shebangs already merged separately via df64bf8fe are excluded.

Co-Authored-By: Samveen <samveen@yahoo.com>
2026-05-07 18:17:00 -03:00
Vinícius Ferrão afbb9114cf fix: remove dead check that skips all remote networks in makedhcp
The activenics{"!remote!"} hash key is checked at line 1940 but never
set by any code path — neither the dhcpinterfaces parsing nor the
querynics discovery populates it. This causes the guard to always
evaluate true, hitting next and silently skipping every !remote!
network when dhcpinterfaces is defined in the site table or on a
service node.

Remove the dead check so remote networks are processed correctly.
The inner activenics{$netif} check (which uses the actual interface
name after stripping the !remote! prefix) is the correct guard and
is preserved.

Original analysis by lebonez in xcat2/xcat-core#7242.

Co-authored-by: Lebonez <25910791+lebonez@users.noreply.github.com>
2026-05-07 18:05:27 -03:00
Vinícius Ferrão 64ebf8c96e fix: harden nmcli connection handling against spaces in NM profile names
NetworkManager auto-generates connection names that can contain spaces
(e.g. "Wired connection 2"). Multiple devices can also share the same
auto-generated name. Both cases cause failures when names are passed
to nmcli in bridge and bond setup paths.

Resolve active connection UUID via nmcli device show (GENERAL.CON-UUID)
instead of by name, which avoids both word-splitting on spaces and
ambiguity when multiple connections share the same name.

Changes:
- Bridge slave setup: resolve UUID via device show instead of by name
- Bond slave setup: same UUID-via-device approach for con down/mod
- Bridge rollback: preserve original xcat-prefixed connection name so
  rollback paths restore the correct name instead of a UUID
- Utility functions: quote connection name arguments in
  is_nmcli_connection_exist, is_connection_activate_intime, and
  wait_nic_connect_intime for defensive correctness
- Add -F flag to grep in is_nmcli_connection_exist for literal matching
- Log both human-readable name and UUID when reusing existing connections

Tested on EL10 host with duplicate "Ethernet connection 1/2" profiles
across multiple NICs — UUID resolution via device returns exactly one
UUID per device regardless of name collisions.

Follows up on #7562 and #7483.

Co-authored-by: OliverTUBAF <86062666+OliverTUBAF@users.noreply.github.com>
2026-05-07 17:55:07 -03:00
Markus Hilger 96b0b0b551 Merge pull request #7565 from VersatusHPC/fix/netplan-static-ip-fallback
fix: add networkd fallback for netplan static IP probe
2026-05-07 19:54:37 +02: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
Markus Hilger fa17f7072d Merge pull request #7563 from VersatusHPC/fix/isc-omapi-tsig-policy
feat: support configurable ISC OMAPI TSIG policy
2026-05-07 19:51:32 +02:00
Vinícius Ferrão 219b0f1f5d Add networkd fallback for netplan static IP probe
Detect static netplan addresses on older Ubuntu netplan releases by falling back to generated systemd-networkd configuration when netplan get is unavailable. Keep netplan get authoritative when supported.

Co-authored-by: karcaw <663031+karcaw@users.noreply.github.com>
2026-05-07 13:46:33 -03:00
Vinícius Ferrão 57daff8a31 Use dnf for EL8+ RH genimage installroot 2026-05-07 12:54:38 -03:00
Markus Hilger 155e58e4ed Merge pull request #7562 from VersatusHPC/fix/nicutils-bridge-quoting
fix: use connection UUID in bridge slave setup in NetworkManager
2026-05-07 11:57:17 +02:00
Markus Hilger 5bd7bd2112 Merge pull request #7561 from VersatusHPC/fix/confignetwork-typo
fix: typo in confignetwork preventing SETINSTALLNIC from working
2026-05-07 11:55:55 +02:00
Markus Hilger 79dd24d80b Merge pull request #7560 from VersatusHPC/fix/otherpkgs-dnf-detection
fix: detect dnf as package manager in ospkgs and otherpkgs postscripts
2026-05-07 11:53:54 +02:00
Markus Hilger b2272818d8 Merge pull request #7559 from VersatusHPC/fix/bmcsetup-disable-retry
fix: skip disabled IPMI user slots in bmcsetup
2026-05-07 11:52:30 +02:00
Markus Hilger 5463a7c46c Merge pull request #7558 from VersatusHPC/fix/mkdef-partial-object-on-validation-error
fix: prevent mkdef partial writes on validation errors
2026-05-07 11:50:41 +02: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