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

265 Commits

Author SHA1 Message Date
Daniel Hilst cec69be3d2 test(xcat-core): no case measures SELinux on a service node or a statelite node
The selinux cases cover the management node and a compute node. A
hierarchical cluster has a service node, which installs xCAT itself and
serves /install and /tftpboot to its own nodes, and nothing measured it
under SELinux. A statelite node was not measured either, although
node_modes resolves it to disabled on purpose.

selinux_sn_enforcing reads the provisioned service node: getenforce,
the kernel command line, the xcat policy module, the labels of /install,
/tftpboot, /opt/xcat and /xcatpost, a restorecon dry run that must find
nothing to relabel, xcatd active, and no xCAT denial since boot.

selinux_sn_per_node_switch sets noderes.selinux on the service node and
reads the mode out of the kickstart that nodeset writes for it, in all
three directions, and checks that a value on the compute node does not
reach the service node.

selinux_cn_statelite_disabled_by_design asks for enforcing on a
statelite node and requires selinux=0 on its boot configuration, with
nodeset saying why.

selinux_bundle.t now keeps a service-node case out of the
management-node bundle, the same way it keeps a compute-node case out.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:48:23 -03:00
Daniel Hilst 900ed7d484 fix(xcat-test): no bundle names the client-domain SELinux case
selinux_bundle.t fails on this branch: selinux_client_domain is in no
bundle, so no run selects it. The case measures that an xCAT client
command execs and transitions into xcat_t, which is the check that a
client cannot run at all under enforcing.

Name it in selinux.bundle and selinux_mn.bundle. It needs no compute
node, so it belongs in both.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:37:26 -03:00
Daniel Hilst 7190ea979e test(xcat-core): no case runs the xcatmn probe
No case in xCAT-test/autotest/testcase runs xcatprobe xcatmn, so a broken MN
check reaches a release unseen. The new case runs the probe and asserts that
the SELinux checkpoint appears and does not carry the FAIL marker.

The case cannot reach the enforcing mode. A management node under test runs
with SELinux disabled, and a disabled node needs a reboot and a relabel to
become enforcing. probe_utils_selinux.t covers the enforcing verdict.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:36:27 -03:00
Daniel Hilst 89dee4de1e fix(xcat-core): the SELinux AVC checks assert no denial of any kind
Eight checks in the selinux testcases asserted ausearch output =~ "<no
matches>", which is zero denials of any kind in the window. A cluster
denies things xCAT has nothing to do with. On an idle enforcing
management node httpd asks the kernel for net_admin on itself every ten
seconds, and the base policy carries no dontaudit rule for that shape.
One node logged 1034 denials in a day, 817 of them that one shape. So
the assertion cannot pass once ausearch is called correctly, and before
--input-logs was added it could not fail.

selinux_avc_check.sh keeps the denials whose subject program or object
path belongs to xCAT and counts those. The cases assert XCAT_AVC=0.
selinux_mn_labels now also plants a denial on purpose: it mislabels
/install/postscripts/xcatdsklspost, shows httpd answering 403, and
requires the check to report XCAT_AVC=[1-9] before restoring the label.
A counting method with no positive control cannot be trusted to find
anything.

restorecon -RnvF reports a difference in the SELinux user as well as the
type, and the files xCAT writes carry unconfined_u. On one node -RnvF
printed 12 lines over /install where -Rnv printed 2. The checks use
-Rnv, which is the type they assert.

The six cases were in no bundle and in no pipeline conf, so none had
ever run, which is why the dead checks were not noticed.
selinux.bundle and selinux_mn.bundle name them, and selinux_bundle.t
fails when a case is in no bundle.

