2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 17:32:15 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Hilst 2f1f5589b3 merge(xcat-core): take feat/secureboot-ipxe into releases/2.20.0-rc8
xcat2/xcat-core#7973. Merged clean.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 08:15:40 -03:00
Daniel Hilst 590437c812 merge(xcat-core): take feat/ipv6 into releases/2.20.0-rc8
xcat2/xcat-core#7998. Three files carry a semantic conflict, and all three take
the master side.

perl-xCAT/xCAT/KVMUtils.pm and xCAT-server/lib/xcat/plugins/kvm.pm keep master's
firmware_features and add_firmware_features. The two firmware APIs are mutually
exclusive, and the branch's with_firmware_features and secure_boot_request were a
second solution to one defect: a node that asks for firmware:efi states nothing,
so libvirt selects a firmware in its own order, and that order puts a Secure Boot
descriptor with enrolled keys first. xcat2/xcat-core#7973 fixes the same defect on
master's API, is approved, and is in this candidate, so the branch side is dropped
rather than carried beside it.

xCAT-test/unit/kvm_firmware_secureboot.t is removed with them. It calls
with_firmware_features and secure_boot_request, which no longer exist.
xCAT-test/unit/kvm_secureboot_firmware.t covers the surviving API.

xCAT-test/xcattest keeps master's xCAT::Test::Conf path. The branch routed conf
parsing through xCAT::Test::OS to quote a value carrying shell syntax, which the
IPv6 cells need for vmothersetting, and master already does this:
chdef_command quotes what the parser returns. xCAT::Test::OS stays in the tree and
xCAT-test/unit/xcattest_object_quoting.t still exercises it directly.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 08:15:29 -03:00
Daniel Hilst 04a1d6865a fix(kvm): a UEFI node without Secure Boot starts on a firmware that verifies what it boots
firmware_features returned no feature for a node whose vm.othersettings says
firmware:efi, so the domain stated nothing about Secure Boot. libvirt then runs
firmware autoselection and takes the descriptor of highest priority that fits
the guest. The descriptors are ordered by file name, and the first x86_64 one of
an EL 10 host is 30-edk2-ovmf-x64-sb-enrolled.json, so the node starts with
Secure Boot on and with keys enrolled. The firmware then refuses the unsigned
kernel the node netboots. The same node boots on a host whose first descriptor
is 50-edk2-ovmf-x64-nosb.json, because the order is host policy.

firmware_features now returns the secure-boot feature disabled for a UEFI guest
that does not ask for Secure Boot, which is the requirement libvirt filters the
descriptors by. It says nothing about enrolled-keys, which only a firmware with
secure-boot reads. A guest with no firmware still asks for no feature, because
libvirt refuses a <firmware> feature where no firmware autoselection runs.

kvm_secureboot_firmware.t covers both, and its four new checks fail without
this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 07:50:34 -03:00
Daniel Hilst b82597dec2 docs(xcat-core): the IPv6 and iPXE pages name grub2 as a workaround that cannot work
No package installs an x86_64 grub2 image. grub2-xcat ships powerpc-ieee1275, riscv64-efi and
aarch64-efi, and copycds publishes a grub2 image for riscv64 alone, so an x86_64 node set to
netboot=grub2 asks TFTP for a file that is not there.

The iPXE page told the reader to use netboot=grub2 on the Lenovo UEFI firmware that hangs on
iPXE v2.0.0. That page now records the limit with no x86_64 workaround.

The IPv6 page required Secure Boot off for every node. That is a grub2 constraint: ipxe-xcat
installs a Microsoft-signed shim, so an x86_64 node with netboot=ipxe boots with Secure Boot on.

The same page said nodeset writes the address on the kernel command line. That holds on EL 10,
on openEuler, on an Ubuntu diskless node and on SLES and openSUSE, each through a different
parameter, and not on EL 8, EL 9 or an Ubuntu diskful node. A table names the parameter and the
routine per family, and says that a family which keeps DHCPv6 needs the dynamic range.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:52:01 -03:00
Daniel Hilst 86b8bb96b4 docs(ipxe): the Secure Boot chapter does not say which distributions are supported
The chapter rules out ppc64le, aarch64 and riscv64, and says nothing about the
distribution. The shim chain is UEFI and distribution independent, so a reader
concludes that any distribution xCAT installs boots with Secure Boot on, and nothing
in the chapter contradicts it.

Operator decision, 2026-10-22: Secure Boot is Enterprise Linux and x86_64 for 2.20.
State it, and say what is measured rather than what is possible -- the mechanism does
work elsewhere, and that is exactly why the support claim has to be explicit.

The CI side carries the same scope: the Secure Boot case is named by the EL x86_64
leaves only, in xcat-core-ci-cd cells.tsv.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 13:11:08 -03:00
Daniel Hilst 2cd5c70ae7 docs(kvm): the Secure Boot documentation omits the keys and the rpower path
Two statements about this branch are narrower than the code.

Commit 1edcddab8 says a node with a machine type xCAT cannot judge
"failed at mkvm". firmware_machine_error is returned by build_xmldesc,
and makedom calls build_xmldesc for a node whose domain is not yet built,
so the refusal also reaches the rpower boot of that node. The POD of
firmware_machine_error now names both callers.

The Secure Boot section of the ipxe guide did not name
firmware:efi-secureboot at all. It now says what mkvm asks libvirt for,
why both the secure-boot feature and enrolled-keys are asked for, and
what a hypervisor without such a firmware answers.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 10:13:01 -03:00
Daniel Hilst 789913b001 docs(ipxe): say which kernels the ipxe path boots with Secure Boot on
The Secure Boot chapter described the shim that each kind of node uses
and did not say which of them boots. A reader took the MOK paragraph for
a supported procedure, and an operator configuring discovery found
nothing about Secure Boot at all.

The chapter now states what the path supports: a node with netboot=ipxe
boots the kernel of a distribution with Secure Boot on, for a disk
installation and for a netboot image. Genesis requires Secure Boot off on
the node, because xCAT-genesis-base ships its kernel unsigned and a shim
verifies a kernel only against the signature database of the firmware or
a key in the MOK list. That covers discovery, the Genesis shell and the
standby and runcmd destinies. The section on clients without a node
definition names the same requirement and links to it.

A site may still sign the Genesis kernel with its own key and enroll it
with mokutil. xCAT ships no key and no signature.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 06:52:12 -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
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