2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 17:02:15 +00:00
Commit Graph

126 Commits

Author SHA1 Message Date
Daniel Hilst 9804168ca9 Merge upstream master into feat/ipv6
Integration test of the 51 commits that landed on upstream master after this
branch was built. Four conflicts, all from edits to the same lines:

perl-XCAT/xCAT/BootUtils.pm: both sides add a new sub at the end of the file.
Master adds expand_node_template, this branch adds grub2_kernel_commands and
grub2_image_provides. All three are kept.

xCAT/xCAT.spec and xCATsn/xCATsn.spec: master wraps the chrony and dhcpd
requirements in a suse_version test, and its %endif lands on the line this
branch uses for radvd. The requirement stays outside the test, because an
openSUSE management node writes radvd.conf too.

xCAT-server/xCAT-server.spec: master's openSUSE requirement list is a superset
of this branch's, so master's is taken whole.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-31 08:55:22 -03:00
Daniel Hilst ac0ec70821 Merge pull request #7979 from VersatusHPC/refactor/debian-profile-lookup
refactor(netboot): share profile asset selection
2026-10-29 14:58:18 -03:00
Daniel Hilst 4509c4bb5d fix(xcat-core): the ISC path got no IPv6 reverse zone, and the Kea test passed under JSON::PP
getzonesfornet in dhcp.pm rounded the prefix itself and passed the rounded value beside a
network that still carried its own. getIPv6PrefixLength prefers the embedded prefix, so the
rounded value was ignored and no reverse zone was written at all: dhcpd updated no PTR record
for a /62 or /126 network and reported nothing. The ddns.pm copy stripped the prefix first and
was unaffected, so the previous commit's claim that both copies were fixed was wrong.

The zones now come from xCAT::NetworkUtils::getIPv6ReverseZones, which both copies call. A
network whose prefix is not a multiple of 4 is covered by the zones of the next nibble -- a /62
by its four /64 zones -- which is what the IPv4 arm does with a /22. Rounding down to the /60
made xCAT answer for three networks it does not own.

kea_subnet_id_numeric.t only observes the encoding under the XS backend, and passed 6 of 6
under JSON::PP with the bug in place. It skips unless JSON->backend is the XS one, and the
workflow installs libjson-xs-perl so the backend is there.

dhcp6_boot_server now reports a substituted boot server, so an unresolvable tftpserver is not
silent, and the caller reports a warning that arrives with a server. The routine also moved
below grub2_node_loader, whose comment it had separated from it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-27 11:38:48 -03:00
Daniel Hilst dc8c5cefed fix(xcat-core): Genesis sends a DUID the reservation does not hold, and makedns aborts on a /62
Both Genesis images built a DUID-UUID from the nil SMBIOS UUID. makedhcp refuses that UUID,
because nodeimport writes it to every PowerKVM node, and reserves the hardware address instead,
so the client sent an identifier no reservation held and the node took a pool address with no
boot file. genesis-duid and doxcat now keep the DUID-LL for it, which is what Kea reads the
hardware address out of.

getzonesfornet died on an IPv6 prefix that is not a multiple of 4, which took makedns and
makedhcp with it for a /62 or a /126 network. A reverse zone is delegated on a nibble, so the
prefix is rounded down and the enclosing zone is returned. Both copies of the routine are fixed.

The test suite needs socat and jq, and five bats files skipped without them, so the workflow
installs both. Template.pm drops the unused _is_el10, credentials.pm drops a repeated import,
and two comments that recorded bug history are cut to the fact the code cannot show.

Reverting any one fix fails named assertions: 1 of 8 and 1 of 3 bats cases for the two Genesis
images, and 4 of 30 in ddns_ipv6.t, which traps the abort so the file still reports.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-27 10:20:52 -03:00
Daniel Hilst ca5587a73b Merge pull request #7976 from VersatusHPC/fix/debian-package-lifecycle
fix(debian): preserve upgrade context and skip chroot service actions
2026-10-26 14:41:46 -03:00
Daniel Hilst c768025739 Merge upstream/master into feat/selinux-netboot
Twelve conflicts, all from xcat-core/#7970 landing.

Eleven are the one sed line in the netboot postinstall profiles, where #7970 and
this branch replaced the same line with different patterns. Master's wins: it
anchors on optional leading blanks and preserves a trailing comment, which this
branch's `s/^SELINUX=.*$/SELINUX=disabled/` would have eaten. This branch's own
postinstall_selinux_config.bats asserts "the comment that names permissive keeps
its text", so the better pattern is the one its test already wanted -- 6 of 6
pass on master's version. What master's pattern does not catch is a value
outside enforcing|permissive, which nothing here tests and no stock config
ships.

