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

6883 Commits

Author SHA1 Message Date
Vinícius Ferrão 10945e7fee fix(nodestat): report a clear error when fping is missing
nodestat -f runs fping to reach the nodes; if the fping package is not
installed the pipe yielded no output and nodestat silently returned an empty
result. Check that an fping binary exists before running it and emit an
explicit "must install fping" error otherwise.

Recovered from the unmerged lenovobuild branch (original f0c88182), reworked
to test for the binary directly: the original inferred fping's presence from
whether the pipe produced output, which false-positived (reporting fping
missing) when fping was present but every node was unresolvable -- caught in
lab validation.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 21:41:07 -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
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 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 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 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 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
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 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
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
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
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
Vinícius Ferrão 2ae97c2ac4 fix: prevent mkdef partial writes on validation errors 2026-05-06 20:40:38 -03:00
Markus Hilger cb11564ff1 Merge pull request #7556 from VersatusHPC/fix/openbmc-503-retry
fix: retry on HTTP 503 from OpenBMC REST API instead of failing
2026-05-07 00:34:10 +02:00
Markus Hilger a90ef274aa Merge pull request #7555 from VersatusHPC/fix/ipmi-rmcptag-and-cbcpad
fix: ipmi rmcptag and cbcpad
2026-05-07 00:00:15 +02:00
Vinícius Ferrão 1bca57fa2a fix: retry on HTTP 503 from OpenBMC REST API instead of failing
OpenBMC BMCs intermittently return 503 Service Unavailable when the
REST service is busy or recovering. xCAT reported the error immediately,
requiring the user to manually retry. A second attempt usually succeeds.

Retry the same request up to 3 times with a 3-second wait on 503.
If all retries fail, report the error as before. The existing 504
handling for bmcreboot is preserved.

Ref: #4264
2026-05-06 18:50:53 -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 c0e8b1730e fix: fall back from sha256 to sha1 on RAKP2 auth rejection
Extend the existing sha256-to-sha1 fallback (already present in
got_rmcp_response for Open Session errors) to also cover RAKP2
rejections with "Unauthorized name" (0x0d) or "Invalid role" (0x09).

Ref: #7511
2026-05-06 01:26:29 -03:00
Vinícius Ferrão 86f6a12264 fix: set IPMI name-only lookup bit in RAKP1 to match ipmitool
Set bit 4 (0x10) of the requested privilege byte in RAKP Message 1
for name-only user lookup, matching ipmitool behavior. Use the same
value consistently in all HMAC calculations (RAKP2 verification,
RAKP3 auth code, SIK derivation).

Without this, some BMCs fail user lookup with "Unauthorized name"
even though the credentials are correct.

Ref: #7511
2026-05-06 01:25:55 -03:00
Vinícius Ferrão 2bcdc52f92 fix: accept RMCP message tag 0 from OpenBMC with session ID correlation
OpenBMC-based BMCs return message tag 0 in RAKP2/RAKP4 instead of
echoing the tag from the request. xCAT rejected these as stale
responses and retried indefinitely until timeout.

Accept tag 0 but verify the remote console session ID in the response
matches our current sidm. This prevents stale retries from corrupting
session state while allowing OpenBMC responses through.

Applied to got_rmcp_response, got_rakp2, and got_rakp4.

Ref: #7511
2026-05-06 01:25:09 -03:00
Vinícius Ferrão cb2a6b3f3c fix: reject IPMI packets with invalid CBC padding instead of crashing
cbc_pad in decrypt mode reads the last byte as the pad count, then
calls splice(@block, 0 - $count). If decrypted data is corrupt, the
pad count can exceed the array size, crashing with "Modification of
non-creatable array value attempted, subscript -16".

Return empty string on invalid padding so the caller treats it as a
decryption failure rather than accepting corrupted data as a valid
IPMI response.