Tests: selinux_avc_check.bats drives the classifier with records
measured on an enforcing management node. Replacing the filter with one
that keeps every record fails 4 of its 8 checks; dropping the
object-path branch fails 2. selinux_bundle.t fails when selinux.bundle
is removed. selinux_kickstart_template.t asserted the relabel order with
a regex that matched wherever the relabel sat; it now compares line
positions, and moving #SELINUXRELABEL# above the xCAT post includes
fails it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:34:36 -03:00
Vinícius Ferrão f8267cb8f3 test(httpd): cover package activation across distros 2026-07-27 17:19:27 -03:00
Daniel Hilst 0c3c44f28b fix(buildrpms): stage xCAT-probe helper modules before target builds
xcatprobe subcommands (xcatmn, discovery, osdeploy) and hierarchy.pm load
xCAT:: perl modules but only add $XCATROOT/probe/lib/perl to @INC, not the
main $XCATROOT/lib/perl where perl-xCAT ships them. The RPM builder stopped
embedding those helpers, so /opt/xcat/probe/lib/perl/xCAT/ was absent on
installed systems and the subcommands were reported "Unsupported sub command".

Stage GlobalDef.pm, NetworkUtils.pm and ServiceNodeUtils.pm into a temporary
xCAT-probe tree and build its source tarball once, before the parallel target
builds fork, so workers only read a complete archive. Add package-payload
regression tests. Adopts the approach from upstream PR #7581.

The remaining buildrpms.pl changes are deployment-compliance refactoring
(signed, self-contained core repo output).

