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

1043 Commits

Author SHA1 Message Date
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 72b3228f81 test(netboot): build and pack openEuler riscv64 diskless images
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.
2026-11-02 17:48:54 -03:00
Vinícius Ferrão 28e447bb2e test(anaconda): publish an upper-case riscv64 media boot loader
openEuler media carry EFI/BOOT/grubriscv64.EFI. copycds must publish it as
grub2.riscv64.
2026-11-02 17:48:53 -03:00
Vinícius Ferrão a112ff0f2d test(anaconda): identify the openEuler riscv64 media
The fixture holds the .treeinfo and .discinfo of the 24.03 LTS-SP3 RVA23
DVD. copycds must identify it as openeuler24.03sp3 on riscv64.
2026-11-02 17:48:52 -03:00
Daniel Hilst c0698fa253 Merge pull request #7995 from VersatusHPC/fix/opensuse-mn-package-requires
fix(xcat-core): xCAT cannot be installed on an openSUSE management node
2026-10-30 09:57:51 -03:00
Daniel Hilst 10c30c80ba Merge pull request #7993 from VersatusHPC/fix/getpostscript-client-identity-v2
fix(xcat-core): getpostscript serves no node when the client reverse lookup is empty
2026-10-30 09:57:22 -03:00
Daniel Hilst 2aceb80102 Merge pull request #7991 from VersatusHPC/fix/xcat-test-scapy-optional
fix(xcat-test): scapy is a hard Depends on Debian and only a Recommends on EL
2026-10-30 09:56:54 -03:00
Daniel Hilst dfad7287f0 Merge pull request #7984 from VersatusHPC/fix/genesis-ubuntu-mawk-rebased
fix(xcat-core): the Ubuntu Genesis image runs its awk programs under mawk
2026-10-29 15:24:52 -03:00
Daniel Hilst 89b9213e4d Merge pull request #7977 from VersatusHPC/fix/boot-node-template
fix(boot): stop unsupported node-template keys from looping
2026-10-29 15:00:28 -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 b7076359f4 fix(xcat-test): xcat-test can install without python3 on Debian
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>
2026-10-29 14:42:47 -03:00
Daniel Hilst e3429791c6 fix(xcat-core): getpostscript serves a node's postscripts to a password or token login
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>
2026-10-29 14:41:25 -03:00
Vinícius Ferrão c35fabe185 test(netboot): cover copied profile helper layouts 2026-10-26 18:29:45 -03:00
Vinícius Ferrão ef5ae32891 test(boot): reject cyclic node-template values 2026-10-26 17:44:58 -03:00
Daniel Hilst 12ac35da03 test(xcat-core): xcatd does not start on an openSUSE node
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>
2026-10-26 10:22:32 -03:00
Daniel Hilst 2c56d3d2e8 test(xcat-core): xcattest skips every case on an openSUSE management node
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>
2026-10-26 10:22:32 -03:00
Daniel Hilst 35f333a05a test(xcat-core): xCAT cannot be installed on either openSUSE node
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>
2026-10-26 10:22:32 -03:00
Daniel Hilst 1435077a4b test(xcat-core): the client-identity test does not say which tree it measured
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>
2026-10-24 13:21:39 -03:00
Daniel Hilst 3dd7c2a590 fix(xcat-core): a node-initiated request is dropped when only its reverse lookup fails
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>
2026-10-24 11:28:41 -03:00
Daniel Hilst 1d52b46e29 test(xcat-core): the Ubuntu Genesis image can ship mawk as its awk
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>
2026-10-24 10:01:16 -03:00
Daniel Hilst 8c2ecab18c fix(xcat-test): scapy is a hard Depends on Debian and only a Recommends on EL
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>
2026-10-23 17:27:17 -03:00
Daniel Hilst 56a009bf8d Merge pull request #7908 from VersatusHPC/feat/selinux-netboot
feat(xcat-core): SELinux support
2026-10-23 16:44:51 -03:00
Daniel Hilst 88e3a727a9 Merge pull request #7982 from VersatusHPC/fix/genesis-base-deb-loader-perms
fix(xCAT-genesis-base): the deb ships a Genesis loader with no execute bit, so every node panics
2026-10-23 16:04:19 -03:00
Daniel Hilst 6cab708941 Merge pull request #7969 from VersatusHPC/fix/boot-state-correctness
fix(boot): preserve GRUB files and correct Destiny completion
2026-10-23 15:19:33 -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 37117ab00e Merge pull request #7971 from VersatusHPC/fix/syncfiles-diagnostics-coverage
fix(syncfiles): retain the client name when node lookup fails
2026-10-23 14:38:01 -03:00
Vinícius Ferrão 2de8d308ed test(destiny): cover mixed completed and active chain requests 2026-10-23 14:11:34 -03:00
Vinícius Ferrão 9b47f76ca2 test(destiny): distinguish complete and overlapping chain states 2026-10-23 14:11:34 -03:00
Vinícius Ferrão e5df3dde1b test(grub2): preserve boot artifacts on rejected updates 2026-10-23 14:11:33 -03:00
Daniel Hilst 09e277a6a1 fix(xcat-genesis-base): the deb ships a Genesis loader with no execute bit, so every node panics
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>
2026-10-23 12:16:02 -03:00
Daniel Hilst 422c156e9e Merge pull request #7980 from xcat2/fix/grub2-aarch64-efi-bootfile
fix(grub2): give aarch64 nodes a boot file name ending in .efi
2026-10-23 10:52:51 -03:00
Daniel Hilst 236aafcc87 Merge upstream/master into feat/selinux-netboot
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>
2026-10-23 10:26:24 -03:00
Daniel Hilst 87f9e886d9 fix(xcat-core): xCAT-selinux is built for openSUSE, which has no selinux-policy-devel
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>
2026-10-23 08:45:54 -03:00
Vinícius Ferrão 8bb6f4ef91 test(grub2): cover the aarch64 boot file name and node loader links
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.
2026-10-23 02:24:42 -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 7d66afe2f3 test(xcat-core): no case runs the documented repair as one sequence
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>
2026-10-23 00:56:41 -03:00
Daniel Hilst f5a029c448 test(xcat-core): assert openSUSE builds and installs without legacy Genesis
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>
2026-10-22 23:44:42 -03:00
Vinícius Ferrão 3b60ea3150 test(boot): reject unsupported keys without replacing boot artifacts 2026-10-22 21:31:25 -03:00
Vinícius Ferrão 8393732971 test(boot): characterize node templates across boot methods 2026-10-22 20:55:30 -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
Daniel Hilst bd91348c54 test(xcat-selinux): assert the policy package is built for EL targets only
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>
2026-10-22 12:03:35 -03:00
Daniel Hilst f38418bd75 test(xcat-probe): the probe case measures a checkpoint line the test wrote itself
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>
2026-10-22 08:49:37 -03:00
Vinícius Ferrão 66a8b7786b docs(syncfiles): describe the isolated delivery fixture
Document the restricted certificate policy, required tools and cleanup limits. Distinguish the fixture from the default certificate-free postscript path.
2026-10-21 20:42:14 -03:00
Vinícius Ferrão 090deae902 test(syncfiles): exercise copy consumer identity precedence
Drive the real xdsh and DSHCLI parser from syncfiles and updatenode. Capture only the external copy boundary and preserve inherited identity behavior.
2026-10-21 20:42:14 -03:00
Vinícius Ferrão 7f77e90308 test(syncfiles): check unresolved client names and rejection
Check the original hostname in the unresolved-node diagnostic. Keep blank and missing-client rejection covered without sending a copy request.
2026-10-21 20:42:13 -03:00
Daniel Hilst ea658e280e test(xcat-core): the xcatmn probe case throws away the output it checks
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>
2026-10-21 19:30:14 -03:00
Daniel Hilst 95127756f1 test(xcat-core): no case compares the SELinux pages with the shipped policy
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>
2026-10-21 19:27:38 -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 3d58aefcba fix(xcat-core): a relocated xcatd loads the modules of another installation
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>
2026-10-21 16:50:33 -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