The twelfth is .github/workflows/xcat_test.yml: master added a step to the
existing job and this branch adds a whole selinux_policy_test job after it.
Resolved as the union, with master's step where it put it; the file still parses
and names three jobs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 14:42:37 -03:00
Daniel Hilst f4f89c0b49 Merge pull request #7970 from VersatusHPC/fix/netboot-profile-shell-selinux
fix(netboot): correct SELinux settings and firewalld cleanup
2026-10-23 14:39:55 -03:00
Vinícius Ferrão 8866046a4b test(netboot): preserve profile asset lookup contracts
Compare Debian and shared lookup priorities through their production
entry points and real files. Exercise Debian genimage consumers in
isolated filesystems, including custom-directory precedence and
unchanged postinstall paths.
2026-10-23 01:39:54 -03:00
Daniel Hilst 576370bdf9 test(xcat-core): no case measures the documented repair of a published artifact
The SELinux page documents a recursive chcon to repair a published artifact
that carries the wrong type. No case runs that procedure, so nothing measures
what it does to the guest trees of the image root, and nothing measures whether
the repair survives a later relabel.

selinux_image_repair.t starts with default_t on every published artifact of an
image root and with valid types in both rootimg and rootimg-statelite. It runs
the repair, then reads the labels back after a recursive relabel and after a
reinstall of the module. It covers the standard publication directory and one
that site.installdir moved, because the packaged mappings name /install.

semanage writes to the policy store of the host, so the case refuses to run
where SELinux is enabled and removes every mapping it adds. restorecon is a
no-op where SELinux is disabled, so the case applies the mappings with setfiles
and asserts that the merged file_contexts answers what the store answers for
each path.

selinux_docs.t gains the checks that keep the page and the xcat.fc comment from
describing a chcon repair. 7 of its 26 checks fail on this commit.

With the chcon of the page in place of the documented procedure,
selinux_image_repair.t fails 101 of its 170 checks, 36 of them guest labels that
the recursive chcon overwrote.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 18:25:22 -03:00
Vinícius Ferrão 11e6e642c4 test(debian): cover interrupted management package transactions 2026-10-22 18:01:36 -03:00
Vinícius Ferrão b6f9294a79 test(debian): exercise service callers in proc-mounted chroots 2026-10-22 17:33:44 -03:00
Vinícius Ferrão ea4738a5ce test(syslog): verify directory setup and native log delivery
Execute the complete postscript and check the daemon UID before real UDP
log delivery. Cover fresh and repeated MN/SN setup, restricted directories,
legacy ownership and modes, and a blocked directory path. Keep the upgrade
wrapper and forwarding cases as compatibility controls.

Select older configuration branches through their version-report boundary;
use the installed daemon, without claiming old-daemon qualification.
Run the isolated native cases in CI.
2026-10-22 15:07:00 -03:00
Vinícius Ferrão 8c6ba3b2c0 test(netboot): exercise firewalld cleanup with Bash and dash
Execute each profile through /bin/sh. Check both firewalld entries as
regular files, valid links, dangling links, directories and missing paths.
Preserve unit targets, unrelated links and the older profiles without this
cleanup.
2026-10-21 18:07:22 -03:00
Vinícius Ferrão 402f398bb1 test(netboot): cover SELinux settings across postinstall profiles
Execute all affected owners and their aliases in isolated image roots. Check
policy contents and metadata, missing files, repeated runs and host
sentinels. Run the cases in Ubuntu and EL CI.
2026-10-21 18:07:11 -03:00
Daniel Hilst 141f5b62ef Merge remote-tracking branch 'upstream/master' into feat/selinux-netboot
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>

# Conflicts:
#	.github/workflows/xcat_test.yml
2026-10-21 16:51:43 -03:00
Daniel Hilst 14f0f28477 test(xcat-core): no case starts xcatd from a relocated installation
xcatd_service_direct_exec.t reads the shipped unit on a default install,
where the prefix in the unit and the prefix of the installation are the
same path. It cannot fail when they differ, which is the case the
systemd startup has to get right.