Ref: #7511
2026-05-06 01:23:10 -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 2618b532c5 Merge pull request #7547 from VersatusHPC/fix/dhcp-dynamic-range-overlap
fix: errors out when node IP overlaps DHCP dynamic range
2026-05-05 09:28:23 +02:00
Markus Hilger 472529e046 Merge pull request #7546 from VersatusHPC/fix/remove-hardcoded-quiet
fix: move kernel quiet flag from hardcoded to osimage default
2026-05-05 09:26:26 +02:00
Vinícius Ferrão bb8dd525da Error when node IP overlaps DHCP dynamic range
Previously, makedhcp warned but still created host entries without
a static IP reservation when a node's address fell inside the
dynamic range. The node would silently get a random IP from the
pool instead of its configured address.

Now errors and skips the node on all four DHCP paths (ISC v4/v6,
Kea v4/v6) with a clear message telling the admin to move the IP
outside the range or adjust the dynamic range.

This makes ISC DHCP and Kea behavior consistent and aligns with
xCAT's design: the dynamic range is for hardware discovery,
known nodes should have static IPs outside it.

Closes #6539
2026-05-05 00:48:30 -03:00
Vinícius Ferrão 03a16dd081 fix: move kernel quiet flag from hardcoded to osimage default
The quiet kernel parameter was hardcoded in anaconda.pm and sles.pm,
making it impossible for admins to get verbose boot output without
editing plugin source code. The existing addkcmdline mechanism
(bootparams and linuximage tables) only appends to the kernel command
line, so there was no way to remove quiet.

Move quiet out of the plugin kcmdline construction and into the
linuximage.addkcmdline default set during copycds osimage creation.
Admins who want verbose boot for debugging can now remove it per
osimage:

    chdef -t osimage <image> addkcmdline=""

New osimages get addkcmdline="quiet" by default. Existing osimages
with a custom addkcmdline are not overwritten on re-run of copycds.

Genesis/discovery boot (mknb.pm) is unchanged as it does not use
osimage definitions.

Addresses #6916
2026-05-04 22:58:52 -03:00
Vinícius Ferrão bfbc48c698 fix: fail nodeset when MASTER_IP cannot be resolved
Template.pm silently continued rendering kickstart templates when
getipaddr() failed to resolve the master hostname, producing
kickstarts with an empty MASTER_IP. Nodes would install successfully
but fail on first reboot when post.xcat and xcatinstallpost tried
to contact the master, timing out after 90 retries with:

    the network between the node and  is not ready

Postage.pm (mypostscript generation) already checks for this and
returns a clear error. Apply the same pattern in Template.pm so
nodeset fails immediately with a descriptive message instead of
producing a broken kickstart.

Fixes #7544
2026-05-04 18:52:13 -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
Markus Hilger c7915645b3 Merge pull request #7541 from VersatusHPC/fix/ipmi-rspconfig-set-readback
Improve rspconfig SET readback and fix backupgateway SET target
2026-05-04 17:19:38 +02:00
Markus Hilger 2bdb0d4d02 Merge pull request #7540 from VersatusHPC/fix/remove-docker-lifecycle
fix: remove Docker container lifecycle management (dead code since 2016)
2026-05-04 17:15:58 +02:00
Vinícius Ferrão d71c7f7ac6 Improve rspconfig SET readback and fix backupgateway SET target
On some BMCs (notably Supermicro), a GET immediately after SET
returns the old value until the BMC applies the change. This made
rspconfig output misleading for network setting operations.

- Store the canonical SET value after normalization and compare
  with the GET readback for ip, netmask, gateway, and backupgateway.
  When they differ, annotate the output:
  "BMC Gateway: 10.20.0.1 (requested 10.20.0.254, not yet reflected)"
- Consolidate ip/netmask/gateway/backupgateway display into one block
- Fix backupgateway SET: was routed through the gateway branch
  writing parameter 0x0C instead of 0x0E. Now has its own branch
  writing the correct IPMI parameter.
- ip=dhcp is unaffected (separate code path, never stores a value)

Tested on Supermicro IPMI BMC (10.20.0.51).

Fixes #3445
2026-05-03 21:01:42 -03:00
Markus Hilger ddd7f8da3f Merge pull request #7539 from VersatusHPC/fix/ipmi-vlan-disable
fix: IPMI VLAN disable
2026-05-03 20:10:47 +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