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

27151 Commits

Author SHA1 Message Date
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
Daniel Hilst a0d2322b71 fix(xcat-core): run every xCAT-test unit test in the GitHub CI
The 47 test files under xCAT-test/unit/ were shipped but almost never
executed on a pull request. Only three hand-written xcattest cases
reached them -- dhcp_unit, ipmi_unit and xcatprobe_unit -- and each
proved a single glob against the installed copy, so the majority of the
suite had never run at all. Real drift went unnoticed as a result:
ubuntu_subiquity_template.t still asserted the pre-86e77bcd7 shape of
compute.subiquity.tmpl and failed against the current template.

Run `prove xCAT-test/unit/*.t` directly from github_action_xcat_test.pl.
The tests resolve xCAT modules and fixture files relative to the repo
root through FindBin, so they must be proved from the checkout and not
from /opt/xcat/share/xcat/tools/autotest/unit; install_xcat() chdir's
away, hence the getcwd() captured up front. The step runs after the
install because the suite needs the perl dependencies xCAT pulls in
(Net::DNS, XML::Simple) and a usable xCAT database.

Drop the three prove testcases so their tests do not run twice, and
refresh the two stale ubuntu_subiquity_template.t assertions: the
identity section is now intentional (86e77bcd7) and the MAC
normalization gained cut filters ahead of the tr (c6e38483f), which the
loosened regex plus a new assertion for the suffix stripping now cover.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 09:14:03 -03:00
Daniel Hilst cf44f51463 Merge pull request #7616 from VersatusHPC/harvest/xcat-server-perl-deps
fix(xCAT-server): declare Perl deps used only by xCAT-server code
2026-07-21 16:07:38 -03:00
Vinícius Ferrão 3825677ad4 fix(xCAT-server): declare Perl deps used only by xCAT-server code
xCAT-server.spec sets "AutoReqProv: no", so RPM does not auto-generate
dependencies from the Perl modules this package ships. Modules that are
loaded (compile-time "use") only by xCAT-server code are therefore neither
auto-required here nor pulled in transitively by perl-xCAT (which does have
AutoReqProv on and already covers SNMP, Expect, JSON, Net::Ping, Time::HiRes
and Text::Balanced). On a host without them the package installs cleanly and
the affected subcommands then fail at load time with "Can't locate <M>.pm".

Add the five that are genuinely uncovered, each a compile-time "use" in a
module shipped by xCAT-server and used nowhere in perl-xCAT:

  perl-Net-Telnet       xCAT/SSHInteract.pm        (telnet switch/console)
  perl-Net-DNS          plugins/activedirectory.pm
  perl-Crypt-CBC        xCAT/IPMI.pm               (IPMI 2.0 RMCP+ crypto)
  perl-Crypt-Rijndael   xCAT/IPMI.pm               (IPMI 2.0 RMCP+ crypto)
  perl-DB_File          Confluent/Client.pm

The Crypt::CBC / Crypt::Rijndael gap is the notable one: IPMI.pm fails to
load without them, disabling all IPMI-based hardware control on a host where
those modules are absent.

Recovered from the unmerged lenovobuild branch (Jarrod Johnson; originals
807d30d3, c2e22f6f, 792e41727), reduced to the subset that master's current
packaging does not already satisfy.

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
2026-07-21 14:26:17 -03:00
Vinícius Ferrão fc1d191051 Merge pull request #7612 from VersatusHPC/fix/go-xcat
fix(xcat-core): stop go-xcat aborting the install on obsolete/missing…
2026-07-20 13:24:13 -03:00
Daniel Hilst 1b5938969c fix(xcat-core): stop go-xcat aborting the install on obsolete/missing packages
go-xcat's install list still named yaboot-xcat, which was obsoleted in the
xcat-dep 2.18 rebuild and is no longer published. It also lists the cross-arch
ppc64 genesis packages, which the arch-split 2.18 dep repo no longer places in
the x86_64 view an x86 management node reads. Because EL dnf is strict by
default, any one of these unresolvable names aborts the entire `dnf install`
transaction, so `go-xcat install` fails outright on EL9/EL10 even though every
package the node actually needs is available.