xcatd_relocated_startup.t installs the built xCAT-server package twice,
once with the default prefix and once with rpm --prefix /srv/xcat. For
each one it composes the environment the unit gives ExecStart, in the
order the unit lists Environment and EnvironmentFile, then asserts
XCATROOT, that every xCAT directory on PATH is under that prefix, and
that the daemon the start command runs receives the prefix. The
/srv/xcat subtest fails 3 of its 11 checks before the next commit; the
/opt/xcat subtest passes either way.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 16:50:32 -03:00
Daniel Hilst 21a0ad8089 Merge pull request #7962 from VersatusHPC/feat/uftp-rootimg-transport
feat(uftp): distribute stateless root images over UFTP multicast
2026-10-21 15:52:02 -03:00
Vinícius Ferrão cc603ea2c0 test(cumulus): exercise discovery key failure with Bats
Run the complete discovery postscript in the shared shell sandbox. Keep the
key-generation, exit-status and listener side-effect checks. Preserve the
dedicated CI step and its cancellation condition.
2026-10-21 14:18:21 -03:00
Vinícius Ferrão 0f2f1cfd05 test(uftp): cover the UFTP transfer listener and its package removal
The listener must send the requests for one archive with one sender. It
must refuse paths outside the image roots, archives without a checksum,
and digests that the checksum file does not list. A queued batch must
keep its archive after the next publication. The limits on
connections, queued jobs, senders, receivers and time must hold. Package
removal must stop and disable the service, and an upgrade must leave it
alone.

The unit test calls the listener subs of xCAT::UFTP in process, with a
fixed clock and a sender start that it records. native/uftp_listener.t
runs the listener script with uftp and uftp_keymgt fixtures. It covers
key creation, a read-only log directory, sender processes, shutdown and
connection limits. The pull-request workflow runs it.
2026-10-21 11:44:21 -03:00
Daniel Hilst b74a0f27aa Merge upstream/master into refactor/r26-fips-policy
Two files needed a resolution. Both are unions of independent additions.

XCAT::Test::Lifecycle::build_deb takes master's new $source argument and its
-xpf extraction, and keeps the control-$arch selection this branch adds for
xCAT-genesis-scripts. $source defaults to the repository root, so the branch
behaviour does not change.

.github/workflows/xcat_test.yml keeps master's profile_package_payload.t on
both lifecycle prove lines and master's Perl module list, and keeps this
branch's FIPS steps, bzip2 and openssl.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:32:47 -03:00
Daniel Hilst 3a7c1d66a8 Merge master into feat/selinux-netboot
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 08:53:16 -03:00
Daniel Hilst 47168d7adf Merge pull request #7934 from VersatusHPC/refactor/r26-provisioning-reuse
refactor(provisioning): share package defaults and identical profiles
2026-10-21 08:21:57 -03:00
Vinícius Ferrão 8dab5e4989 test(genesis): exercise maintenance shell confirmation and return 2026-10-20 13:09:32 -03:00
Daniel Hilst 37a25b0fbc Merge master into feat/selinux-netboot
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-19 16:11:59 -03:00
Vinícius Ferrão 4a894610a5 test(profiles): exercise packaged assets and custom profile precedence 2026-10-19 12:17:03 -03:00
Vinícius Ferrão 53dfdd2902 test(ci): run FIPS checks after earlier failures 2026-10-18 13:44:30 -03:00
Daniel Hilst b5f48f2089 Merge pull request #7956 from VersatusHPC/fix/genesis-first-journal-entry
fix(genesis): retain the first entry in the journal view
2026-10-17 18:55:12 -03:00
Vinícius Ferrão 6a8755ac13 test(fips): verify generated policy and package payloads 2026-10-17 02:57:05 -03:00
Vinícius Ferrão dc99c66f94 test(fips): run unchanged callers in isolated filesystems 2026-10-17 02:29:35 -03:00
Vinícius Ferrão 90237b951e test(genesis): cover journal cursor boundaries 2026-10-16 20:53:19 -03:00
Vinícius Ferrão b315ceaee0 test(postscripts): exercise credential replies and retries
Run the complete postscripts with controlled credential replies and native
SSH key generation. Check successful and empty replies, server errors,
retry limits, flow-control differences and password logging.
2026-10-16 20:21:42 -03:00
Daniel Hilst 558bf24138 Merge pull request #7923 from VersatusHPC/test/r26-profile-rendering
test(provisioning): exercise rendered profiles and installer commands
2026-10-16 20:19:26 -03:00
Daniel Hilst 1bde265fc4 Merge pull request #7924 from VersatusHPC/test/r26-isolated-scripts
test(provisioning): isolate disk, kdump and sudoer checks
2026-10-16 20:16:49 -03:00
Vinícius Ferrão 28b22d7825 test(provisioning): exercise disk selection with BATS
Source the unchanged selector with explicit partition and udev fixtures.
Bound awk discovery to the fixture so runner filesystem size cannot delay
selection. Keep rendered-installer coverage and independent CI failures.
2026-10-16 19:06:47 -03:00
Vinícius Ferrão 7557d00481 test(sudoer): isolate account and privilege configuration 2026-10-16 19:06:26 -03:00
Vinícius Ferrão 599cd3f32f test(kdump): execute per-node configuration in isolation 2026-10-16 19:06:26 -03:00
Vinícius Ferrão 509a60def2 test(provisioning): isolate install disk selection checks 2026-10-16 19:06:25 -03:00
Vinícius Ferrão 0b70a389a3 test(genimage): check the chroot mounts of a new RPM image
The image caller tests create the run directory in their fixture
image, so they did not see a bind mount to a missing mount point.

