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

118 Commits

Author SHA1 Message Date
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
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 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
Daniel Hilst 2ae9abbaf8 Merge pull request #7936 from VersatusHPC/refactor/r26-genesis-reuse
refactor(genesis): share runtime helpers and build policy
2026-10-14 11:47:15 -03:00
Daniel Hilst 82a658ff23 Merge pull request #7917 from VersatusHPC/test/r26-package-artifacts
test(packaging): exercise package and repository behavior
2026-10-14 11:44:03 -03:00
Vinícius Ferrão eaf95fb5bd test(genesis): exercise newt dialog navigation 2026-10-13 22:16:50 -03:00
Vinícius Ferrão 1cf06e4f70 test(ci): keep package and unit results independent 2026-10-13 11:39:40 -03:00
Vinícius Ferrão dbbdcddcb2 test(packaging): query resolved RPM dependencies 2026-10-13 11:38:11 -03:00
Vinícius Ferrão e7c7babce0 test(build): exercise release repository finalization 2026-10-13 11:38:10 -03:00
Vinícius Ferrão aebc350e1a test(probe): exercise the built RPM payload 2026-10-13 11:38:10 -03:00
Vinícius Ferrão 2d751ac847 test(el10): exercise media and RPM package policy 2026-10-13 11:38:09 -03:00