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

2224 Commits

Author SHA1 Message Date
Daniel Hilst e9f27f139b fix(xcat-core): the documented repair relabels before the guest exclusions exist
The SELinux page carried the repair in two blocks. The first mapped the
published artifacts and ran restorecon over the image root. The second mapped
the publication directory and excluded both guest trees. An operator with
site.installdir=/srv/xcat-install who reads the page in order therefore
relabels before any mapping covers that tree, and rootimg/etc/shadow resolves to
var_t. The exclusion added afterwards keeps the var_t it finds, because it only
stops the next relabel from changing the label again.

The order also cost the artifacts. file_contexts keeps the expressions in the
order they are read and the last one that matches a path wins, so the exclusions
of the second block beat the artifact mappings of the first. Where the image
root carries a rootimg component in the middle, the exclusion matches the
artifacts as well, and the five expressions with a wildcard, the initrds and the
packed images, resolve <<none>>. kernel and hypervisor carry no wildcard and win
either way, which is why the defect showed on a subset.

The page is now one sequence: the publication directory, both guest exclusions,
the artifact mappings, then one restorecon. It says what each step orders and
why.

xCAT-test/native/selinux_image_repair.t passes 381 of 381 checks on this
sequence and fails 47 on the order of the parent commit. selinux_docs.t fails 3
of 30 on the parent commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 00:56:50 -03:00
Daniel Hilst 78f6d65a7c fix(xcat-core): the documented repair of a published artifact relabels the guest trees
The SELinux page told the operator to run chcon -R -t public_content_t over the
image root to repair a published artifact that kept an older type. That command
walks into rootimg and rootimg-statelite, so it replaces the labels of the guest
operating system with public_content_t. The xcat.fc comment carried the same
advice. chcon also writes a type that no mapping selects, so the next relabel of
a path that has a mapping reverts it: the repair held only until then.

The page now maps each published artifact with semanage fcontext and applies the
mapping with restorecon. Each expression names one regular file directly below
the image root, so no path in either guest tree matches one, and both trees keep
the <<none>> of the packaged mappings. The procedure reads the publication
directory from site.installdir, and a site that moved it maps the configured
directory and keeps both guest trees out of that mapping. The page says why a
tree mapping over the image root is the same defect as the chcon.

xCAT-test/native/selinux_image_repair.t passes 170 of 170 checks with the
documented procedure. With the chcon of the previous page it fails 101, 36 of
them guest labels. selinux_docs.t fails 7 of 26 on the parent commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 18:25:33 -03:00
Daniel Hilst 6f578741af fix(xcat-core): the comment says an unlabeled kernel stops netboot, and it does not
The file contexts leave the published kernel of a middle-rootimg image
root out of the relabel. The comment and the SELinux page read that as
the kernel being unlabeled, httpd refusing to serve it, and that osimage
losing netboot, with restorecon as the repair. Three of those four
claims are wrong.

Measured. An entry of <<none>> keeps the label a path has: restorecon
-R, restorecon -RF and setfiles -F all left a kernel at default_t, while
the same setfiles call relabeled a path that has a rule. A new file
inherits the type of its directory, so a kernel that genimage writes
into an image root already made public_content_t is public_content_t. In
the policy with the xcat module loaded, httpd_t holds one allow rule to
read public_content_t and none for default_t. So the ordinary case
serves and netboot works, and restorecon is not the repair for the case
that does not: chcon -R -t public_content_t over the image root is, and
a later relabel leaves that value alone.

selinux_file_contexts.t now starts half the custom roots at
public_content_t, which is what genimage produces, and half at
default_t, and requires each to keep its own type. It fails 324 of its
618 checks against the previous xcat.fc.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 20:03:44 -03:00
Daniel Hilst 45ebeacab8 docs(selinux): the page says a path left out of the relabel is unlabeled
A file context of <<none>> stops restorecon changing the label. It does
not clear it. A tree that genimage creates under an image root that is
already public_content_t inherits that type, measured on an enforcing
el10 host: mkdir -p rootimg/common/sub under a public_content_t parent
gives every new component public_content_t, and the same tree under a
default_t parent gives default_t.

