2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-28 17:46:40 +00:00
Commit Graph

2497 Commits

Author SHA1 Message Date
Vinícius Ferrão 8f2c508950 fix(mknb): reject incomplete exports 2026-08-11 20:18:27 -03:00
Vinícius Ferrão 9f64387291 test(mknb): cover export manifest validation 2026-08-11 20:13:26 -03:00
Vinícius Ferrão bc12f78a77 test(mknb): prepare export manifest fixture 2026-08-11 20:12:45 -03:00
Vinícius Ferrão c0de6337da test(server): check Digest::SHA dependencies 2026-08-11 20:11:01 -03:00
Vinícius Ferrão 57360b89ff test(mknb): cover exported Genesis images 2026-08-11 20:10:22 -03:00
Vinícius Ferrão 875a6ef40d Merge pull request #7723 from VersatusHPC/fix/kea-xnba-network-fallback 2026-08-11 12:49:44 -03:00
Vinícius Ferrão be51b428a3 Merge pull request #7720 from VersatusHPC/fix/ci-noninteractive-install
fix(ci): make package validation noninteractive
2026-08-11 03:27:56 -03:00
Vinícius Ferrão d8464db7ac Merge pull request #7712 from VersatusHPC/fix/52-ubunturepo-builddir
fix(build-ubunturepo): scope the build lock + scratch under an option…
2026-08-11 03:25:48 -03:00
Vinícius Ferrão c211fdb3bb test(dhcp): cover Kea xNBA network fallback 2026-08-10 17:12:37 -03:00
Vinícius Ferrão 0b8c44b283 test(mknb): cover Genesis boot paths 2026-08-10 15:08:28 -03:00
Daniel Hilst edfe6a8840 fix(build-ubunturepo): scope the build lock per checkout so parallel-lane builds don't fail
build-ubunturepo guarded builds with a single host-global, fail-fast lock at
/var/lock/xcatbld.lock (`flock -n`). Two builds on one host -- e.g. the devel and
stable Ubuntu CD lanes on xcat-master-ub -- therefore collided on that one lock and
the loser exited 1 with "Can't get lock ...", failing the whole pipeline, even though
each lane builds from its own checkout into its own DEST and they share nothing.

build-ubunturepo builds its packages in-place in its own source checkout (it rewrites
debian/changelog and debian/control, drops *.orig.tar.gz at the checkout root and runs
dpkg-buildpackage inside the package dirs), so the resource two concurrent builds
actually contend for is the checkout, not the host. Key the lock on the checkout path
($curdir): builds of the SAME checkout still fail-fast (they would corrupt each other
in-place), while builds of DISTINCT checkouts get distinct locks and run in parallel.
The lock file stays on the local /var/lock (reliable flock, unlike the NFS/virtiofs
checkout) and the source tree is left byte-pristine.

Add xCAT-test/unit/build_ubunturepo_lock.t, which extracts the lock block from the
script verbatim and asserts: the lock path is /var/lock/xcatbld-<hash-of-checkout>.lock
and deterministic per checkout; a second build of the same checkout fails fast; two
distinct checkouts acquire their locks concurrently.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-10 10:26:03 -03:00
Vinícius Ferrão edd1ca040e test(ci): check syntax exclusions 2026-08-09 13:16:38 -03:00
Vinícius Ferrão de8f81d674 test(ci): check dependency install 2026-08-09 13:09:54 -03:00
Vinícius Ferrão e3d9a633b5 test(ci): cover noninteractive installs 2026-08-09 12:15:04 -03:00
Vinícius Ferrão 3b6bcac8db test(dhcp): expose inconsistent Kea reservation state 2026-07-31 22:21:51 -03:00
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 52cdf7fe36 test(xcat-core): cover *NOIP* NICs in Kea DHCP reservation builders
Add a regression case to dhcp_kea_plugin_intent.t for a node whose mac
table entry uses the *NOIP* sentinel on a secondary NIC
("mac1|mac2!*NOIP*"). The mocked getipaddr resolves every name (including
the literal *NOIP*), so the only thing that can keep the node to a single
reservation is an explicit *NOIP* skip in kea_node_reservations() and
kea_node_reservations6(). The test asserts exactly one v4 and one v6
reservation, for the real NIC, with no reservation carrying *NOIP* as a
hostname -- covering both the "bogus second reservation" and the
"unresolved reservation aborts makedhcp" failure modes.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-31 19:22:51 -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 3bc24cf08f test(dhcp): cover Kea reservation regeneration 2026-07-31 15:22:27 -03:00
Vinícius Ferrão 40f05589f9 test(dhcp): cover unresolved Kea reservations 2026-07-31 15:14:54 -03:00
Daniel Hilst 5d9286cfb7 fix(xcat-core): fold release-alias finalize into merge_core_repos
merge_core_repos already assembles the multi-arch core and runs the full
finalize tail (index -> sign -> final metadata -> write_release_alias, in the
required order so the xCAT-release-latest alias lands AFTER metadata and stays
out of the repo index). The preceding commit restored a separate finalize_core
sub purely to satisfy xcat_release_package.t, which grepped for
'sub finalize_core { ... $dir ... }'. That left two overlapping entry points:
--finalize-core (finalize one pre-assembled dir) and --merge-core-repos
(assemble N per-arch dirs THEN finalize) -- the former a strict subset of the
latter, with no in-tree or CI caller.

