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

138 Commits

Author SHA1 Message Date
Daniel Hilst a695723541 Merge pull request #8006 from VersatusHPC/fix/el-kickstart-pre-log
fix(install): copy the kickstart pre-install log from the installer
2026-11-07 00:54:01 -03:00
Vinícius Ferrão 568db90972 test(install): cover the kickstart pre-install log handoff
Run the rendered %post --nochroot blocks of each kickstart template
whose %pre writes /tmp/pre-install.log the way anaconda runs them: in
the installer, with its own /tmp and the installed system at
/mnt/sysimage. Each run must append the log to a new or an existing
xcat.log. The riscv64 profile test now keeps the installer's /tmp out
of the installed root too. Both fail on the old templates, whose chroot
%post reads a /tmp that does not hold the log.

Run the new test in the profile artifact job.
2026-11-06 23:10:32 -03:00
Vinícius Ferrão e1d9900b3e test(install): keep custom partition files out of the install log
Render the rhels9 and rhels10 kickstarts with no partitionfile, a custom
partitionfile and a custom partition script, each with xcatdebugmode 0,
1 and 2, and run %pre in a sandbox. The custom input holds credentials
in the =, separated, quoted, escaped and split option forms, a boot
loader password and a root password. The pre-install log must show the
generated partition scheme, or a notice for custom input, with neither a
credential nor a traced decoded byte of the custom input, and anaconda
must still get the custom partition definitions.

Run the new test in the profile artifact job.
2026-11-06 23:10:32 -03:00
Vinícius Ferrão 25793a41f0 test(netboot): hand the NetworkManager lease of the initrd to diskless roots
The stateless xcatroot of dracut_047, run in a chroot with NetworkManager
leases of the dhclient and internal clients in the initrd, must copy
both into the root under their own names. CI now runs the xcatroot test
as root.
2026-11-06 23:10:30 -03:00
Daniel Hilst e4f6b4be5d Merge pull request #8017 from VersatusHPC/test/native-shell-script-tests
test(native): run shell script tests outside the unit runner
2026-11-06 15:56:14 -03:00
Daniel Hilst bc1a419f7e Merge pull request #8007 from VersatusHPC/fix/template-missing-root-password
fix(install): stop nodeset when a template has no root password
2026-11-06 15:54:05 -03:00
Vinícius Ferrão 2aa3863881 test(probe): move the detect_dhcpd test to the native tests
The test runs both detect_dhcpd scripts with a fake tcpdump, and its
capture cases need private mount and network namespaces. It now lives in
xCAT-test/native with the other namespace tests, and the pull-request
workflow runs it in its own step. The capture cases keep their own unshare
call, because they add a default route on the loopback interface.
2026-11-03 18:08:30 -03:00
Vinícius Ferrão d4c0b34393 test(debian): run the xcatd init state test in a sandbox
The unit test ran the Debian init helpers in the host shell, with fake
ucf, update-rc.d, systemctl and mv first in the host PATH. It now runs them
with sandbox_run in xCAT-test/native, with the compatibility root apart from
the /etc of the sandbox, and the Debian package lifecycle step runs it.
2026-11-03 18:08:18 -03:00
Vinícius Ferrão 1c2a71d250 test(scriptlib): run the NetworkManager autoconnect test in a sandbox
The unit test sourced scriptlib in the host Bash, with a fake nmcli first
in the host PATH. It now runs the helper with sandbox_run in
xCAT-test/native, and the pull-request workflow runs it in its own step.
2026-11-03 18:08:11 -03:00
Vinícius Ferrão 94fb370ee4 test(ubuntu): cover partitionfile entries on Subiquity installs
Render the node's pre-install script through the Template entry point and
run its partitioning under dash. Without a partitionfile the storage config
keeps the disk getinstdisk chose. A disk file puts its first disk there,
resolved when it is a link, a disk script puts the disk it writes there,
and a layout file or layout script replaces the default storage config.
2026-11-03 17:53:19 -03:00
Vinícius Ferrão fd8e60c21e test(install): start kdump on openEuler nodes only with dump memory
The rendered compute and service %post, run in a sandbox through the
downloaded postscript, must leave the kdump.service drop-in that stateless
images get. A system without kdump.service must get none.
2026-11-02 19:55:57 -03:00
Vinícius Ferrão 7a57007465 test(netboot): start kdump on stateless nodes only with dump memory
An image with kdump.service must get the dump-memory drop-in, once, next
to any site drop-in, and an image without it must get none. systemd itself
must start kdump.service with crashkernel= or fadump= on the command line,
and skip it with neither.
2026-11-02 19:55:56 -03:00
Vinícius Ferrão 2b2c6970c6 test(install): cover templates without a root password row
The EL10 kickstart must not render without the passwd row, and must
carry the hash of the configured password when the row exists. The
Ubuntu autoinstall must still lock a password that has no row. The
first case fails with the earlier code, which rendered an empty rootpw.
2026-10-30 17:43:41 -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 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