Say what the label is, and name the case that costs something: a tree
older than the package keeps default_t, and restorecon -RF over the
image root sets it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 19:53:51 -03:00
Daniel Hilst c9210eb26e docs(selinux): two pages describe a module that is not the one shipped
The security page said xcatd runs in unconfined_service_t and that
xCAT-selinux defines no type. The module defines xcat_t for xcatd and
the client commands, and xcat_image_t for the image build, and declares
both permissive. The older page placed a service node and a compute node
outside the scope because xCAT does not select their mode, and the branch
ships noderes.selinux and site.selinux.

Both pages now state what the module does: the two permissive domains,
the transitions to tftpd_t and chronyd_t for the services xCAT starts,
the mode a node resolves, and the goal of an enforcing management node.
The scope page also records that a published common or overlay directory
of an image root called rootimg is unlabeled, for the same reason as a
published kernel there.

selinux_docs.t fails 6 of its 18 checks without this change, on rome01.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 19:27:46 -03:00
Daniel Hilst d7f579440d test(xcat-core): nothing starts xcatd without the recorded prefix file
%post writes /etc/xcat/xcatroot.env and %preun removes it, so the file
is absent on rpm --justdb, before %post runs, and after an interrupted
install. Both subtests of xcatd_relocated_startup.t have the file
present, so neither reads what happens without it.

Add a subtest that removes the file: each EnvironmentFile of the unit
carries a leading -, which makes a missing file not an error, XCATROOT
is the default of the unit, and the daemon starts with that default
instead of the installed prefix. Dropping the default XCATROOT from the
unit fails checks 4 and 7 of that subtest.

Record the trade the file contexts make for a rootimg component in the
middle of an image root: the guest labels are kept, which leaves the
published kernel of that one layout unlabeled, so httpd cannot serve it
and that osimage cannot netboot. The note names the recovery.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 17:16:06 -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 4ba2cd0d70 docs(selinux): the page says the daemon context is always in /opt/xcat
The page states that the context belongs to the file in /opt/xcat. The
prefix is now recorded at install time, so a relocated package starts
the daemon of its own tree, and the file contexts still name /opt/xcat.

Say both, so a reader of a relocated installation knows the entrypoints
need their own entries.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 16:50:52 -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 632f700e44 docs(uftp): list openEuler among the UFTP images
openEuler stateless images use the rh genimage and dracut modules,
which add the UFTP receiver, and xcat-dep now builds uftp for the
openEuler targets. List openEuler with the supported images and the
uftp package.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão 126a468117 docs(uftp): describe UFTP root image distribution
Describe how genimage, nodeset, the listener and the booting node work
together, the supported images, the cases that nodeset refuses, and
what a transfer trusts. Describe the listener setup, the firewall and
multicast requirements, service nodes, and the transfer rate and jumbo
frame settings. Add the rootimgtransport attributes of the site and
the osimage to the reference pages.
2026-10-21 11:44:23 -03:00
Vinícius Ferrão 0d95f40775 docs(profiles): explain shared profile maintenance 2026-10-21 11:17:08 -03:00
Daniel Hilst 27586f1717 docs(xcat-core): the quick start shows a probe line the probe no longer prints
The xcatmn probe checkpoint became "Checking SELinux policy for xCAT"
when the probe started to check the xcat policy module and the labels of
installdir and tftpdir. The transcript in the quick start still shows
"Checking SELinux is disabled", which tells a reader that xCAT wants
SELinux off.

Show the line the probe prints.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:36:42 -03:00
Daniel Hilst 76e57d4a08 docs(xcat-core): say what SELinux an operator gets
The branch changed what a cluster runs and added no documentation, while
the quick start guide still told the operator to write SELINUX=disabled
on the management node before installing xCAT.

docs/source/advanced/security/selinux.rst says which machine gets which
mode, why a stateless node runs with SELinux disabled, how to set
noderes.selinux and site.selinux, and that xcatd, in.tftpd, kea-dhcp4
and goconserver run in unconfined_service_t, so the work is about
running with SELinux enforcing and not about confining xCAT.

It also covers the upgrade: recordselinuxdefault runs on INITIALINSTALL
only, so an upgraded cluster has no site.selinux value, every node keeps
being provisioned with SELinux off, and reprovisioning is what gives a
node the new mode.

