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

27249 Commits

Author SHA1 Message Date
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
Daniel Hilst db9da9667f Merge pull request #7646 from VersatusHPC/harvest/bmcsetup-verify-before-set
fix(bmcsetup): skip BMC LAN settings that already match (verify before set)
2026-07-27 07:58:09 -03:00
Daniel Hilst d28e7b39e2 Merge pull request #7643 from VersatusHPC/harvest/docs-manpage-clarifications
docs: port man-page clarifications from lenovobuild
2026-07-27 07:52:47 -03:00
Daniel Hilst a6f93d26b9 Merge pull request #7605 from VersatusHPC/fix/kea-control-agent-runtime-paths
fix(dhcp): use Kea runtime paths
2026-07-26 08:33:58 -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 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 a44e9fd819 refactor(kea): centralize service account lookup 2026-07-25 01:26:45 -03:00
Vinícius Ferrão 5c3bb1d9fa test(dhcp): cover Kea control socket paths 2026-07-25 01:26:45 -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 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
Vinícius Ferrão 25c9fb3836 test(nodech): cover comma-delimited group updates 2026-07-24 13:07:17 -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 4652a023c1 Merge pull request #7606 from VersatusHPC/refactor/dbobjutils-only-if-matcher
refactor(dbobjutils): reuse only-if matcher for table routing
2026-07-24 12:24:19 -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 0d97006e1d Merge pull request #7618 from VersatusHPC/harvest/formatnetmask-undef-guard
fix(NetworkUtils): guard formatNetmask against an undefined mask
2026-07-24 12:06:58 -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 873d547781 Merge pull request #7634 from VersatusHPC/harvest/rcons-resolve-conserver
fix(rcons): resolve a conserver hostname before the local-address check
2026-07-24 12:04:15 -03:00
Daniel Hilst bee8c529ea Merge pull request #7602 from VersatusHPC/fix/dhcp-ubuntu-backend-release
fix(dhcp): use complete Ubuntu release for backend selection
2026-07-24 11:24:18 -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 dd38f9f681 Merge pull request #7639 from VersatusHPC/harvest/tcons-modern-tmux
fix(tcons): make tcons work with modern tmux
2026-07-23 20:32:34 -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
Vinícius Ferrão 3f08bf7f72 Merge pull request #7662 from VersatusHPC/fix/backport-no-target-failure
fix(ci): keep no-op backport runs green
2026-07-23 19:55:08 -03:00
Vinícius Ferrão 6235290a89 fix(ci): keep no-op backport runs green 2026-07-23 19:13:26 -03:00
Vinícius Ferrão 90bc913f2b Merge pull request #7661 from VersatusHPC/ci/automatic-backports 2026-07-23 18:24:41 -03:00
Vinícius Ferrão b88d1d72f7 ci: automate conflict-free backport merges 2026-07-23 18:02:18 -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 5bfbc8edf6 Merge pull request #7627 from VersatusHPC/fix/ddns-net-dns-version-comparison
refactor(ddns): centralize Net::DNS version policy
2026-07-23 17:44:30 -03:00
Vinícius Ferrão c1e0452da8 Merge pull request #7656 from VersatusHPC/harvest/bmcsetup-sr635-sr655
fix(bmcsetup): enable BMC setup for Lenovo SR635/SR655
2026-07-23 17:41:51 -03:00
Vinícius Ferrão f05d0cd672 Merge pull request #7648 from VersatusHPC/harvest/drop-elilo-xcat-requires
build(spec): drop the mandatory elilo-xcat dependency
2026-07-23 17:21:43 -03:00
Vinícius Ferrão f4965f5aac Merge pull request #7645 from VersatusHPC/harvest/dhcp-uefi-arch-0007
fix(dhcp): serve the UEFI boot loader for client architecture 00:07
2026-07-23 17:15:34 -03:00
Vinícius Ferrão 34241f680f Merge pull request #7633 from VersatusHPC/harvest/ddns-routed-local-address
fix(ddns): recognize a routed local nameserver address
2026-07-23 17:10:16 -03:00
Daniel Hilst 437a17a6a1 Merge pull request #7620 from VersatusHPC/harvest/genesis-ethtool-wait-guard
fix(genesis): stop ethtool link-wait loops from spinning forever
2026-07-23 17:00:13 -03:00
Vinícius Ferrão 80f9233e92 Merge pull request #7650 from VersatusHPC/fix/ci-unit-tests
fix(xcat-core): run every *.t test in the GitHub CI
2026-07-23 16:44:59 -03:00
Vinícius Ferrão 6dbc16c216 fix(bmcsetup): enable BMC setup for Lenovo SR635/SR655
The original Lenovo SR635/SR655 (IPMI manufacturer 19046, product 1287) use an
AMI "TSM" BMC reached over a LAN-over-USB interface, which needs OEM raw commands
to bring the interface up, select the LAN channel, and restart TSM networking
once configured. Add a dedicated vendor branch for it -- gated on the same
IPMIMFG/XPROD check the script already uses for IBM, Dell, Supermicro, OpenPOWER
and other Lenovo machines -- plus a udev rule and helper that bring up the USB
NIC (169.254.0.120) so in-band ipmitool can reach the TSM. The user-slot
auto-scan is skipped for these machines, which use a fixed slot.

