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

10567 Commits

Author SHA1 Message Date
Vinícius Ferrão 287ed79b62 Merge pull request #7706 from VersatusHPC/fix/kea-makedhcp-noip-reservation
fix(xcat-core): skip *NOIP* NICs when building Kea DHCP reservations
2026-07-31 20:15:43 -03:00
Daniel Hilst 9125d4da3c fix(xcat-core): skip *NOIP* NICs when building Kea DHCP reservations
makedhcp using the Kea backend fails for any node whose mac table entry
uses the *NOIP* sentinel to mark a secondary NIC that has no IP address
(e.g. "mac1|mac2!*NOIP*|mac3!*NOIP*"). kea_node_reservations() and
kea_node_reservations6() split each NIC's hostname and pass it straight
to getipaddr(), so the literal string "*NOIP*" is treated as a host to
resolve. It cannot resolve, and the reservation is reported as unresolved
-- which aborts the whole makedhcp run, leaving the node with no Kea
reservation at all and therefore no DHCP lease.

This breaks provisioning on distros that use the Kea backend (e.g. EL10,
which has no ISC dhcp-server): the node never gets an address and is
unreachable, while the ISC backend has always handled *NOIP* and is
unaffected.

Skip *NOIP* NICs in both the DHCPv4 and DHCPv6 reservation builders, the
same way the ISC path does -- there is no address to reserve for them.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-31 19:29:20 -03:00
Daniel Hilst 2c9d0a3523 Merge pull request #7703 from VersatusHPC/fix/kea-preserve-reservations-on-makedhcp-n
fix(dhcp): preserve Kea reservations on makedhcp -n
2026-07-31 17:32:04 -03:00
Vinícius Ferrão 781d5e4163 fix(dhcp): preserve Kea reservations on makedhcp -n 2026-07-31 15:22:19 -03:00
Vinícius Ferrão 90c6eeae55 fix(dhcp): report unresolved Kea reservations 2026-07-31 15:12:41 -03:00
Daniel Hilst e3f3862280 fix(xcat-core): drop trailing blank line in rhels9 ppc64le pkglist
PR #7677 added xCAT-server/share/xcat/netboot/rh/compute.rhels9.ppc64le.pkglist
with a stray empty line at the end of the file. The reviewer asked for it to be
removed before merge, but it slipped through. A trailing blank line in a pkglist
is meaningless and inconsistent with the rest of the netboot package lists, so
remove it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-28 16:44:22 -03:00
Daniel Hilst c811f2b1bd Merge pull request #7677 from VersatusHPC/fix/xcat-core-matrix-build
fix(xcat-core) Fixes to get internal CI green
2026-07-28 16:33:08 -03:00
Vinícius Ferrão 036bb24c87 fix(packaging): preserve xcatd init state on Debian (#7615)
* refactor(packaging): share precise systemd state detection

* test(packaging): cover precise systemd state detection

* test(packaging): allow explicit Debian init mode

* fix(packaging): honor explicit Debian init targets

* test(packaging): cover Debian init target detection

* fix(packaging): add Debian xcatd init state helper

* test(packaging): cover Debian xcatd init state helper

* test(packaging): allow delegated SysV registration

* fix(packaging): preserve Debian xcatd conffile lifecycle

* test(packaging): mirror explicit Debian init mode

* test(packaging): cover Debian xcatd conffile lifecycle

* fix(packaging): contain init state file umask

* test(packaging): cover init state permissions

* fix(packaging): contain preinstall context umask

* test(packaging): cover preinstall umask containment

* fix(packaging): detect all systemd enablement links

* test(packaging): cover all systemd enablement links

* test(packaging): allow shared purge state path

* refactor(packaging): reuse Debian init state path

* fix(packaging): detect runtime systemd masks

* test(packaging): cover runtime systemd masks

* test(packaging): model Debian SysV registration

* refactor(packaging): reuse shared init state detection

* test(packaging): enforce shared Debian state probes

* test(packaging): allow explicit unregistered masks

* fix(packaging): preserve Debian SysV registration state

* test(packaging): cover Debian SysV registration states

* fix(packaging): clean failed Debian state writes

* test(packaging): cover failed Debian state writes

* fix(packaging): retain unregistered systemd provenance

* test(packaging): cover unregistered systemd upgrades

* fix(packaging): fail closed on shared state errors

* test(packaging): cover shared state detector failures

* test(packaging): mirror native xcatd runlevels

* fix(packaging): recover rejected SysV layouts

* test(packaging): cover rejected SysV layouts

* test(packaging): cover SysV rebuild retries

* refactor(packaging): reuse systemctl readiness guard

* test(packaging): enforce shared systemctl guard
2026-07-28 19:31:36 +00:00
Daniel Hilst 9e7b281519 Merge pull request #7640 from VersatusHPC/refactor/openbmc-reuse-retry-after
refactor(openbmc): reuse retry scheduler for 503 responses
2026-07-28 15:53:10 -03:00
Daniel Hilst cf159d31aa Merge pull request #7691 from VersatusHPC/harvest/pxelinux
fix(xnba): warn instead of failing when pxelinux.0 is unavailable
2026-07-28 11:03:39 -03:00
Daniel Hilst c8562284ee Merge pull request #7672 from VersatusHPC/harvest/blade-findme-nodetype
fix(blade): only scan a node MPA during discovery if it is a blade
2026-07-27 15:30:16 -03:00
Daniel Hilst aeaf4df315 Merge pull request #7676 from VersatusHPC/harvest/sle-root-partition-max
fix(sle): give the SUSE root partition the whole disk (align with RHEL/Ubuntu)
2026-07-27 15:22:58 -03:00
Vinícius Ferrão 42e8ef64cc fix(xnba): warn only when pxelinux is required
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-27 15:22:12 -03:00
Daniel Hilst 7ebb7ffc9a Merge pull request #7678 from VersatusHPC/refactor/ipmi-sha1-fallback
refactor(ipmi): centralize RMCP+ SHA1 fallback
2026-07-27 15:22:01 -03:00
Daniel Hilst d4d9d5c859 Merge pull request #7690 from VersatusHPC/harvest/port80
fix(netboot): omit the default HTTP port from generated boot URLs
2026-07-27 15:15:18 -03:00
Daniel Hilst c7c548fbb3 Merge pull request #7628 from VersatusHPC/harvest/xnba-ipxe-mac-format
fix(xnba): use the iPXE-native MAC format on the BIOS boot path
2026-07-27 15:12:06 -03:00
Daniel Hilst 4e891c4eaa Merge pull request #7692 from VersatusHPC/harvest/genimagenote
fix(genimage): explain the harmless bus messages from the image chroot
2026-07-27 11:28:42 -03:00
Daniel Hilst f28ad8587e Merge pull request #7694 from VersatusHPC/harvest/grub2-protocol-regex
fix(grub2): anchor the netboot protocol validation regex
2026-07-27 11:24:20 -03:00
Daniel Hilst e5bc261811 Merge pull request #7667 from VersatusHPC/harvest/ipmi-fpc-neverwait
fix(ipmi): never rate-limit packets to an FPC during reseat
2026-07-27 11:11:52 -03:00
Daniel Hilst caffd43e2d Merge pull request #7660 from VersatusHPC/harvest/ipmi-lenovo-recognition
fix(ipmi): recognize additional Lenovo IMM firmware prefixes and energy code
2026-07-27 10:55:02 -03:00
Daniel Hilst 34fd97ae63 Merge pull request #7666 from VersatusHPC/harvest/esx-esxboot-fallback
fix(esx): stage esxboot-x64.efi from the install media if missing
2026-07-27 10:39:05 -03:00
Daniel Hilst 90b63577f5 Merge pull request #7664 from VersatusHPC/harvest/getinstdisk-vroc
fix(getinstdisk): use an Intel RSTe/VROC RAID when no other disk is found
2026-07-27 10:34:30 -03:00
Daniel Hilst 2533c4ac62 Merge pull request #7635 from VersatusHPC/harvest/rinv-deterministic-sort
fix(rinv): sort FRU output deterministically
2026-07-27 08:26:08 -03:00
Daniel Hilst defa2e3196 Merge pull request #7636 from VersatusHPC/harvest/nodestat-fping-missing-msg
fix(nodestat): report a clear error when fping is missing
2026-07-27 08:24:27 -03:00
Daniel Hilst 4729139cb1 Merge pull request #7637 from VersatusHPC/harvest/rspconfig-empty-option-msg
fix(rspconfig): clearer error when no option is given
2026-07-27 08:22:07 -03:00
Daniel Hilst efd205a407 Merge pull request #7642 from VersatusHPC/harvest/replaycons-usage-and-docs
fix(replaycons): print full usage on missing argument, document confluent log rotation
2026-07-27 07:59:22 -03:00
Vinícius Ferrão 39f721713e fix(netboot): omit the default HTTP port from generated boot URLs
Boot URLs handed to nodes always carried an explicit :80 even when the HTTP
server listens on the default port. grub2.pm already omits the port when it is
80; make the xNBA, genesis and DHCP boot URLs consistent with it.

$portsuffix is empty when site.httpport is unset or 80 and ":<port>" otherwise,
so a non-default port is unchanged. Covers the ISC and Kea paths in dhcp.pm,
xnba.pm, mknb.pm, and the Kea xNBA client classes in BootPolicy.pm.

dhcp_boot_policy.t and mknb_xcatd_address.t follow the new URLs and gain cases
for a non-default and an unset port. The floating-address guard in
mknb_xcatd_address.t also drops :80 so that it keeps matching.

Recovered from the unmerged lenovobuild branch (cd61fd9d, a2f77ea9, 1035841b,
b7db0e2, 792fe6d).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-26 03:14:50 -03:00
Vinícius Ferrão 3684d900ef fix(replaycons): print full usage on missing argument, document confluent log rotation
When invoked with no node name, replaycons printed a terse "Please specify a
node name."  Print the full usage statement instead, consistent with -h.

Also document, in the man page, that confluent log rotation renames older logs
and how to replay one by appending the date suffix seen in
/var/log/confluent/consoles/.

Recovered from the unmerged lenovobuild branch (originals 1c1b23fac, 48a92b7d4).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 21:41:19 -03:00
Vinícius Ferrão 854babe0c5 fix(rspconfig): clearer error when no option is given
Running rspconfig against an mgt=ipmi node with no option fell through to the
generic "Unsupported command: rspconfig " message (with an empty option),
which does not tell the user what is wrong. Detect the empty option in
preprocess_request and report that options are required.

Recovered from the unmerged lenovobuild branch (original 08ae94bd).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 21:41:11 -03:00
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
Vinícius Ferrão d08a264e9d fix(rinv): sort FRU output deterministically
The FRU key sort used only `$a <=> $b`, a numeric comparison that returns 0
for the non-numeric FRU field names, leaving them in hash-iteration order.
That order is randomized per process, so `rinv <node> all` printed its fields
in a different order on each run. Add `$a cmp $b` as a tiebreaker so the
output is stable.

Recovered from the unmerged lenovobuild branch (original 9cd3fac6).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 21:41:03 -03:00
Vinícius Ferrão 62ed60a4f0 fix(genimage): explain the harmless bus messages from the image chroot
systemd tooling run inside the image chroot has no bus to talk to and prints
"Failed to connect to bus: No such file or directory". The image builds
correctly, so say so at the end of the run instead of leaving it to be guessed.

Recovered from the unmerged lenovobuild branch (e372fb5b).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 21:30:35 -03:00
Vinícius Ferrão cb6a139286 fix(grub2): anchor the netboot protocol validation regex
noderes.netboot is parsed as grub2-<protocol> and validated with
/^http|tftp$/, which reads as (^http)|(tftp$) and so also accepts values
such as https, httpx and xtftp.

A value that passes but is not exactly "http" then falls through to
set root=$grub2protocol,$serverip, which drops site.httpport, so the mistake
surfaces as a confusing grub2 failure at boot instead of the "Invalid netboot
method" error this check exists to give. grub2-https cannot work in any case,
since only "insmod http" is emitted.

Supported values are unchanged: grub2, grub2-http and grub2-tftp.
2026-07-25 17:28:27 -03:00
Vinícius Ferrão 40f754d657 fix(xnba): warn instead of failing when pxelinux.0 is unavailable
nodeset aborted with "Unable to find pxelinux.0 from syslinux" when neither
the copy under the tftp directory nor the one under XCATROOT existed. Only
legacy BIOS clients chain pxelinux and not every distribution still ships
syslinux, so a UEFI-only environment could not run nodeset at all.

Copy pxelinux.0 when it is available and warn, rather than fail, when it is not.

Recovered from the unmerged lenovobuild branch (4f0a5106), which skipped
silently; warn so the missing loader is still reported.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-25 16:53:25 -03:00
Vinícius Ferrão 543eab3bdc fix(dhcp): reuse Kea control socket paths 2026-07-25 01:26:45 -03:00
Daniel Hilst 3191b874a3 Merge pull request #7629 from VersatusHPC/harvest/template-xcatroot-fallback
fix(template): fall back to $::XCATROOT when XCATROOT is not in %ENV
2026-07-24 18:45:55 -03:00
Daniel Hilst 929aa3292e Merge pull request #7630 from VersatusHPC/harvest/networks-exclude-all-linklocal
fix(networks): make IPv6 route filtering in donets() robust
2026-07-24 18:44:17 -03:00
Daniel Hilst 137508bc06 Merge pull request #7632 from VersatusHPC/harvest/nodech-comma-groups
fix(nodech): support comma-delimited values in the ,= and ^= operators
2026-07-24 18:41:53 -03:00
Vinícius Ferrão a64b6c647e fix(template): preserve explicit XCATROOT values 2026-07-24 13:07:51 -03:00
Vinícius Ferrão f8548ceeb9 fix(networks): validate IPv6 route filtering 2026-07-24 13:07:37 -03:00
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
Daniel Hilst 1424188693 Merge pull request #7617 from VersatusHPC/harvest/dhcp-ipv6-infinite-loop
fix(dhcp): avoid infinite loop building IPv6 reverse zones
2026-07-24 12:08:24 -03:00
Daniel Hilst 69a54aadd4 Merge pull request #7619 from VersatusHPC/harvest/mknb-atomic-genesis-image
fix(mknb): build the genesis image atomically to survive concurrent runs
2026-07-24 12:05:34 -03:00
Daniel Hilst e469aff826 Merge pull request #7604 from VersatusHPC/refactor/dhcp-shared-mac-normalization
refactor(dhcp): reuse Kea MAC normalization
2026-07-24 11:24:08 -03:00
Vinícius Ferrão c652ec2ad0 refactor(ipmi): centralize RMCP+ SHA1 fallback 2026-07-23 22:03:47 -03:00
Vinícius Ferrão b33eb5e1c6 fix(sle): give the SUSE root partition the whole disk (auto -> max)
The SLE AutoYaST profile sized the root partition with <size>auto</size>, which
lets YaST pick a size and can leave the rest of the disk unused. RHEL
(part / --grow) and Ubuntu (root uses the remaining space) both give root the
whole disk; make SUSE consistent by using <size>max</size>. Swap stays auto.

Recovered from the unmerged lenovobuild branch (9a8679f4).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-23 21:53:16 -03:00
Daniel Hilst 8bb0606120 fix(xcat-core): add the missing ppc64le netboot templates for EL8/EL9
copycds only defines a <osver>-<arch>-netboot-compute osimage when the netboot
compute pkglist/exlist/postinstall for that distro+arch exist under
share/xcat/netboot/<distro>/. For AlmaLinux the ppc64le set was present only for
alma10, so on an el8/el9 ppc64le management node copycds created just the
install-* osimages and no netboot one.

The stateless provisioning test then fails in a confusing way: the case's own
`chdef -t osimage -o <osver>-ppc64le-netboot-compute synclists=...` auto-creates
a bare object, so lsdef reports the image exists (imagetype=NIM and nothing
else), while genimage rejects it with

    Error: Cannot find image '<osver>-ppc64le-netboot-compute' from the osimage table.

and packimage plus the install that follows fail with it.

Two gaps are filled:
- share/xcat/netboot/rh/compute.rhels9.ppc64le.pkglist did not exist at all
  (rhels8 and rhels10 both ship one). Add it with the same content as the
  rhels9 x86_64 list, matching rhels10 where the two arches are identical.
- alma8/alma9 ppc64le compute exlist/pkglist/postinstall are added as symlinks
  into the rh/ equivalents, exactly as alma10 ppc64le and rocky10 ppc64le
  already do.

With these present, copycds produces a fully populated netboot-compute osimage
(provmethod=netboot, pkglist/exlist/postinstall/rootimgdir set) as it already
does on alma10 ppc64le.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 21:39:23 -03:00
Daniel Hilst b42bbe0e02 fix(goconserver): manage the service via systemd instead of the service command
Goconserver.pm shells out to `service goconserver start|stop|restart` (and
`service conserver stop`). That command is provided by the initscripts package,
which is NOT installed on a minimal EL9/EL10 management node -- there, every one
of these calls fails with rc!=0.

The damaging case is restart_service(). makegocons calls build_conf(), which
rewrites /etc/goconserver/server.conf with the cert-enabled configuration
(global.ssl_key_file/ssl_cert_file/ssl_ca_cert_file), and then calls
restart_service() so the daemon picks it up. When the restart fails, xCAT only
logs "Could not restart goconserver service." and the daemon keeps running with
the configuration it read at boot -- the packaged default, which has no ssl_*
fields. goconserver's TLS is gated on those fields being set (sslEnable stays
false), so it silently serves plain HTTP on the api port while Goconserver.pm
always talks to it over https. Every subsequent request then dies with

    SSL connect attempt failed error:0A0000C6:SSL routines::packet length too long

