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.
genimage must dispatch an openeuler24.03sp3 riscv64 image to the native
openEuler builder. packimage must pack it, and still refuse it as a
StateLite image.
python3-scapy was the only Depends of xcat-test that pulled in
python3. With scapy moved to Recommends, apt-get install
--no-install-recommends xcat-test can leave python3 absent, and every
blackboxtest command fails before it starts, not only the DHCP steps.
Add python3 to Depends. xcat_test_scapy_optional.t checks that python3
is a hard Depends, and fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With nodeauthentication off and no peer name, getpostscript used
_xcat_authname as the client identity and expanded it with noderange.
becomeuser and tokens set _xcat_authname to an account name, so a user
named after a node group received the postscripts of the first node in
that group.
xcatd now records the CN of the validated client certificate as
_xcat_certname, and only while no becomeuser or token replaced it. It
deletes any _xcat_certname the client sent. getpostscript uses that
name only when it names exactly one node, with no group or range
expansion. _xcat_authname is no longer a candidate.
getpostscript_client_identity.t drives the plugin with these requests.
On the previous head the group and node login checks fail, and
dropping the exact match fails the group and range checks.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With the install dependencies resolved, xCAT installs on the leap15.6 node and
the install gate still fails:
[install] GATE: xcatd running + reachable with NO xcatconfig
GATE FAIL: xcatd not active
GATE FAIL: lsdef cannot reach xcatd
GATE FAIL: site.xcatdport not seeded
journalctl for xcatd has no entries at all, and loading the library by hand on
the node says why:
Can't locate JSON.pm in @INC ... (@INC contains: /opt/xcat/lib/perl ...)
openSUSE has no perl-generators, so no perl(...) requirement is generated for
any xCAT package and nothing installs the modules the code loads. Measured on
xcat20-mn against the 85 external modules the EL build auto-requires: five are
absent -- Date::Parse, Expect, HTML::Form, JSON and SNMP -- and the other 80
are present.
The test names, per spec, the modules that package's openSUSE branch must ask
for, mirroring what EL's generator emits for it. Nine assertions fail because
no spec names them yet.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT::Test::OS::current_os returns undef on openSUSE. /etc/os-release carries
ID="opensuse-leap" and the word sles appears nowhere in it, so the os-release
arm falls through to its own return undef, and Leap ships none of
/etc/redhat-release, /etc/lsb-release or /etc/SuSE-release to reach another arm.
xcattest then warns "Use of uninitialized value $currentos" four times per case
and rejects all of them: "Test case reg_linux_diskfull_installation_flat has an
invalid OS option - Linux" and "There is no valid case to run". 328 of the
shipped cases declare os:Linux, so an openSUSE management node runs none of
them. The message blames the case, and the cases are skipped rather than
failed, which reports no result at all.
Measured 2026-10-24 on xcat20-mn, an openSUSE Leap 15.6 management node:
current_os answered UNDEF, /etc/os-release holds ID="opensuse-leap" and
VERSION_ID="15.6", and none of the three fallback files exist.
Five assertions fail on this commit: Leap is recognised, at any Leap version,
the older ID="opensuse" spelling, Tumbleweed, and a Leap node matching an
os:Linux case. The fourteen that already existed pass, including the one that
holds the change down -- a distribution whose os-release names neither sles nor
openSUSE is still not recognised.
The same bug was fixed on 2026-09-18 in f7be54a1b, against the chain of greps
xcattest carried before xCAT::Test::OS existed. That branch was never merged,
3582c6ab1 rewrote the routine as a module without it, and its test lifted the
routine out of xcattest with a regex. This test loads the module instead.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Both openSUSE test cells fail the install step:
leap15.6: nothing provides 'perl-DB_File' needed by xCAT-server
sles12: nothing provides (/usr/sbin/dhcpd if openEuler-release else
((kea and kea-hooks) if (system-release >= 10) else
/usr/sbin/dhcpd)) needed by xCAT
Both requirements are written for EL and have no answer on openSUSE. No
package named perl-DB_File exists on Leap 15.6 or 42.3. The dhcpd expression
is a rich dependency, and the sles12 management node is openSUSE 42.3 with
rpm 4.11, which has none.
The test states what the openSUSE branch of each spec must ask for, and that
no rich dependency reaches an openSUSE build. It also holds down that EL and
openEuler keep the expressions they have. Four of its nine assertions fail
because no spec has an openSUSE branch for these requirements yet.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Ninety xCAT modules carry
BEGIN { $::XCATROOT = $ENV{XCATROOT} || '/opt/xcat' } use lib "$::XCATROOT/lib/perl";
so the first xCAT module a test loads can put an installed product in front of
the checkout in @INC. A build host has one: xcat-master carries
/opt/xcat/lib/perl/xCAT/DiscoveryUtils.pm. A run that loaded that copy would
pass while measuring a product built weeks ago, and nothing in the test said
otherwise.
The test now reports the file that answered, refuses one under /opt/xcat, and
asserts the routine exists. A stale copy winning @INC lacks it, so the file
goes red instead of passing on three assertions that never ran against this
change.
Measured both ways: on a host with no xCAT the module resolves to
perl-xCAT/xCAT/DiscoveryUtils.pm, and on xcat-master, which has an installed
copy, it still resolves to the checkout -- so the use lib does win today and
this holds that down rather than fixing a live fault.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatd fills _xcat_clienthost and _xcat_clientfqdn from a reverse lookup of the
client socket, so both are empty when that lookup fails, however good the
client credentials are. A plugin that asks only for the peer host therefore
cannot identify a node whose certificate names it correctly.
xCAT::DiscoveryUtils::request_client_names returns the names a request offers,
most trustworthy first: the peer host, its fully qualified form, then
_xcat_authname, which is the name in the validated client certificate and does
not depend on name resolution. The request's own node attribute is excluded on
purpose -- a client sends it, so it states what the client wants to be rather
than what it proved it is, and postscripts carry the cluster root ssh key.
xCAT-test/unit/getpostscript_client_identity.t drives the routine directly: the
request hash is its only input and a list of names its only output. It fails on
five mutants of the routine, each naming the assertion it breaks -- the
certificate name dropped (2 checks), the empty-name guard dropped (1), the
client-supplied node offered (3), the de-duplication dropped (2), and the
array-ref guard dropped (1).
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Genesis image runs allowcred.awk, minixcatd.awk and udpcat.awk under its own
/usr/bin/awk. All three open a TCP stream with the gawk |& coprocess and the /inet/
special file, which mawk rejects at parse time. The Ubuntu dracut module stages
/usr/bin/awk from the build root, and on Ubuntu that alternative is mawk.
genesis_ubuntu_awk.bats drives install() from dracut_105/ubuntu/module-setup.sh with the
dracut helpers replaced by stubs, and reads back what the module installs and where awk
in the image points. genesis_ubuntu_build_root.t asks the build root for a gawk package.
genesis_payload_verification.t gives XCAT::GenesisPayload a payload whose awk names
itself mawk.
All three fail on this commit: 3 of 3 bats assertions, 2 of 18 in the build-root test,
3 of 33 in the payload test.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Only blackboxtest's DHCP steps need scapy. dhcp.py is the single module that
imports it, inside scapy_module(), which raises UnsupportedError naming
python3-scapy when the import fails -- so xcat-test installs and every other
blackboxtest step runs without it. xCAT-test.spec has only ever RECOMMENDED the
package, and says why in a comment: a hard Requires: would make xcat-test
uninstallable on a management node without EPEL. debian/control answered the
same question with Depends:, which is the asymmetry this fixes.
The cost is not theoretical. `apt-get install -y xcat-test` installs Recommends
by default and python3-scapy recommends matplotlib, scipy and ipython3 -- 54
packages, about 255 MB -- inside a workflow step capped at 1200 seconds. On
2026-10-23 that download stalled and killed xcat_pr_test on xcat-core/#7974 at
exactly 1200s, step 21, while a sibling run on another runner did the same
install in 19 seconds. The job does 50 to 55 minutes of work against a
60-minute timeout, so a dependency of that size is most of its headroom.
Moving it to Recommends does not by itself stop apt pulling it: an installer
that wants the small package set has to ask, with --no-install-recommends. What
this changes is that xcat-test no longer REQUIRES 255 MB to install, which is
what the spec already said and what the code already supported.
xcat_test_scapy_optional.t asserts both packagings give the same answer: scapy
absent from Depends, present in Recommends, the perl dependency still a Depends,
and the spec recommending rather than requiring it. Restoring the hard Depends
fails one assertion; deleting the Recommends outright -- the other tempting
answer -- fails a different one.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
An Ubuntu node that netboots legacy Genesis dies with
Failed to execute /init (error -13)
Kernel panic - not syncing: No working init found.
xCAT-genesis-base/debian/rules is a bare `dh $@`, so dh_fixperms applies its
*.so* rule to the whole package. That is right for a Debian shared library and
wrong for a netboot ROOT FILESYSTEM: the kernel execs the payload's dynamic
loader, and a loader with no execute bit makes open_exec() return EACCES, so
every ELF in the image fails to start. mknb copies the tree verbatim into
genesis.fs.<arch>.lzma, so the mode travels into the image. The pipeline's iPXE
command line carries `quiet`, which hid the reason.
Measured on xcat-master-ub from the installed package:
644 .../netboot/genesis/x86_64/fs/usr/lib64/ld-linux-x86-64.so.2
755 .../netboot/genesis/x86_64/fs/usr/bin/basename
and reproduced away from the lab: that management node's own kernel and image
under qemu panicked at 35 seconds, a repack with no change panicked again, and a
repack with only chmod 0755 on the loader reached /init and started dracut.
The EL rpm is unaffected, because it never runs dh_fixperms. This is why only
the Ubuntu genesis-legacy cell saw it, and why that cell has never had a
non-mock green. It is not a regression: the same recipe builds the published
xcat-genesis-base-amd64.
The bit is restored AFTER dh_fixperms rather than excluding the tree with -X,
which would also skip its chown 0:0 pass and ship the payload owned by the build
user.
genesis_deb_loader_executable.t asserts the override exists, still calls
dh_fixperms, is scoped to the netboot tree, names both the glibc and the ppc64le
loader, and runs the chmod AFTER dh_fixperms. Three of its ten assertions fail
without the override, and the ordering assertion fails if the chmod is moved
first -- which is the mistake that looks correct.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Two conflicts, both from xcat-core/#7978 landing on master.
build-utils/lib/XCAT/BuildUtils.pm: both branches added a package_skip_reason,
#7978 with a general @PACKAGE_SKIPS table and this branch with its own
%EL_ONLY_PACKAGES and a second sub. git merges them as separate hunks because
they sit apart in the file, and Perl takes the LAST definition, so keeping both
silently deletes whichever rule came first. There is now one table and one sub.
A rule names either the target prefixes that do NOT build the package, or, with
`only`, the pattern of the targets that DO. The second form is what an EL-only
package needs: naming the families that are not EL means a family added later
tries to build it, which is how openSUSE reached xCAT-selinux and failed
xcat-core-build-opensuse #42 on a missing selinux-policy-devel.
buildrpms.pl: an empty build plan takes upstream's answer, a clean return rather
than this branch's die. That is the decision #7978 exists for -- the dep
pipeline asks for xCAT-genesis-base alone and no openSUSE target builds it -- so
reinstating the die would fail a build that has nothing to do.
selinux_el_only_scope.t is 37 of 37 and opensuse_no_legacy_genesis.t 22 of 22 on
the merged tree, and the whole unit suite passes: 301 files, 9801 tests.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcat-core-build-opensuse #42 failed on three packages whose only error was
"No matching package to install: selinux-policy-devel", and took the whole
openSUSE family of xcat-ci #146 down with it. openSUSE Leap ships no
selinux-policy-devel, so the policy module has nothing to compile against.
package_skip_reason in build-utils/lib/XCAT/BuildUtils.pm tested the target
against /\Aopeneuler-/, because openEuler was the one non-EL family buildrpms.pl
targeted when the guard was written. openSUSE was enabled afterwards and matches
no arm of that test, so the EL-only package was selected for it.
The test is now on EL rather than on the families that are not EL, so a family
added later skips an EL-only package instead of trying to build it.
selinux_el_only_scope.t gains the two openSUSE targets. Without this change its
two new assertions fail and the other 35 pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Drive the Kea reservation builder and the ISC makedhcp path for grub2
nodes of each architecture. Place the loader links in the site TFTP
directory or in noderes.tftpdir. An aarch64 node with only grub2-<node>
keeps that name. The table stub returns only the requested columns, so
a missing nodetype.arch or noderes.tftpdir read fails the aarch64 cases.
Drive grub2 setstate for the node loader links: both names for an
aarch64 node and one for the others. Cover a repeated nodeset, a node
with only the old link, and removal in the boot, offline and SLES 15
standby states.
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.
selinux_image_repair.t measured a moved publication directory and an image root
with a rootimg component in the middle in separate fixtures, and it called the
mappings of a scenario a repair without running the restorecon the page puts
between them. Neither condition reaches the ordering defect on its own, and the
relabel the procedure runs itself was never measured.
The case now gives each scenario the relabel, so the scenario places it where
the page does. It reads the guest labels straight after the procedure, because a
label the procedure overwrote cannot be recovered by a mapping added afterwards.
It then asserts the mapping and the label of each path after a recursive relabel
and after a reinstall of the module.
A third scenario runs the four documented steps on the layout that needs all of
them: site.installdir is /srv/xcat-images, so no mapping covers the tree until
the procedure adds one, and the image root carries a rootimg component in the
middle, so the guest exclusion matches the published artifacts too.
selinux_docs.t gains three checks on the order of the page: the guest exclusions
come before the artifact mappings, the relabel comes after the last mapping, and
there is one relabel. All three fail against the page at 78f6d65a7.
With the command order of that page, the full sequence fails 47 of 381 checks:
16 guest labels, which go from shadow_t, etc_t and bin_t to var_t, and 15
artifact mappings, which resolve <<none>> for the five expressions that carry a
wildcard.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Nothing holds the openSUSE Genesis scope down. xCAT-genesis-base is built for
every target the dep pipeline names, and xCAT-genesis-scripts requires the
payload on every family.
The test reads the build-plan decision and the payload requirement in the spec.
It fails on this commit: the build plan keeps xCAT-genesis-base for openSUSE,
and the requirement carries no condition.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
Nothing holds the scope of xCAT-selinux down. The package is in the default
set of buildrpms.pl, so every target builds it, and xCAT-server and xCATsn
require it on openEuler as well as on EL.
The test reads the build-plan decision and the two spec conditions. It fails
on this commit: BuildUtils has no build-plan decision, and both conditions
still name openEuler.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatprobe_xcatmn_selinux asserts the text of the SELinux checkpoint, and
probe_xcatmn_selinux_case.t built that line by hand. The line xcatprobe
prints in the GitHub Actions container carries no text, so the test passed
while the case failed.
xcatprobe held the layout in format_cmd_output, which no test can call.
This moves the layout to probe_format and leaves xcatprobe the printing.
The rendering is unchanged at every width: an identical column of output
for widths 7, 40, 79, 80, 120, 121 and 200, truncated and wrapped, with
and without colour.
The test now renders the checkpoint through probe_format at the width the
container gives, and it fails here. screen_width returns 0 for a terminal
'tput cols' cannot measure, the message is cut to the empty string, and
three assertions read '[ OK ]' where they expect the checkpoint text.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Document the restricted certificate policy, required tools and cleanup limits. Distinguish the fixture from the default certificate-free postscript path.
xcatprobe_xcatmn_selinux runs the probe through grep -i selinux. grep
keeps the lines that name SELinux and discards every other checkpoint,
so the one CI failure of this case reported rc 1 with an empty output
and said nothing about which checkpoint the probe stopped at. The second
check, on the word FAIL, read that empty output and passed.
probe_xcatmn_selinux_case.t requires the case to keep the whole output,
to assert at least one pattern the output must hold, and to name the
SELinux checkpoint in every pattern. It takes the marks of a checkpoint
from probe_utils->send_msg, and requires each pattern to tell a passing
checkpoint from a failing one.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Two pages describe SELinux, and both disagree with xCAT-selinux. The
security page says the package defines no type and that xcatd runs in
unconfined_service_t. The older page says a service node and a compute
node are out of scope because xCAT does not select their mode, and the
branch ships noderes.selinux.
selinux_docs.t reads the permissive domains out of xcat.te and requires
each page to name them, to call them permissive, and to leave out the
two claims above. Nothing held the pages to the module before.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatd.service sets XCATROOT and PATH to the literal /opt/xcat. The
previous ExecStart sourced xcat.sh, which %post generates from
RPM_INSTALL_PREFIX0, so a relocated package got its own prefix. With the
package installed under /srv/xcat the daemon symlink reaches
/srv/xcat/sbin/xcatd and the Perl search path still names /opt/xcat, so
xcatd cannot load its own modules unless the administrator overrides the
environment or a default installation is left behind.
%post writes /etc/xcat/xcatroot.env with XCATROOT and PATH built from
RPM_INSTALL_PREFIX0, and the unit reads it with EnvironmentFile. The
order is the default in the unit, then that file, then
/etc/sysconfig/xcat, so the recorded prefix replaces the default and the
site file keeps the last word. ExecStart stays a direct call, so the
kernel still enters xcat_t on the xcatd script. %preun removes the file
on erase. The file is not in %files, so rpm --verify is unaffected.
xcatd_relocated_startup.t fails 3 checks of its /srv/xcat subtest
without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>