Everything is behind IPMIMFG=19046 && XPROD=1287 (or the 046b:ffb0 USB device),
so no other BMC is affected.

Recovered from the unmerged lenovobuild branch (922dfe18, 42357f9d, 02da8a6b,
765e2ad3, 408cf2b3), adapted to master's bmcsetup structure. The global MD5 LAN
auth removal that rode along in 42357f9d is intentionally left out -- SR635/SR655
IPMI authentication is already handled in master by #7586 (retry cipher suite 3
on a zero RAKP2 HMAC), so dropping MD5 for all BMCs is neither needed nor wanted
here.

Not lab-validated: this targets the original SR635/SR655 (product 1287); no such
machine was available to test (an SR635 V3 reports product 1601 and uses a
different, directly-reachable BMC). The code is gated so it cannot affect other
hardware.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-23 16:43:41 -03:00
Vinícius Ferrão 1fdf67928d Merge pull request #7624 from VersatusHPC/harvest/genesis-sleep20-ppc64-only 2026-07-23 16:02:30 -03:00
Vinícius Ferrão 856e964e4e Merge pull request #7621 from VersatusHPC/harvest/logrotate-perms 2026-07-23 16:02:14 -03:00
Daniel Hilst 7cf3a28f1f Merge pull request #7625 from VersatusHPC/harvest/netboot-https-rootfs
fix(netboot): allow the rootfs image to be downloaded over HTTPS
2026-07-23 15:47:31 -03:00
Vinícius Ferrão 6207549cde Merge pull request #7651 from VersatusHPC/fix/ddns-servfail-retry
fix(ddns): retry makedns/nsupdate on transient SERVFAIL
2026-07-23 15:04:24 -03:00
Daniel Hilst 53e2b0bd7b fix(xcat-core): allow naming cases whose output survives a pass
run_fast_regression_test() prints a case's output only when it fails.
For 250 cases that is the right default, but it leaves no way to tell
whether a passing case did real work or skipped everything. That is not
academic for cases wrapping prove: prove exits 0 both when tests pass
and when every test skips, so integration_tests reports green either
way and the log cannot distinguish them.

Add @verbose_cases. A case named there has its output printed on a pass
as well, and the failure branch no longer prints a second copy. Seed it
with integration_tests to find out which of the three integration tests
actually run on a runner -- in particular whether
dhcp_kea_config_validation.t validates from /etc/kea now that the case
runs as root, or still skips. Emptying the list restores the previous
behaviour exactly.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 12:12:12 -03:00
Daniel Hilst 764e667e0a fix(xcat-core): assert the integration case actually ran its tests
The case gated only on rc==0, but prove exits 0 both when tests pass and
when every test skips, so the case could report green having run nothing
at all. That is not hypothetical: all three tests carry environment
guards, and on the pull request run the harness discards a passing
case's output, so there was no way to tell from the log whether anything
had executed.

Add check:output=~Files=3, which proves prove found all three files. It
still tolerates a legitimate skip on a node without Kea, and it catches
a packaging regression or a rename. A missing directory was already
caught, since prove -r on a nonexistent path exits 2.

The count has to be maintained by hand when tests are added here, which
the README now says.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 11:47:15 -03:00
Daniel Hilst 9dd025bf05 fix(ddns): retry transient DNS-update rejections and fail on persistent ones
ddns.pm's DNS-update send has a 3-try retry loop, but it only retried on
NOTAUTH and -- on the final attempt -- the `next` fell out of the loop without
reporting failure. makedns then printed "Completed updating DNS records." and
"DNS setup is completed" even when the update was never accepted.

Two problems this causes:
- SERVFAIL was never retried. named routinely replies SERVFAIL transiently
  right after a zone (re)load, before the zone is ready to accept dynamic
  updates; the update succeeds a second or two later. This reliably breaks real
  flat-cluster provisioning on el9/el10, where the test case's makedns -n runs
  right after named reloads the zone with the new compute node.