The quick start step now says SELinux can stay enabled and links there.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:35:22 -03:00
Daniel Hilst c12dfe3063 Merge remote-tracking branch 'upstream/master' into feat/selinux-netboot 2026-10-21 10:30:06 -03:00
Kevin 3926cafcff docs: replace the dead GitGuys reference for remote branches 2026-10-20 18:42:34 +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
Daniel Hilst 43dee182ef Merge pull request #7909 from VersatusHPC/feat/secureboot-ipxe
fix(ipxe): a node with Secure Boot on cannot load the kernel
2026-10-16 20:44:36 -03:00
Daniel Hilst cf170b36c4 Merge pull request #7942 from VersatusHPC/feat/rootimg-sha256
feat(netboot): check the root image against its SHA-256 checksum
2026-10-16 18:18:10 -03:00
Daniel Hilst 9329aea4c2 Merge master into feat/secureboot-ipxe
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-16 11:03:31 -03:00
Daniel Hilst 11c91fd512 docs(selinux): the page describes one domain, and there are two
The page was written for a single domain and three entrypoints. It now names
both domains, the five client entrypoints including xcatDBcmds and the
genimage wrapper, and the two per-OS build programs.

It also states what each domain holds, so a reader does not take the split
for more than it is: xcat_image_t may relabel every type including the
security ones, and xcat_t keeps manage and relabel of non-security files
because packimage and liteimg run inside xcatd. And it records that a
permissive declaration does not cover a transition into a stock domain.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-15 16:24:15 -03:00
Daniel Hilst 167f04d2e9 docs(selinux): document the xcat_t domain and the management-node scope
The pull request adds a process domain and says nowhere which machine it
covers, which commands enter it, or why the domain is permissive while the
host is enforcing.

The new page names the scope as the management node, lists the three
entrypoint files and the rule that the unit must exec xcatd and not a shell,
and states that the permissive declaration is in the policy source and a
later release removes it. It gives the commands that read the domain of
xcatd and the enforced denials of a run, with the --input-logs finding:
ausearch read the journal on an EL10 node whose log held 1032 denials.

It also records why a confined user domain gets no transition, and that the
file permissions still decide what a user can read.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-14 16:56:37 -03:00
Vinícius Ferrão 0c554cc541 docs(packimage): describe the root image checksum
Describe the .sha256 file that packimage and liteimg write, and how
nodeset has nodes check it. Describe the rootimgchecksum attributes of
the site and the osimage, the upgrade that keeps existing images
unchecked, and the nodeset warning. Describe the checksum that genimage
and nodeset write for an image packed before this release.
2026-10-13 16:51:32 -03:00
Vinícius Ferrão f8c6b2d2ed docs(imgexport): describe the destination of the bundle
A local export now writes the bundle to the path of the destination.
2026-10-13 11:40:16 -03:00
Vinícius Ferrão e7b91df46f docs(packimage): describe how packimage replaces the root image archive
The man page said that packimage overwrites the root image and that nodes
cannot use it while packimage runs. Describe the replacement instead, and
the disk space that it needs.
2026-10-12 12:15:52 -03:00
Daniel Hilst 698bccf493 fix(xcat-core): the netboot restore test cannot tell which chdef failed
The bats stub returned one exit code for every "chdef netboot=", and the
helper calls chdef twice: once to set the method to ipxe, and once to put
the saved method back. With the stub failing both, "a netboot method that
cannot be put back fails the case" passed on the FORWARD failure, so
removing restore_rc=1 from the restoring branch left all 18 tests green.
The test named a defect it could not detect.

The stub now counts its netboot calls and fails the one the test names,
so the forward chdef succeeds. The test asserts that forward call is in
the call log, and matches the message only the restoring branch prints.
Removing restore_rc=1 now fails test 8 and no other.

docs/source/advanced/ipxe/index.rst said both methods run the same boot
scripts, which stopped being true when the shim line became conditional
on the method. It now says what differs, and states that Secure Boot
reaches netboot=ipxe only: xnba.efi is unsigned, and grub2 nodes are out
of scope.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-09 13:30:47 -03:00
Daniel Hilst 022a80f351 feat(xcat-core): load the kernel of an ipxe node through a Secure Boot shim
This PR adds a shim to the UEFI boot scripts of netboot=ipxe nodes, so a node
with Secure Boot on reaches its kernel.

The firmware signature database does not hold the keys of a Linux
distribution. A UEFI node with netboot=ipxe loads snponly-shim.efi and
snponly.efi, both signed, and then stops at the kernel with "Verification
failed: Security Policy Violation".