so makegocons/makegocons -d report "Failed to send delete request." and the
console can never be registered. On EL8 the bug is invisible because initscripts
happens to be installed there.

Use the xCAT::Utils service helpers (startservice/stopservice/restartservice),
which resolve the unit through servicemap() and issue `systemctl <action> <unit>`
on systemd hosts, falling back to `service`/`initctl` only where appropriate.
This is the same mechanism the rest of the tree (AAsn.pm and friends) already
uses for named, dhcpd, nfs and others.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 21:33:50 -03:00
Vinícius Ferrão d4fe30f039 fix(blade): only scan a node's MPA during discovery if it is a blade
blade.pm's preprocess_request iterates the mp table during 'findme' discovery.
Because many node types populate the mp table, non-blade nodes were being
scanned as if they were BladeCenter/Flex blades. Skip a node during findme
unless its nodetype is 'blade'.

Scoped to blade.pm's findme path and gated on nodetype, so only blade discovery
is affected; the existing whole-request findme handling (already-processed
short-circuit) is a separate check and is unchanged.

Not lab-validated (no BladeCenter/Flex MPA available).

Recovered from the unmerged lenovobuild branch (6573d8f9).
2026-07-23 21:15:20 -03:00
Vinícius Ferrão 5c8bf6605a Merge pull request #7641 from VersatusHPC/harvest/replaycons-consoleservice-detect 2026-07-23 20:11:26 -03:00