Consolidate on the single assemble+finalize path: inline the finalize tail into
merge_core_repos, drop sub finalize_core and the --finalize-core getopt/dispatch,
and update xcat_release_package.t to assert the stable alias is created after the
final metadata pass inside merge_core_repos ($out). Behaviour is unchanged (merge
already wrote the alias); only the redundant finalize_core interface is removed.
xcat_release_package.t 26/26; perl -c clean.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-30 13:07:06 -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 18ef026fc5 Merge pull request #7638 from VersatusHPC/harvest/apache-security-hardening
fix(httpd): harden the xCAT Apache configuration
2026-07-28 11:05:42 -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 b4a5a86b4b Merge pull request #7665 from VersatusHPC/harvest/genesis-ib-support
fix(genesis): find the boot NIC over InfiniBand (IPoIB)
2026-07-28 11:01:51 -03:00
Vinícius Ferrão 951562a45a test(httpd): require SLES service unit 2026-07-27 17:19:27 -03:00
Vinícius Ferrão f8267cb8f3 test(httpd): cover package activation across distros 2026-07-27 17:19:27 -03:00
Vinícius Ferrão 06eced0951 test(httpd): verify security response headers
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-27 17:18:57 -03:00
Daniel Hilst eb76ddfbb6 Merge pull request #7673 from VersatusHPC/refactor/network-address-accumulation
refactor(network): centralize address accumulation
2026-07-27 15:32:09 -03:00
Vinícius Ferrão 1f56331435 test(xnba): cover conditional pxelinux warnings
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
Vinícius Ferrão 1d6ed6a4eb test(genesis): cover InfiniBand module packaging
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-27 15:19:33 -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 e2c57c636d Merge pull request #7647 from VersatusHPC/refactor/probe-netplan-command-capture
refactor(probe): reuse command capture for netplan
2026-07-27 12:27:36 -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
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 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 1034752080 test(kea): harden live Control Agent smoke 2026-07-25 01:26:46 -03:00
Vinícius Ferrão d155509345 test(kea): preserve named configuration group selection 2026-07-25 01:26:46 -03:00
Vinícius Ferrão 5c3bb1d9fa test(dhcp): cover 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
Daniel Hilst 851284067d fix(xcat-core): retry_install waits 20 min per provision attempt, not 30
wait_for_provision caps how long retry_install polls for a node to reach
'booted' after each rinstall. Measured healthy provisions in devel-cd #22 boot
well inside this window (diskless ~6-8 min, diskfull ~8-16 min), so 30 min was
mostly slack that only lengthened the give-up time on a genuinely failing node.

Drop it to 20 min: still above the ~16-min diskfull install, while shrinking each
failed attempt's cost (6 min fixed sleep + 20 poll = 26 min vs 36). Combined with
the 3->2 attempt default, a fully-failing case's retry stack drops substantially.
Trade-off noted: the margin over a slow-under-load diskfull install is now tighter.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-24 16:19:58 -03:00
Daniel Hilst b9336448f7 fix(xcat-core): retry_install defaults to 2 provision attempts, not 3
retry_install.sh retries a node provision $times (default 3) x 30 min. The flat
diskless/diskfull cases each call it multiple times, so when a node genuinely
fails to come up the retries stack to ~3.5-4 h per case (measured: a single
contention-flaked el8-x86 diskless burned 14181s in devel-cd #22), which both
balloons the CD wall-clock and delays the red verdict.

Two attempts still absorbs a one-off transient (a single slow/failed netboot)
while halving the worst-case retry time (3->2 tries per call). Callers that pass
an explicit count (e.g. the negative-provision check that passes 1) are
unaffected -- only the default changes.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-24 16:15:15 -03:00
Vinícius Ferrão 3aff408657 fix(test): load the installed networks plugin 2026-07-24 13:35:35 -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