Closes #7579

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-09 21:25:05 -03:00
Daniel Hilst 638f0d75c4 Fix xCAT 2.18 EL10 x86_64 package build issues
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-20 18:48:14 -03:00
Vinícius Ferrão 4165b26a04 fix: remove Docker container lifecycle management (dead code since 2016)
Docker container lifecycle management (mgt=docker, mkdocker, rmdocker,
lsdocker) was added in 2015-2016 as an experiment targeting Docker API
v1.22 on Ubuntu only. Documentation and man pages were deliberately
removed in 2019 (PRs #6222 and #6324) with the original developer's
approval, noting that "the interface of Docker has become very simple
right now, so there is no value for xCAT to offer such functions."

The plugin was still being shipped but has had no functional code changes
since April 2016, was never listed as a valid mgt value in Schema.pm,
and no user ever filed an issue about it.

Removed:
- xCAT-server/lib/xcat/plugins/docker.pm (1,142 lines)
- xCAT/postscripts/setupdockerhost
- xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh
- xCAT-test/autotest/testcase/dockercommand/ (test cases)
- Docker attribute definitions in Schema.pm
- Client symlinks (mkdocker, rmdocker, lsdocker)
- Usage entries and dockerhost cert handling in credentials.pm
- Docker attribute documentation in man7 pages

The "Running xCAT in Docker" documentation (dockerized_xcat/) is
retained as it documents containerizing xCAT itself, not the removed
mgt=docker feature.

Closes #7518
2026-05-03 12:11:33 -03:00
Mark Gurevich f9f79cbd72 Add restapi testcase to reset attribute 2023-03-13 15:00:03 -04:00
Mark Gurevich 1172e462bc Debug RHEL8.6 modules testcase 2023-01-17 10:49:12 -05:00
Mark Gurevich 2ca90e4464 Split RHEL weekly bundles 2022-12-01 17:21:14 -05:00
besawn 56a1403ad3 Merge pull request #7241 from gurevichmark/RH_module_support
Support module installation on RHEL8
2022-11-15 13:17:47 -05:00
Mark Gurevich fc168cc9b8 Test lzma compression for genesis network boot 2022-11-08 14:46:00 -05:00
peterwywong 1efc0f400d Revert "Provide an error message when a new node name is an existing group name" 2022-09-02 15:25:17 -07:00
Mark Gurevich c86b3977bd Add testcases to bundles 2022-08-26 14:05:20 -04:00
Mark Gurevich 9d1e473d2c Allow os: testcase tag to specify rhels version 2022-08-26 14:01:31 -04:00
Mark Gurevich f52c2aa7df Support module installation on RHEL8 2022-08-23 16:31:56 -04:00
Wai Yee Wong c51c0d00ce Provide an error message when a new node name is an existing group name 2022-04-29 16:30:19 -04:00
besawn 1eb00945b4 Remove failing makedns tests from ubuntu_ppcle_daily.bundle 2022-03-02 14:17:36 -05:00
Mark Gurevich 7e964ac5b7 Add testcase for nodeshell REST API method for non-root user 2022-01-06 15:56:47 -05:00
Mark Gurevich a6a6c1371f Add testcase for nodeshell REST API method 2022-01-06 14:32:34 -05:00
Mark Gurevich 50f5c9040d Add cleanupdiskfullxcatpost attribute to site table 2021-08-12 16:11:17 -04:00
Mark Gurevich c4dc079e7e Add makenetworks testcase to daily bundles 2021-05-04 11:49:02 -04:00
Wai Yee Wong fef3a09b65 Modify test case makentp_extntpserver_value and add it to seven daily bundles 2021-04-29 17:38:03 -04:00
Wai Yee Wong e74c6a904b Include restapi.bundle to SLES bundles 2020-10-02 08:48:33 -04:00
Wai Yee Wong 3fbf3bba03 Add REST test cases to RHEL x86 systems. 2020-09-29 12:38:37 -04:00
Wai Yee Wong e71e76d63f Move the REST bundle after updatenode test cases. 2020-09-28 17:13:58 -04:00
Wai Yee Wong 4c5cd2c52b Additional changes to the REST test cases and bundle based on Mark's comments 2020-09-24 13:54:06 -04:00
Wai Yee Wong c2876c9a1b Remove rhels_ppcle_restapi.bundle and push the new cases0 2020-09-23 16:40:06 -04:00
Wai Yee Wong ea5ec0fac7 Enhanced and updated REST test casees and bundle 2020-09-23 16:28:33 -04:00
Wai Yee Wong 9067d1ba42 Add REST test cases, a new bundle and this bundle to the ppcle daily.bundle 2020-09-22 16:38:21 -04:00
Wai Yee Wong fd6d3a4cd7 Add a separate test case to compare postscripts on MN and CN. 2020-07-28 22:58:27 -04:00
Mark Gurevich bb09d801df Enable clusterstatus xcatprobe on Perl 5.23 2020-07-08 13:59:33 -04:00
Mark Gurevich a50de858a9 Revert "Remove squashfs testcases from Ubuntu regression bundles" 2020-05-07 16:46:34 -04:00
Mark Gurevich 13e0ef144d Remove squashfs testcases from Ubuntu regression bundles 2020-05-06 17:08:30 -04:00
Mark Gurevich 4da1015c0b Add two testcases to test squashfs diskless mount 2020-04-24 10:34:10 -04:00
Mark Gurevich d459ba0e69 Add go-xcat testcases to Ubuntu daily bundles 2020-03-31 15:08:34 -04:00
Mark Gurevich 8023f6eb43 Remove migration2 also 2020-03-03 11:44:43 -05:00
Mark Gurevich ea7584d305 Remove migration1 testcase from weekly bundle 2020-03-03 11:34:11 -05:00
Mark Gurevich ce979db792 Remove installing GA version testcases from RHEL bundles 2020-02-27 13:50:30 -05:00
Mark Gurevich f29f66432a Remove installing GA version testcases from SLES bundles 2020-02-27 13:45:06 -05:00
Mark Gurevich 457c1d6ca1 Improve install script and testcases 2020-02-27 13:27:42 -05:00
Mark Gurevich 765c3ff217 Add to x86 bundles also 2020-02-26 17:18:34 -05:00
Mark Gurevich 9face2fc01 More go-xcat testcases and add to daily bundle 2020-02-26 16:00:53 -05:00
Mark Gurevich c5bdca0708 Do not run nodepurge test during TravisCI 2019-11-22 09:21:46 -05:00
Mark Gurevich e4dc9a1d0a Add testcase to daily bundles 2019-11-21 14:48:00 -05:00
Mark Gurevich f709e80cc3 New regression bundle for kits 2019-11-19 16:01:03 -05:00
Mark Gurevich efc5f54c2b Add regression test tabdump debug for service node not removed 2 2019-10-24 16:10:27 -04:00
Mark Gurevich 6ef420b28f Add more calls to run tabdump servicenode 2019-10-23 16:22:15 -04:00
Mark Gurevich 70d4be0cd0 Add regression test tabdump debug for service node not removed 2019-10-23 15:45:25 -04:00