Drop yaboot-xcat from the install list (kept in the uninstall list so existing
installs are still cleaned up) and pass `dnf --setopt=strict=0` so a package
missing from the enabled repository is warned and skipped instead of failing
the whole install. The existing post-install smoke test still catches a
genuinely broken install.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-20 12:14:10 -03:00
Vinícius Ferrão 9b2c3e88ce Merge pull request #6793 from gurevichmark/secure_of
feat: Secured OF prompt
2026-07-20 12:09:35 -03:00
Vinícius Ferrão 17602e44e8 Merge pull request #7608 from VersatusHPC/ci/backport-action
ci: automate backports to release branches
2026-07-19 16:35:09 -03:00
Vinícius Ferrão 2a9413c0e4 Merge pull request #7607 from VersatusHPC/chore/master-version-2.19.0
chore(release): bump master version to 2.19.0
2026-07-19 16:34:54 -03:00
Vinícius Ferrão 5e26e50408 ci: automate backports to release branches
Label a PR 'backport <branch>' (e.g. 'backport 2.18') and, once it
merges, this workflow cherry-picks the PR's commits onto that branch
and opens the backport PR automatically. Labeling an already-merged
PR triggers it retroactively. On cherry-pick conflict the action
comments on the original PR so the backport can be done by hand.
2026-07-19 13:35:17 -03:00
Vinícius Ferrão 0f892a53c5 chore(release): bump master version to 2.19.0
Master is the 2.19 development line: it already carries 2.19-bound
features (statelite NFS root mount options, DHCP OMAPI HMAC-SHA256
defaults for new sites, the xcat-release package). 2.18.x maintenance
releases are cut from the 2.18 branch, and 2.18.1 has already been
published to the EL yum repos, so builds from master must not label
themselves 2.18.x.
2026-07-19 13:35:17 -03:00
Vinícius Ferrão 9bce48169e Merge pull request #7603 from VersatusHPC/refactor/dhcp-shared-version-comparison
refactor(dhcp): reuse shared version comparison
2026-07-18 15:59:27 -03:00
Vinícius Ferrão 0ddc19e74b test(dhcp): cover shared version comparison 2026-07-18 01:48:05 -03:00
Vinícius Ferrão 5467c1aef9 refactor(dhcp): reuse shared version comparison 2026-07-18 01:46:55 -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
Vinícius Ferrão 4d75fd5461 test(statelite): stabilize NFS root options validation 2026-07-17 21:55:48 -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 95144c2685 docs(osimage): document NFS root options attribute 2026-07-17 21:31:01 -03:00
Vinícius Ferrão b6993e2d63 test(statelite): cover NFS root options in provisioning 2026-07-17 20:38:23 -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 185af5a3aa test(packaging): verify systemd omits SysV init script 2026-07-17 20:24:17 -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
Vinícius Ferrão cd799cd0e6 Merge pull request #7597 from VersatusHPC/feat/omapi-sha256-default
feat: use HMAC-SHA256 by default on new EL and Ubuntu sites
2026-07-17 18:23:33 -03:00
Vinícius Ferrão bca1f4ba9e Merge pull request #7599 from xcat2/fix/issue-7093-xcatprobe-ss
fix(xcatprobe): prefer ss for listener checks
2026-07-17 18:18:40 -03:00
Vinícius Ferrão c362904e0d docs(dhcp): clarify legacy OMAPI FIPS limits
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 16:09:05 -03:00
Vinícius Ferrão 983ff507d8 test(ddns): run OMAPI policy checks in CI
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 16:08:47 -03:00
Vinícius Ferrão 52e2f2b332 refactor(dhcp): reuse shared version comparison
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 16:07:58 -03:00
Vinícius Ferrão c41b51a1d9 Merge pull request #7584 from VersatusHPC/feat/xcat-release-rpm
feat: add xCAT-release package for DNF systems
2026-07-17 15:32:11 -03:00
Vinícius Ferrão 99d76dae6c fix: capitalize xCAT
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 15:09:09 -03:00
Vinícius Ferrão c135abe679 test(xcatprobe): run listener checks in CI 2026-07-17 14:33:22 -03:00
Vinícius Ferrão 6d59e60331 build(xcatprobe): declare listener tool dependency 2026-07-17 14:32:16 -03:00
Vinícius Ferrão 73b9368ff3 fix(xcatprobe): report listener inspection errors 2026-07-17 14:31:01 -03:00
Daniel Hilst 7543ac6726 Merge pull request #7601 from VersatusHPC/fix/7235-sles-installer-ssh-docs
docs(sles): clarify installer SSH password
2026-07-17 13:31:12 -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
Daniel Hilst 43eb7c7c6b Merge pull request #7587 from VersatusHPC/fix/issue-7399-cuda-samples-docs
docs: fix CUDA Samples verification
2026-07-17 13:12:12 -03:00
Vinícius Ferrão ea490e9d48 fix(packaging): create release alias after signing
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 12:32:59 -03:00
Vinícius Ferrão daddfe0fb9 fix(packaging): verify xCAT repository metadata
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 12:32:25 -03:00
Vinícius Ferrão d6ee28fa11 feat(packaging): add xcat-release repository package
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-07-17 12:32:25 -03:00
Vinícius Ferrão 0a6f4506f1 Merge pull request #7585 from VersatusHPC/fix/xcat-profile-errexit
fix(xcat-client): make profile probe safe under errexit
2026-07-17 12:23:52 -03:00
Vinícius Ferrão b46d28ae1d test(xcatprobe): cover command output capture 2026-07-17 10:42:02 -03:00
Vinícius Ferrão 78717cc93b Merge pull request #7600 from VersatusHPC/fix/github-ci 2026-07-17 10:16:51 -03:00
Vinícius Ferrão 7e7332d521 docs(sles): clarify installer SSH password
Fixes #7235
2026-07-17 02:03:19 -03:00
Daniel Hilst f9717ea8da CI: install build-essential so xcat-core debs build on noble
On the ubuntu-24.04 runner, dpkg-buildpackage aborted every xcat-core
package with 'Unmet build dependencies: build-essential:native', so zero
debs were produced, reprepro created no dists/noble, and 'apt-get update'
against the local file: repo failed with 'dists/noble/.../Packages File
not found' -> install_xcat failed. Add build-essential to the workflow
dependency install so the local package repo is actually built.
2026-07-16 23:32:24 -03:00
Daniel Hilst 83323504a6 Fix GitHub CI: use noble image + latest/noble xcat-dep
The xcat-dep APT repo now publishes only the noble (24.04) codename at
.../apt/latest/xcat-dep; the bionic/devel dist no longer exists, so
install_xcat failed on apt-get update/install. Run the workflow on
ubuntu-24.04 and point the apt source at latest/xcat-dep noble main.

Drop the apt-key step: apt-key is removed on Ubuntu 24.04 and the legacy
apt.key is gone from the xcat-dep dir; the repo already installs via
allow-insecure-repositories/allow-unauthenticated.
2026-07-16 22:37:49 -03:00
Vinícius Ferrão b4ce09e132 test(xcatprobe): cover TCP listener detection 2026-07-16 21:31:08 -03:00
Vinícius Ferrão 888f5360b8 fix(xcatprobe): prefer ss for listener checks 2026-07-16 21:31:08 -03:00
Vinícius Ferrão 3f7619903c test(dhcp): isolate OMAPI policy fixtures 2026-07-16 18:43:56 -03:00