Run rh/genimage on a new and on an existing image directory. The mount
fixture fails like mount(8) when the mount point is missing, and the
package manager fixture records the mounts in place when the packages
install. Cover EL9 through the rh and rocky entry points, and EL6,
which does not mount /proc and /sys. The pull-request workflow runs
the test.
2026-10-16 18:45:27 -03:00
Vinícius Ferrão 1d362211e7 test(ubuntu): execute rendered Subiquity command sequences
Render Subiquity configuration with real database rows and execute the emitted commands in private namespaces. Check resulting files, failure ordering and the install-monitor handshake without rewriting shell fragments.
2026-10-16 18:33:42 -03:00
Vinícius Ferrão fdf18e24c3 test(packaging): run the generated Debian repository helper
Build a real package and repository, then execute the generated helper with representative host architectures and releases. Check its apt configuration and preserve unrelated sources.
2026-10-16 18:33:41 -03:00
Vinícius Ferrão 4c47d8b3ec test(netboot): execute selected RISC-V postinstall scripts
Run each selected postinstall script in an isolated filesystem. Check SELinux settings and fstab after repeated execution instead of comparing shell source.
2026-10-16 18:33:41 -03:00
Vinícius Ferrão 7af7b97a78 test(provisioning): execute rendered RISC-V install checks
Render the selected profiles with an isolated database. Check the installer data and run the emitted post-install blocks against a private filesystem, including the EFI fallback and missing-loader paths.

Run the native case from the source snapshot preserved before CI package builds.
2026-10-16 18:33:41 -03:00
Daniel Hilst cf170b36c4 Merge pull request #7942 from VersatusHPC/feat/rootimg-sha256
feat(netboot): check the root image against its SHA-256 checksum
2026-10-16 18:18:10 -03:00
Daniel Hilst 905c63e47c test(xcat-core): capture the image roots that restorecon relabels
xcat.fc excludes a rootimg from the /install relabel only at the default
depth, /install/netboot/<os>/<arch>/<profile>/rootimg. An osimage with
rootimgdir=/install/netboot/custom-image resolves rootimg/etc/shadow to
public_content_t, so the restorecon -R /install in %posttrans overwrites
the labels of the guest operating system.

The new native test builds xcat.pp, installs it into a private copy of the
targeted store, and asks matchpathcon for the label of each path. Then it
labels a copy of /install, relabels it with setfiles after the install and
after a reinstall of the module, and reads the labels back. The test fails
for the custom roots. The unit test no longer compares the fc lines as
text.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-16 11:16:55 -03:00
Daniel Hilst d8c38ec6d2 Merge pull request #7906 from VersatusHPC/fix/openeuler-core-mock-resultdir-owner
fix(xcat-core): the openEuler ppc64le core build runs rpmbuild as root
2026-10-15 18:15:42 -03:00
Daniel Hilst 7c011fc9e5 Merge pull request #7916 from VersatusHPC/fix/probe-debian-directory-permissions
fix(probe): preserve Debian library directory permissions
2026-10-15 13:53:54 -03:00
Daniel Hilst 5c6347d930 Merge master into fix/openeuler-core-mock-resultdir-owner
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-15 13:42:27 -03:00
Vinícius Ferrão 35d01515eb test(mknb): exercise compression and archive publication 2026-10-14 13:29:21 -03:00
Vinícius Ferrão 0cca31bd2b test(statelite): run the liteimg archive test with the native tests
The liteimg archive test runs real cpio and gzip, and puts compressor
and ctorrent fixtures in PATH. That is a native test, so it moves out
of the unit suite. The pull-request workflow runs it explicitly.

A missing Linux tool now fails the test instead of skipping it. An
ilitefile fixture replaces the runcmd override, so liteimg runs its
commands through the real runcmd.
2026-10-14 13:14:50 -03:00
Vinícius Ferrão 957c52fe53 test(probe): exercise Debian package permissions 2026-10-14 12:38:00 -03:00