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.
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>
xCAT-server now asks for the perl(DB_File) capability on openSUSE,
because no openSUSE release ships a package named perl-DB_File. The
native package relation test still counted perl-DB_File in the SLES12
and SLES15 requirements, so both checks failed in xcat_pr_test.
Expect perl(DB_File) on the SLES platforms and keep perl-DB_File for
the others. The test fails against the upstream master spec and
passes with this branch.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
current_os reads /etc/os-release and returns undef for openSUSE. The word sles
appears nowhere in Leap's os-release -- ID is opensuse-leap on 15.x and
opensuse on 42.3 -- and Leap ships none of /etc/redhat-release,
/etc/lsb-release or /etc/SuSE-release, so no other arm is reached. xcattest
rejects every case on the resulting undef, and 328 of the shipped cases declare
os:Linux.
openSUSE now answers with the SLE family whose package set it shares, which is
the answer decided on 2026-09-18 for the same bug: sles.pm claims leap15 and
xcat.org publishes the Leap dependencies under sles15. It also lets the 18
cases written os:sles select a Leap node, which a name of its own would not.
current_os has one consumer -- the os: comparison at xcattest:1052 -- so the
answer affects nothing else.
The match is on the whole file rather than on ID alone, because Leap 42.3
spells its ID opensuse and Tumbleweed opensuse-tumbleweed. It is placed after
the sles test, so a real SLES node is unaffected.
xcattest_os_selection.t passes, 19 of 19. Reverting this file alone fails its
five openSUSE assertions and nothing else.
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>
A node boots Genesis, prints "Getting initial certificate --> MN:3001" and goes no
further. xcatd records no credential request, the node status stays at powering-on,
and every case that waits for the node fails.
genesis_openssl_config.bats drives each dracut module's install() with the dracut
helpers replaced by a recorder, so it reads what the module asks the payload to carry.
genesis_getcert_missing_openssl.bats gains one case: the give up message must repeat
what openssl printed, because a message naming only certkey.pem sends the reader to a
key that is intact.
Three of the six cases fail on this commit: both module cases, and the message case.
stub_dir defaulted count to the empty string, which left "{ ; exit 1; }" in the
openssl stub. That is a syntax error, so the stub failed for the wrong reason and
reported bash's message instead of openssl's. The default is now a no-op command.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
selinux_avc_classify matched the entries of XCAT_AVC_PATH as string prefixes,
with [^"]* before the alternation and no boundary after it. A directory name
is not a string prefix: /var/lib/xcat-cluster-test is not /var/lib/xcat, and
/installer is not /install.
The CI writes its regnotif notification hook to
/var/lib/xcat-cluster-test/event-notify.pl. xcatd executes it, the file
carries var_lib_t, and xcat_t has no execute_no_trans on it, so the audit log
holds the record. The classifier kept it on the strength of the prefix, the
count read XCAT_AVC=1, and selinux_cn_diskful_enforcing failed on a file the
product does not ship. The policy was confining xcat_t correctly.
The path half of the pattern now starts at the opening quote and ends at a /
or at the closing quote, so a listed directory matches itself and the files
under it, and nothing else. The subject half is unchanged: a denial by an
xCAT program is still kept whatever the path.
selinux_avc_check.bats covers it. Reverting the boundary group fails the
sibling-path test alone; requiring a trailing / fails the bare-directory test
alone.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A compute node booted into legacy Genesis on Ubuntu refuses every ssh connection:
[xcat100-mn]: xcat100-cn: ssh: connect to host xcat100-cn port 22: Connection refused
and on the node's own console, once per boot:
Missing privilege separation directory
Debian and Ubuntu build sshd with --with-privsep-path=/run/sshd. The payload's own sshd
carries that path and the format string "Missing privilege separation directory: %s", and the
image ships /run holding only rpcbind. So sshd exits at startup and the node is unreachable.
nodeset_shell, nodeset_cmdline, nodeset_runimg and genesis_boot_proof_legacy all fail on it,
while seq_discovery, which needs no ssh, passes.
doxcat already does this for the other family: it creates /usr/share/empty.sshd, the EL
privsep path, with the comment "On some systems /usr/share/empty.sshd needs to be created
before calling sshd". The Debian path was never added, although the tree knows about it twice
-- remoteshell says "prepare the /var/run/sshd for ubuntu" and etc/init.d/functions creates
it. This adds the same lines for /run/sshd and /var/run/sshd.
Created immediately before sshd starts, not baked into the image: /run is a tmpfs on a
running system, so a directory under it does not survive the mount. The mode is set whether
or not the directory had to be created, because sshd refuses a group or world writable
privsep directory with the SAME message as an absent one, so a wrong mode is
indistinguishable from this bug.
genesis_sshd_privsep.bats asserts what sshd imposes -- the path is a directory, owned by the
user that will run sshd, and not group or world writable -- read at the moment sshd runs. The
recorder is bound over /usr/sbin/sshd because doxcat calls that absolute path, and because
recording from a later command cannot see the ORDER: with the recorder on a PATH command
instead, moving the directories after the sshd line still passed.
Five mutations, each red: removing the loop fails 2, never setting the mode fails 1, dropping
/var/run/sshd fails 2, a group-writable mode fails 2, and creating the directories after sshd
starts fails 2. The whole bats suite goes from 21 failures to 19 with this change, the
difference being these two tests; the other 19 are unrelated and fail on the base.
doxcat_sandbox.bash gains chmod, and a third test keeps the next one from being missed. The
sandbox curates PATH without /usr/bin, so a command it does not copy resolves to nothing and
fails SILENTLY: doxcat's chmod did nothing under test for as long as this sandbox has
existed, and any assertion about a mode could never pass. The guard installs bash's
command_not_found_handle through BASH_ENV and fails naming whatever doxcat invoked and could
not resolve, so it needs no list to keep current. With chmod removed again it reports exactly
"chmod". Its reach is the commands doxcat runs on the path the test drives, which is a floor
rather than a completeness check on the helper's list.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
selinux_avc_check.sh decides which SELinux denials xCAT answers for by
matching the audit record's path against XCAT_AVC_PATH. The match treats each
entry as a string prefix, so a sibling directory whose name merely starts with
one of them is kept. On build 2 of xcat-test-el10-x86_64-selinux the one
denial the run attributed to xCAT was xcatd executing the CI's own
notification hook under /var/lib/xcat-cluster-test, and
selinux_cn_diskful_enforcing failed on it.
The new bats test classifies that record and asserts nothing is kept. Two
more assert the directories themselves and a file under one are still kept,
so an over-anchored match does not pass silently.
Without the fix 1 of 18 fails, and it is the sibling-path test. The other two
pass before and after.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
node_pingable asks ICMP up to PING_TRIES times and stops at the first answer,
so a few seconds of loss after a node boots no longer forces a second full
rinstall. A node that never answers still reports non-pingable, and the caller
still vetoes it: the signal is kept, not removed.
The probe is lifted into a function with a main-guard rather than left inline,
so a bats test can drive it without running a provisioning loop or needing an
xCAT database. Nothing sources this script -- all nine callers execute it -- so
the guard changes no caller.
The happy path is unchanged at one ask. A node that never answers now costs
PING_TRIES asks before the verdict, which is under a minute against the six
minutes of the reinstall it decides.
retry_install_transient_icmp.bats passes 5 of 5. Removing the bounded retry
fails assertions 2 and 4, which are the retry properties, and leaves assertion 3
passing -- a node that never answers is still not pingable. That assertion is
the discriminator: without it the change could not be told apart from deleting
the check, which would turn a flaky probe into one that cannot fail.
xCAT-test/bats is 596 passed, 19 failed. All 19 are
xcatroot_rootimg_checksum.bats, which reports 0 passed and 19 failed on
upstream master with none of this branch applied.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
retry_install.sh declares a provision successful only when tobooted, pingable
and canruncmd are all 0. pingable came from a single `ping -c 2`, and ICMP to a
node is lossy for a few seconds after it finishes booting.
Measured on an openSUSE Leap 15.6 cluster: one sample reported "2 packets
transmitted, 0 received" while `xdsh <node> date` returned the node's own clock
a second later, so the node was up and answering SSH. The conjunction failed on
ICMP alone, the case ran a second full rinstall, and that cost 401 of the 404
seconds between two runs of the same cell. The second run lost 2 of 3 packets at
a moment that was not the decision point and passed first try. The difference
between the two runs was which side of a two-packet sample landed, not the state
of either node.
The probe is tested in bats, because it is shell. It is driven with a stubbed
ping, so what is measured is how many times the probe asks and what it answers,
not whether the build host can reach anything.
All five assertions fail on this commit, because node_pingable does not exist
yet and sourcing the script still runs lsdef. The graded evidence is the
mutation recorded in the fix commit.
`run` is used rather than a bare call: bats fails a test on any non-zero command
in its body and `set +e` does not suppress that, so asserting on a non-zero
return without `run` aborts the test instead of measuring it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The diskless cases snapshot the mount table before genimage and after it and require the two to
be identical, ignoring only fusectl. The comparison is there to catch a bind mount genimage
leaves inside the root image, which is worth catching.
It also fails for mounts the kernel makes on its own. binfmt_misc is an autofs stub that becomes
a real mount the first time a process reads /proc/sys/fs/binfmt_misc, and tracefs appears under
/sys/kernel/debug the first time anything opens debugfs tracing. On openeuler22.03sp4 both
appeared during genimage and failed reg_linux_diskless_installation_flat four minutes into a
1168 second case, while the provisioning that followed succeeded and the node reached booted.
The single fusectl exclusion shows the same class was met once before and patched by name.
mount_snapshot.sh drops the mounts whose mount POINT is under /proc or /sys, which is where the
kernel keeps its on-demand mounts, and the three cases take their snapshots through it. Dropping
them by filesystem TYPE would hide the leak the comparison exists for, because a leaked genimage
bind is itself a proc or sysfs mount. fusectl needs no exclusion of its own any more.
mount_snapshot.bats covers both directions. Taking the filter out fails the two
ignore-the-kernel assertions and keeps both leak assertions; filtering by type instead of by
mount point fails only the leaked-bind assertion. A test-only commit would skip rather than fail,
because require_repo_file skips when the script is absent, so the proof is those two mutations.
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>
reg_linux_diskless_installation_flat fails on every ppc64le cell. rpower boot
leaves the compute node down and libvirt reports "unsupported configuration:
Emulator '/usr/bin/qemu-system-ppc64' does not support machine type
'pseries-rhel7.6.0'".
vm_machine_type_for_arch in vm_machine_type.sh answered machine:pseries-rhel7.6.0
for every ppc64 architecture. The ppc64le hypervisor runs AlmaLinux 10, whose
qemu-system-ppc64 declares pseries-5.0 to pseries-10.2 and no rhel machine type,
so the name the case writes cannot be defined there.
The function now reads the vmhost of the node and asks that host's libvirt. It
writes the plain alias when libvirt accepts it, that libvirt's own default when
it does not, and the alias when the vmhost cannot be asked. x86_64 keeps
machine:pc, which is an alias and stays valid.
xCAT-test/bats/vm_machine_type.bats covers it. Nine of its tests fail on the
previous commit, among them "the vmhost accepts the machine type that comes
back" and "the machine type is the alias the vmhost accepts".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
vm_machine_type_for_arch returns a machine type from a fixed table. Nothing asks
the host that runs the guest whether it accepts that name, so a name that the
host dropped is written and libvirt refuses the domain.
The bats file now stubs virsh and ssh for the vmhost and asserts the name that
comes back: the plain alias when the host accepts it, the host's own default
when it does not, the alias again when the host cannot be reached, and the
architecture and host the probe asks about. ppc64el is covered beside ppc64le
because the Ubuntu cells name the architecture that way.
Nine tests fail against the current script, which answers machine:pseries-rhel7.6.0
for every ppc64 architecture.
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>