xCAT::SecureBoot::shim_url_path names a shim for one node. The shim of the
install source comes first, because its vendor certificate signs the kernel of
its own distribution. copycds keeps the names of the DVD, so the module tries
EFI/BOOT/BOOTX64.EFI, EFI/BOOT/bootx64.efi and EFI/boot/bootx64.efi: EL and
openEuler ship the first, openSUSE the second and Ubuntu the third. When no
install source carries a shim, the module names the shim of ipxe-xcat, which
verifies a kernel that a MOK key signs.

xnba.pm writes the shim line after imgload in the UEFI script of an ipxe node,
and mknb.pm writes it in the UEFI discovery scripts. iPXE fetches the shim only
when it cannot load the kernel itself, so a node with Secure Boot off reads no
shim. netboot=xnba is unchanged: no key signs xnba.efi.

The elilo and ESXi paths and the Genesis kernel stay unsigned, and the iPXE
documentation now says so. The validation matrix gets a row for a UEFI install,
a netboot image and discovery with Secure Boot on.

secureboot_ipxe_node_shim.t and secureboot_genesis_shim.t drive nodeset and
mknb into a scratch TFTP root. Four assertions of ten and two of seven fail
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 11:57:07 -03:00
Daniel Hilst 5952dc04a2 Merge pull request #7594 from VersatusHPC/feat/fips-support
feat(fips): support installation on FIPS-enabled systems
2026-10-07 10:34:18 -03:00
Timothy Middelkoop d1faba077c feat(genimage): opt-in package signature checks for EL images
Add the linuximage gpgcheck attribute. When it is set to 1 or yes,
genimage passes --gpgcheck to the shared RPM image builder, which
exports the builder's trusted RPM keys exactly as it does for openEuler
and writes gpgcheck=1 with that gpgkey for the pkgdir, kerneldir and
otherpkgdir repositories. Unset keeps the existing unverified
configuration, openEuler stays always verified, and builders without
the option reject the attribute instead of ignoring it.

Collect the otherpkgs repositories in imgutils so that an otherpkgdir
holding only URLs no longer adds a file:/// repository that fails to
download metadata on EL.

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:24:33 -05:00
Vinícius Ferrão 3976dd96b3 docs(fips): describe installation and validation boundaries 2026-10-05 22:56:35 -03:00
Vinícius Ferrão 63c4be9d7d docs: describe the ipxe netboot method
A new page describes the ipxe and xnba netboot methods: the files of the
upstream loader, UEFI Secure Boot through the shim and its limits, the
client test, the loader of nodes without a definition, the move of
nodes to the ipxe method and back, and the known limits of the upstream
loader.

The node guide, the noderes, node, group and nodeset pages list the ipxe
method, and the value lists mark xnba deprecated. The examples that
define an x86 node use netboot=ipxe. The mixed cluster and uninstall
guides name ipxe-xcat, and the DHCP validation matrix gets the iPXE
loader rows, Secure Boot included.
2026-10-02 23:58:16 -03:00
Daniel Hilst 0682d56de6 Merge master into fix/remove-xcat-genesis-builder
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 09:03:27 -03:00
Daniel Hilst 056a57f087 Merge branch 'master' into feature/openeuler-lts 2026-09-30 17:50:25 -03:00
Daniel Hilst 31c9f3bd26 Merge pull request #7824 from VersatusHPC/feat/support-matrix-distro-versions
docs(xcat-core): Specify distro vs arch versions in support matrix
2026-09-29 11:50:42 -03:00
Vinícius Ferrão 63cf366b96 Merge master into feature/openeuler-lts 2026-09-29 00:01:05 -03:00
Daniel Hilst 2c7a6f0786 docs(xcat-core): the release table stops at 2.18.0
The release information page lists every release up to 2.18.0. 2.18.2,
2.19.0 and 2.19.1 are published and absent from it, so a reader cannot
tell from the documentation which releases exist, when each one shipped,
or where its notes are.