- A persistent NOTAUTH/SERVFAIL (retries exhausted) was silently swallowed and
  reported as success, so a genuinely failed DNS update looked like it worked.

Extract the batch send into send_ddns_update(), which retries NOTAUTH and
SERVFAIL (pausing on SERVFAIL), returns 0 only on NOERROR, and otherwise emits
the error and returns 1. Both batch-send sites now `return 1 if
send_ddns_update(...)`, so a real failure aborts add_or_delete_records instead
of falsely reporting success.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 11:34:50 -03:00
Daniel Hilst de17401338 fix(xcat-core): run the integration testcase on pull requests too
The integration testcase was added without the ci_test label on the
grounds that the pull request workflow has no management node. That was
wrong: github_action_xcat_test.pl builds xCAT, installs it, runs
setup-local-client.sh and chtab, and leaves xcatd running, which makes
the runner a single node management node. Running the ci_test cases
against it is exactly what the fast regression stage already does.

Label the case ci_test so the integration tests get pull request
coverage as well. This also unlocks a test that had been skipping for a
fixable reason: each case is invoked through sudo, and
dhcp_kea_config_validation.t skips only because /etc/kea is not writable
by the unprivileged runner user, so as root it validates instead of
skipping.

Running the integration suite as root and the unit suite unprivileged is
the right way round. Integration tests legitimately need to write to
places like /etc/kea, whereas running the unit tests as root would let
permission-related assertions pass for the wrong reason.

Correct both READMEs, which carried the mistaken claim that the
integration tests do not run in CI.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 11:11:31 -03:00
Daniel Hilst 6ab9aca0b7 fix(xcat-core): split the source-only unit tests from the MN integration tests
Three of the files under xCAT-test/unit are not unit tests. They need an
installed management node rather than a checkout: copycds_packages_integrity.t
wants an /install populated by a real copycds, dhcp_kea_config_validation.t
wants a kea-dhcp4 binary that can read the config it generates, and
dhcp_kea_control_agent_smoke.t wants live kea-dhcp4 and kea-ctrl-agent
daemons running as root.

On a GitHub runner none of that exists, so all three plan skip_all. They were
the only three files skipping in the pull request run, which is not a
coincidence -- the skip is the symptom of them being filed in the wrong place.
A skipped test reports neither pass nor fail, so leaving them mixed in with
the unit tests trains the reader to scroll past skips in a directory where a
skip should mean something is wrong.

Move them to xCAT-test/integration, ship that directory alongside unit in
both the rpm and the deb, and drive it from a new xcattest testcase that
proves the installed copy on an MN. The case is deliberately not labelled
ci_test: the pull request workflow has no management node and must not pick
it up. check:rc==0 is the right gate for it -- prove exits non-zero on a real
failure, exits 0 when a test legitimately skips on a node without Kea, and
exits 2 if the directory is missing entirely, so a packaging regression still
fails the case.

Add a README.md to each directory recording which side of the line a new test
belongs on and how each suite is run.

xCAT-test/unit is now 44 files and 802 assertions with no skips at all; the
assertion count is unchanged, confirming the three moved files were
contributing nothing but skips.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 11:06:10 -03:00
Daniel Hilst 63505793db fix(xcat-core): keep a source tree for the unit tests to run against
The unit test stage failed on the first CI run with

    Cannot detect source of 'xCAT-test/unit/*.t'
    Files=0, Tests=0
    Result: NOTESTS

the glob reached prove unexpanded because it matched nothing. The source
tree is gone by the time the tests run: build-ubunturepo sets

    local_core_repo_path="$curdir/../../xcat-core"

and rm -rf's it before creating the apt repository there. GitHub checks
out into work/<repo>/<repo>, so for /home/runner/work/xcat-core/xcat-core
that path resolves to the checkout's own parent and the build wipes the
checkout, leaving an empty directory of the same name behind. The cd
still succeeds, which is why prove was handed a literal glob rather than
failing outright. This is also why every testcase that predates this
change proves /opt/xcat/share/xcat/tools/autotest/unit: after the build
the installed copy is the only one left.

Copy the checkout aside in preserve_source_tree() before the build and
prove that copy, so FindBin still resolves to a real source tree. Switch
to `prove -r xCAT-test/unit` as well, so a missing directory fails loudly
instead of silently degrading to a no-op the way an unmatched glob does.

Reproduced and verified by replaying the build under GitHub's directory
layout: the checkout drops to 0 test files, the preserved copy keeps all
47 and proves clean.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 10:00:19 -03:00