docs/source/overview/_files/2.19.x.csv is new and holds the 2.19.0 and
2.19.1 rows, xcat2_release.rst gains its section above 2.18.x, and
2.18.x.csv gains the 2.18.2 row. Each date is the date of that release
on GitHub. 2.18.1 has no GitHub release of its own, so it has no row.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-25 18:15:17 -03:00
Daniel Hilst 4fa1f2545a docs(developers): published .repo files name their series
The release checklist said that the published .repo files point at
latest. latest is a link into the newest series, so a file that names
it gives the next series to users of this one as soon as that series
ships. Each file under repos/yum/X.Y/ now names repos/yum/X.Y/, and the
installation check uses the files as published.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-25 18:15:17 -03:00
Daniel Hilst 733bc3219c docs(xcat-core): the documentation title names 2.17.0
Read the Docs takes the version in the title of each page from release
in docs/source/conf.py, which was last set for 2.17.0. Every build
since, 2.18.x and 2.19.0 included, is titled "xCAT 2.17.0
documentation". Set it to 2.20.0, the Version of master.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-25 18:15:17 -03:00
Daniel Hilst ba8233a605 docs(xcat-core): the support matrix omits openEuler
xcat2/xcat-core#7864 adds openEuler 20.03 LTS SP4, 22.03 LTS SP4 and
24.03 LTS SP4 on x86_64, for the management node, service nodes and
stateful and stateless compute nodes. The support matrix does not list
openEuler at all.

Add one row per release, x86_64 only, and say which node roles the
support covers. Widen the Version column to fit the release names.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-25 08:44:02 -03:00
Vinícius Ferrão 463eca19e5 Merge master into feature/openeuler-lts 2026-09-25 01:41:02 -03:00
Daniel Hilst c87fec574b Merge master into fix/remove-xcat-genesis-builder
Master merged #7835, which changed the Genesis base files under
xCAT-genesis-builder/, the directory this branch removes. The merge
keeps master's content at this branch's paths:

- GenesisBuildRoot.pm, genesis_payload_verification.t and
  genesis_ubuntu_build_root.t take master's newer versions, pointed at
  xCAT-genesis-base/.
- verify-genesis-payload and GenesisPayload.pm are identical on both
  sides; the copies at the old path are dropped.
- buildrpms.pl keeps stage_genesis_base_sources(), which already stages
  what master added inline.
- builddebs.pl and the new genesis_deb_per_codename.t now use
  xCAT-genesis-base/.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 22:16:30 -03:00
Daniel Hilst 4ed029ffce Merge pull request #7835 from VersatusHPC/fix/ubuntu-genesis-native-sbuild
fix(xcat-core): the Ubuntu Genesis image is built from the build host kernel
2026-09-24 19:24:23 -03:00
Daniel Hilst e1e48a485d Merge master into fix/remove-xcat-genesis-builder
Master fixed debuild-xcat-genesis-base and added a bats test for it. The
branch deleted that script as unused. The merge keeps the script and
moves it to xCAT-genesis-base with the other Genesis base files.

Master also stages verify-genesis-payload for the spec %install check.
stage_genesis_base_sources() now stages it too, and
genesis_base_sources_staged.t expects it in the tarball.

The workflow, builds.rst and xcat_probe_package_payload.t take the
master version.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 16:42:35 -03:00
Daniel Hilst b72fd46366 Merge pull request #7851 from VersatusHPC/fix/updatenode-xcatpost-cleanup
fix(xcatdsklspost): updatenode leaves /xcatpost populated when site.cleanupdiskfullxcatpost is set
2026-09-24 10:21:49 -03:00
Vinícius Ferrão e654de5c4a docs(developers): describe branches, backports and the release checklist
The project had no written release process, and the 2.18 and 2.19
releases missed steps: the release table in the documentation, the
docs version, signed tags, and the wiki and website index pages.

A new Releases section describes the branch and version model, the
label and milestone that each pull request needs, and a checklist for
release candidates, publishing, the signed tag, the GitHub release, the
release notes, the website and the announcement. The build hosts, the
signing key and the publish procedure stay in the private repository of
the maintainers.
2026-09-23 18:40:49 -03:00
Vinícius Ferrão 16b6acf620 fix(openeuler): integrate current Genesis and installer changes
Merge current master into the openEuler support branch. Keep native
kernel, DHCP, locale and timezone requirements with the upstream payload
verifier and EL10 package paths. Preserve signed openEuler installation.

Update the native fixtures to check the merged payload contract.
2026-09-22 19:45:05 -03:00
Vinícius Ferrão 880b10216e docs(openeuler): record qualified network settings 2026-09-22 02:51:34 -03:00
Vinícius Ferrão d9d8a0d809 docs(openeuler): finish qualified deployment profiles 2026-09-21 21:36:08 -03:00
Vinícius Ferrão c0c8456ef1 docs(openeuler): define the delivery qualification baseline 2026-09-21 18:46:14 -03:00
Vinícius Ferrão 4f0ef5ef96 docs(openeuler): describe native deployment profiles 2026-09-19 05:45:09 -03:00