2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-22 02:12:16 +00:00
Commit Graph

29667 Commits

Author SHA1 Message Date
Daniel Hilst 175ac0ea0c Merge branch 'feat/ipv6' into releases/2.20.0-rc9 2026-11-08 06:48:34 -03:00
Daniel Hilst 5964501597 fix(xcat-core): a KVM node reserves its IPv6 address for the wrong byte order
makedhcp derived the DHCPv6 address reservation of a node from the byte swap of vpd.uuid, on the
grounds that EDK2 copies the SMBIOS UUID bytes into its DUID and SMBIOS stores the first three
fields little-endian. That holds for a physical node. For a KVM guest that xCAT defines it is
wrong: getNodeUUID writes the byte swap of vpd.uuid into the libvirt domain, qemu stores that
little-endian in SMBIOS, and the two swaps cancel, so the firmware of the guest sends vpd.uuid
unswapped.

Measured on xcat88-cn: the firmware and the OpenEmbedded Genesis image both sent
00:04:0c:3f:8d:41:... from vpd.uuid 0c3f8d41-6a52-4e7b-..., while iPXE sent the swap. The address
was reserved for the swap, so the image took an address from the dynamic range and xcatd could
not name it.

dhcp6_firmware_uuid_order reads nodehm.mgt and answers canonical for a kvm node and firmware for
any other, and dhcp6_client_duid uses it when the node sets no duid attribute. A node that names
an order itself is unchanged.

dhcp6_firmware_uuid_order.t covers the predicate. dhcp_dhcpv6_duid.t asserts that a kvm node
holds its address on the canonical order and that a node xCAT does not define keeps the swap.
Both fail with the predicate forced to one order.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 06:48:31 -03:00
Daniel Hilst 267e996ed7 Merge branch 'feat/ipv6' into releases/2.20.0-rc9 2026-11-08 06:17:48 -03:00
Daniel Hilst 5e1e3b0000 revert(xcat-core): a pool of one address cannot serve two IAs of one client
Reverts dd065ea99, 084f4a9ed and c84716b9d, which gave a node of several DHCPv6 clients a pool of
exactly its address, gated on a client class matching every DUID of the node.

Measured on xcat88-cn: Kea consumes a pool address per (DUID, IAID) pair. The firmware and the
OpenEmbedded Genesis image send the same DUID with different IAIDs, so the firmware took
2001:db8:188::20 and Genesis still fell through to the dynamic range at ::1002. The pool serves
whichever client solicits first and cannot serve both.

A host reservation applies to every IA of its client, so a reservation is what spans the firmware
and the image. The defect is which DUID holds the reservation, not that a reservation holds it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 06:17:28 -03:00
Daniel Hilst 4303f85640 Merge branch 'feat/ipv6' into releases/2.20.0-rc9 2026-11-08 06:11:18 -03:00
Daniel Hilst c84716b9db fix(xcat-core): the Genesis image gets a pool address and xCAT cannot name the node
A node solicits over DHCPv6 under more than one DUID, and kea_node_reservations6 reserved the
address for the first client only. The OpenEmbedded Genesis image sends the DUID-UUID in the
order the firmware sends, which is not that client, so it took an address from the dynamic range.
xcatd could not map the address to a node, Genesis reported CERTIFICATE_ACTION_FAILED with the
node unassigned, and discovery over IPv6 stopped there.

Which order the firmware sends is not the same on every platform. For a KVM guest getNodeUUID
writes the byte swap of vpd.uuid into the domain, and the firmware swaps those bytes back, so the
order the firmware sends is the one the code labels for iPXE.

makedhcp now gives a node of several clients a pool of exactly its address, gated on a client
class that matches every DUID of the node, and leaves the address out of the reservation: Kea
excludes a reserved address from every pool. The reservation still carries the hostname, on one
entry, because _reservation_matches treats a shared hostname as the same reservation. A node with
one client is unchanged and keeps its address in its reservation.

dhcp_dhcpv6_duid.t reads the address through the pool as well as the reservation. Without the
pool insertion its nine address assertions fail.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 06:11:04 -03:00
Daniel Hilst 084f4a9eda feat(xcat-core): match every DUID form of a node to one reserved IPv6 address
kea_node_address_class6 builds the Kea DHCPv6 client class that matches every DUID of one node,
and kea_node_address_pool6 builds the pool of exactly that node's address, gated on the class.
Together they give the address to whichever client solicits, so the address no longer depends on
which byte order the firmware of a platform sends.

A node with fewer than two DUID forms gets neither: its reservation holds the address by itself.

Kea excludes a reserved address from every pool, so makedhcp must stop writing the address into
the reservation of a node that uses this pool. That change is not here yet, and these routines
have no caller until it lands.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 06:02:19 -03:00
Daniel Hilst dd065ea99a test(xcat-core): one IPv6 address cannot reach every DHCPv6 client of a node
A node solicits under more than one DUID. Measured on 2026-11-08, the OpenEmbedded Genesis
image sends the DUID-UUID in the byte order the firmware sends, not the DUID-LL that
dhcp6_client_duid_list assumes. It matched the reservation of the node that holds no address,
took 2001:db8:188::1005 from the dynamic pool, and xcatd could not name it. Genesis reported
CERTIFICATE_ACTION_FAILED with the node unassigned.

A reservation holds the address for one identifier only. Kea refuses the same address on a
second reservation, and a hw-address reservation never matches because these packets carry no
hardware address. A client class can match every DUID form, and a pool of one address can be
gated on that class.

The test asks for kea_node_address_class6 and kea_node_address_pool6 and fails without them.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 06:02:18 -03:00
Daniel Hilst e2495c4811 Merge feat/ipv6 into releases/2.20.0-rc9
Comment-only: the reason a DUID byte order cannot name a boot stage.
2026-11-08 01:19:16 -03:00
Daniel Hilst 0c3cede440 docs(xcat-core): correct why a DUID byte order cannot name a DHCPv6 boot stage
The previous two commits said the firmware sends the uuid in RFC 4122 order and iPXE in SMBIOS
order, the opposite of a physical machine. That reads the measurement the wrong way round.

getNodeUUID in kvm.pm writes the libvirt domain uuid as the byte-swap of vpd.uuid, and swaps back
when it reports the value, so vpd.uuid is the uuid the guest reports. The firmware sends the
SMBIOS bytes of the domain uuid, which is vpd.uuid unswapped, and iPXE converts those to RFC 4122,
which is the swap. A node whose domain carries vpd.uuid unswapped gives the opposite pair. Both
orders are real, and neither follows from vpd.uuid alone.

The code does not change. The reason recorded in it does.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 01:19:12 -03:00
Daniel Hilst 970cf0fde1 Merge feat/ipv6 into releases/2.20.0-rc9
Carries the DHCPv6 boot-stage split on option 15. The firmware and the iPXE it loads send the
same vpd.uuid in two byte orders, and which client sends which order depends on the platform, so
the reservation of a chainloading node can no longer name a boot file.
2026-11-08 01:11:34 -03:00
Daniel Hilst 182f3d9ef2 fix(xcat-core): DHCPv6 gives the firmware an http boot file it cannot fetch
A UEFI node that chainloads solicits twice. dhcp6_client_duid_list labelled the SMBIOS
little-endian DUID-UUID 'firmware' and the RFC 4122 one 'ipxe', and kea_node_reservations6 wrote
the boot file of that stage into each reservation.

The byte order depends on how the platform stores its SMBIOS uuid, so it does not identify a boot
stage. On a QEMU UEFI node the pair arrives the other way round: the firmware matched the
reservation labelled 'ipxe' and was given an http:// URL, which a UEFI PXEv6 boot option cannot
fetch, and reported "PXE-E53: No boot filename received". iPXE matched the one labelled
'firmware', was given the shim a second time and stopped at "Failed to open ipxe.efi".

kea_node_boot_classes6 makes the split the DHCPv4 path makes with the iPXE feature sub-options of
option 175, using option 15, the DHCPv6 User Class: iPXE sends it holding iPXE and the firmware
does not send it at all. Each of the two classes matches every DUID of the node, so neither order
is assumed, and the tests are mutually exclusive. The reservations of a chainloading node now
carry no boot file, because Kea gives a reservation's option data precedence over a class's; they
keep their DUIDs, so an update or a delete after a change of netboot still finds every client.
The Genesis client keeps its own reservation and boot file.

dhcp6_boot_stage_classes.t went from 16 failures to none. The assertions in dhcp_dhcpv6_duid.t
that read a stage boot file out of a reservation now read it out of the class that serves it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 01:11:23 -03:00
Daniel Hilst cc5ee8f3fc test(xcat-core): capture the DHCPv6 boot stage that a DUID byte order cannot identify
A UEFI node that chainloads solicits twice, and makedhcp tells the two clients apart by the byte
order of the DUID-UUID. The order depends on how the platform stores its SMBIOS uuid, so it does
not identify a boot stage.

Measured on an EL10 management node with Kea DHCPv6 at DEBUG, one boot of a QEMU UEFI node sends
the opposite pair to the one the code assumes: the firmware solicits with 00:04:0c:3f:8d:41:... in
RFC 4122 order and no option 15, and iPXE with 00:04:41:8d:3f:0c:... in SMBIOS order and option 15
holding 00:04:69:50:58:45, the length-prefixed string iPXE.

This test asks for the split the DHCPv4 path already makes, on what the client reports rather than
on who it is. It fails on the current tree: kea_node_boot_classes6 and
dhcp6_ipxe_user_class_test do not exist, and every one of its 16 assertions is red.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 01:11:13 -03:00
Daniel Hilst c5ece4aebd Merge fix/selinux-cn-ipxe-bootcfg into releases/2.20.0-rc9
selinux_cn_diskless_disabled_by_design named three boot-configuration paths and
none of them is the iPXE node script, so the case failed on every cell whose
compute node is netboot=ipxe.
2026-11-07 20:15:40 -03:00
Daniel Hilst cdb8187cbc fix(xcat-test): the SELinux diskless case cannot find an iPXE node boot config
selinux_cn_diskless_disabled_by_design looks for the boot configuration of the
compute node in three places: the xnba node directory, pxelinux.cfg by node
name, and petitboot. A node with netboot=ipxe has its script in
/tftpboot/xcat/ipxe/nodes/<node>.uefi instead, which the list does not name, so
the case reports

  BOOTCFG-BAD: the node has no boot configuration
  BOOTCFG-BAD: no boot configuration carries selinux=0

and fails on every iPXE cell. xcat54-cn of el10-x86_64-devel is netboot=ipxe, so
build 78 of xcat-test-el10-x86_64 failed there after its other checks passed:
the node reported SELinux disabled and the case still could not confirm the flag
reached the boot configuration.

Both path lists now name the iPXE script, the UEFI one first, which is the file
a UEFI client fetches. nodeset/ipxe_secureboot_shim.sh already reads that path.

The paths stay absolute, so the check still fails when no boot configuration
carries selinux=0.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 20:15:32 -03:00
Daniel Hilst a5a8c5444c Merge feat/ipv6 into releases/2.20.0-rc9
Carries the imgserver fallback: it chose the address with my_ip_facing, which is
IPv4 only, so an IPv6-only node with no noderes.tftpserver was sent to fetch its
image from an address it has no route to.
2026-11-07 19:54:01 -03:00
Daniel Hilst cbfbbe12d7 fix(genesis): imgserver falls back to the IPv4 address of an IPv6-only node
The imgserver of the nodeset response takes noderes.tftpserver, then
noderes.xcatmaster, then site.master, and falls back to my_ip_facing. That
resolver is IPv4 only, and an IPv6-only node shares the link with the management
node, so the fallback answers with the IPv4 address and the node is sent to
fetch its image from an address it has no route to.

It now uses my_ip_facing_node, which picks the family from the node. InstUtils
and grub2 already make the same choice, each with its own ternary; this is the
third site and the first to use the shared helper.

The fallback is reached only when none of the three attributes is set, so a cell
that sets noderes.tftpserver was never affected.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:53:51 -03:00
Daniel Hilst 279e4de1f2 Merge feat/ipv6 into releases/2.20.0-rc9
Carries the xcatd= address family: destiny.pm chose the address with
my_ip_facing, which is IPv4 only, so an IPv6-only node fetched its Genesis
payload over IPv6 and was told to report to xcatd over IPv4.
2026-11-07 19:38:41 -03:00
Daniel Hilst 137bb9675b fix(genesis): the xcatd= argument names the IPv4 address of an IPv6-only node
my_ip_facing resolves the peer with OnlyV4, and an IPv6-only node shares the
link with the management node, so the call succeeds and returns the IPv4
address. destiny.pm wrote it into the xcatd= kernel argument, so Genesis
fetched its payload over IPv6 and was told to report over IPv4. The node holds
no IPv4 address once the network serves no IPv4 pool, and discovery never
completes.

NetworkUtils gains my_ip_facing_node, which picks the family from the node and
returns the same (error, value) pair as my_ip_facing, so callers read the result
unchanged. destiny.pm uses it for the genesis and legacy boot command lines.

xcatd_cmdline_address already brackets an IPv6 literal, so the argument reads
xcatd=[2001:db8:188::1]:3001 and the port stays separable from the address.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:38:18 -03:00
Daniel Hilst 7f2fdb6f87 test(genesis): the xcatd= argument names the IPv4 address of an IPv6-only node
destiny.pm chooses the address for the xcatd= kernel argument with my_ip_facing,
which resolves the peer with OnlyV4. An IPv6-only node shares the link with the
management node, so that call succeeds and answers with the IPv4 address.

Measured on xcat88-mn, whose compute node holds only 2001:db8:188::20:

  imgfetch -n kernel http://[2001:db8:188::1]/tftpboot/xcat/genesis.kernel.x86_64
  imgargs kernel ... xcatd=192.168.88.1:3001 destiny=shell

The payload is fetched over IPv6 and the node is then told to report over IPv4.
An IPv4 pool on the same network hid this. Without one the node holds no IPv4
address, so Genesis cannot reach xcatd and discovery never completes.

genesis_xcatd_address_family.t asserts that the resolver picks the family from
the node, that a resolver error travels rather than becoming a false address,
and that an IPv6 literal is bracketed in the argument. Five of its seven
assertions fail without the fix.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:38:18 -03:00
Daniel Hilst bd696e7689 Merge feat/ipv6 into releases/2.20.0-rc9
Carries the DHCPv6 boot-file gap: a client with no reservation was answered
with an address and no option 59, so a node being discovered over IPv6 had
nothing to boot and sequential discovery could not start.
2026-11-07 19:17:03 -03:00
Daniel Hilst 69737e20ff fix(dhcp): a DHCPv6 client with no reservation is told nothing to boot
A node that xCAT has not yet discovered has no DUID, so kea_node_reservations6
writes no reservation for it. Option 59, bootfile-url, is written only inside a
reservation, so Kea answers the node with an address from the dynamicrange and
no boot file. The node boots nothing, and sequential discovery over IPv6 cannot
start: xCAT learns the DUID from the Genesis image, and the image needs a boot
file to run.

DHCPv4 answers an unknown client from client classes keyed on option 93, the
client system architecture. RFC 5970 gives DHCPv6 the same registry in option
61 and the boot file URL in option 59, so the same shape applies. Two places
dropped it:

  render_dhcp6_config did not render client-classes, which render_dhcp4_config
  has always done. _render_subnet6 did not render the additional-class list,
  which _render_subnet4 renders.

Both now render them. kea_client_classes6 builds one class per architecture:
the signed iPXE shim for a UEFI x86_64 client when the loader is on disk, and
the grub2 loader for aarch64, riscv64 and ppc64. kea_subnet6_intent builds them
per network, because option 59 carries a server and that server is the
management node facing that network, and names them per subnet so two
provisioning networks cannot collide.

A node with a reservation keeps the boot file the reservation carries. The
classes answer only what no reservation matched.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:15:27 -03:00
Daniel Hilst 03129cf654 test(dhcp): a DHCPv6 client with no reservation is told nothing to boot
Sequential discovery over IPv6 starts with a node xCAT has never seen. It has
no DUID in the dhcp6duid table, so kea_node_reservations6 writes no reservation
for it, and option 59 (bootfile-url) is written only inside a reservation. The
subnet carries a dynamicrange, so Kea answers the node with an address and no
boot file.

Measured on xcat88-mn: an unknown client took 2001:db8:188::1000 from the pool,
and the running kea-dhcp6.conf held no client-classes at all.

dhcp6_boot_client_classes.t asserts that render_dhcp6_config carries
client-classes, that _render_subnet6 scopes a class to its subnet, and that the
class builder names a loader per architecture from option 61. Without the fix
10 of its 11 assertions fail.

dhcp_kea_plugin_intent.t gains four assertions on the wiring: that
kea_subnet6_intent carries the classes and evaluates them only for its own
subnet. Emptying the class list in kea_subnet6_intent fails those four and no
other test in the file.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:15:10 -03:00
Daniel Hilst c61f7e7a04 Merge upstream master into releases/2.20.0-rc9
Brings the upstream merges of #7973 (feat/secureboot-ipxe) and #7974
(fix/buildrpms-lock-recovery). Both branches' content was already carried on
rc8, so this records the upstream lineage and changes no file.
2026-11-07 19:07:33 -03:00
Daniel Hilst 460fbcd030 Merge pull request #7974 from VersatusHPC/fix/buildrpms-lock-recovery
fix(buildrpms): a lock directory left by a dead build is never broken
2026-11-07 14:05:58 -03:00
Daniel Hilst fad962223e Merge pull request #7973 from VersatusHPC/feat/secureboot-ipxe
feat(ipxe): boot a UEFI node with Secure Boot on
2026-11-07 14:05:23 -03:00
Daniel Hilst 8cf1615b24 fix(xcat-core): rpmbuild rejects four specs with %else after %else
xCAT-buildkit, xCAT-client, xCAT-test and xCAT-vlan each hold two %else
in the pod converter BuildRequires block, so rpmbuild -bs stops with
"%else after %else" and the EL core build fails for every architecture
before it can index a repository.

The feat/ipv6 merge produced the structure. Both sides rewrite the same
%if block, master as "%if 0%{?suse_version}" and feat/ipv6 as the
inverted "%if !0%{?suse_version}", and they touch different lines, so
git merged both bodies without a conflict.

This change keeps master's form and removes the second branch. The two
branches ask for the same package on the same condition, so no
BuildRequires changes.

spec_conditional_nesting.t reports all four files before this change and
none after.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 11:40:25 -03:00
Daniel Hilst 325da9b749 test(xcat-core): catch a malformed rpm conditional in a spec file
rpmbuild rejects a spec that holds two %else in one conditional, and
nothing in the tree checked for it. A merge where both sides rewrite the
same %if block can produce that structure with no git conflict, so the
fault reaches a build host instead of a test.

spec_conditional_nesting.t reads every *.spec in the tree and tracks the
%if / %else / %elif / %endif nesting in Perl. It reports a second %else,
an %elif after %else, a directive with no open conditional, and an
unterminated conditional. A probe at the end of the file confirms the
check itself reports a second %else.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 11:40:17 -03:00
Daniel Hilst 0b2e0a59ec merge(xcat-core): take fix/ubuntu-netboot-dracut-ng-systemd-initrd into releases/2.20.0-rc8
An Ubuntu 26.04 diskless node freezes in the initial ramdisk at 1.78 s with
'Failed to isolate default target: Unit rescue.service not found'. genimage writes an
exclusive dracutmodules list, dracut 110 drops 35network-legacy, so 11systemd-networkd is
selected, 80base then makes systemd the init, and the list names neither systemd-initrd nor
dracut-systemd, so there is no default target. rh/genimage already names those three for
dracut 105 and later.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 09:34:42 -03:00
Daniel Hilst 57e59f2577 fix(xcat-core): Ubuntu 26.04 diskless node freezes in the initial ramdisk
An Ubuntu 26.04 diskless compute node boots the netboot image and stops at

    systemd[1]: Failed to isolate default target: Unit rescue.service not found.
    systemd[1]: Freezing execution.

1.78 seconds into the kernel, which is the initial ramdisk and not the root
image. imgutils::dracut_netboot_modules returns "xcat nfs base network
kernel-modules" when the image holds no network-legacy module, and dracut
reads that list as the whole module set. dracut-ng, which resolute ships as
dracut 110, has no network-legacy module, so 40network selects
systemd-networkd, which depends on the systemd module. The base module
installs the shell /init only when systemd is out, so /init becomes systemd,
and the list names no systemd-initrd, so there is no initrd.target. systemd
falls back to rescue.target, whose rescue.service is also absent.

Name systemd, systemd-initrd and dracut-systemd as well, each one only when
the image holds it, and only for an image whose dracut has no network-legacy
module. The EL genimage names the same three for dracut 107 on el10. noble
keeps network-legacy and its dracut.conf does not change, so the 24.04 lists
that 9c311c894 gave dracut still build the ramdisk they build today.

xCAT-test/unit/imgutils_dracut_netboot_modules.t fails three of six
assertions without this commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 09:33:43 -03:00
Daniel Hilst 705d199c4b test(xcat-core): Ubuntu netboot dracut.conf names no systemd module
An Ubuntu 26.04 diskless node freezes in the initial ramdisk:

    systemd[1]: Failed to isolate default target: Unit rescue.service not found.
    systemd[1]: Freezing execution.

The netboot dracut.conf names an exclusive module list, "xcat nfs base
network kernel-modules". dracut-ng, which resolute ships as dracut 110,
removed the network-legacy module, so 40network selects systemd-networkd,
which depends on the systemd module. The base module then skips the shell
/init, and systemd becomes /init. The list names neither systemd-initrd nor
dracut-systemd, so the initial ramdisk holds no initrd.target.

Move the list into imgutils::dracut_netboot_modules, which takes the image
module directory and returns the list, and call it from both dracut.conf
writes in the Ubuntu genimage. The new
xCAT-test/unit/imgutils_dracut_netboot_modules.t holds the noble list down
and asks for the systemd modules on a dracut that has no network-legacy.
Three of its six assertions fail on this commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 09:33:15 -03:00
Daniel Hilst 8b2b514805 merge(xcat-core): take fix/selinux-diskless-bootcfg-check into releases/2.20.0-rc8
The case asserted rc == 0 on a grep -rhl over three per-node bootloader paths. GNU grep exits 2 for a file it cannot open and keeps that status even when it matched elsewhere, so only one bootloader writes a file per node and the case could never pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 09:19:56 -03:00
Daniel Hilst c9da3d594d merge(xcat-core): take fix/buildrpms-lock-recovery into releases/2.20.0-rc8
xcat2/xcat-core#7974. Merged clean.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 08:15:40 -03:00
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 6d08623aca test(kvm): a UEFI node without Secure Boot takes whichever firmware the host prefers
A node with vm.othersettings firmware:efi asks for UEFI and states nothing
about Secure Boot. libvirt then picks the firmware descriptor of highest
priority that fits the guest. On an EL 10 host the first x86_64 descriptor is
30-edk2-ovmf-x64-sb-enrolled.json, so that node starts with Secure Boot on and
with keys enrolled, and the firmware refuses its unsigned kernel. The same node
boots on another host, because descriptor priority is host policy.

The checks say firmware_features returns the secure-boot feature disabled for a
node that asks for UEFI alone, and no feature at all for a BIOS node, where
libvirt reads no feature.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 07:49:53 -03:00
Daniel Hilst a4dc879206 Merge branch 'master' into feat/secureboot-ipxe 2026-11-07 07:45:06 -03:00
Daniel Hilst 17c56cdc56 Merge pull request #7985 from VersatusHPC/fix/opensuse-core-pod-man-buildrequires
fix(xcat-core): the openSUSE core build has no Pod::Man, so pod conversion fails
2026-11-07 07:38:00 -03:00
Daniel Hilst be809100d4 Merge pull request #8012 from VersatusHPC/fix/ipmi-sdr-record-count
fix(ipmi): read the SDR record count as one 16-bit value
2026-11-07 07:37:39 -03:00
Daniel Hilst 502c0f15df Merge pull request #8014 from VersatusHPC/fix/kickstart-selinux-relabel
fix(install): run the SELinux relabel after the EL post scripts
2026-11-07 07:34:41 -03:00
Daniel Hilst f38c6cd33d fix(xcat-core): rinstall reports a nodeset failure although nodeset succeeded
rinstall prints "Failed to run 'nodeset' against the node: <node>" and returns
1, while nodeset against the same node exits 0 and reports no error. rinstall
returns before rnetboot and rpower, so the node is never powered on and every
provisioning case waits for a machine that nobody booted.

xCAT::Utils::runxcmd returns $::RUNCMD_RC. runxcmd_output ORs the errorcode of
each response into that global, and xCAT::Utils::runcmd and the service helpers
assign their own exit status to it, so the last command of any plugin in the
subrequest replaces the result. makedhcp supplies that command: its ISC branch
restarts dhcpd6 whenever /etc/dhcp/dhcpd6.conf is absent or written by another
program, which is every run of a cluster with no IPv6 network, and the restart
fails with no subnet to serve. A Kea cell restarts kea-dhcp6 only for a run
that has DHCPv6 work, so only ISC cells fail.

runxcmd now collects the errorcodes in $::xcmd_errorcode and assigns that to
$::RUNCMD_RC after the subrequest, so a command of the subrequest can neither
set nor clear the result. dhcp6_restart_needed restarts dhcpd6 only for a run
that serves an IPv6 network.

runxcmd_subrequest_errorcode.t and dhcp_isc_dhcp6_restart.t fail on the parent
commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 07:22:32 -03:00
Daniel Hilst b999334d1a test(xcat-core): a nodeset subrequest reports a command it never ran
rinstall prints "Failed to run 'nodeset' against the node" while nodeset
succeeds and reports no error. xCAT::Utils::runxcmd returns $::RUNCMD_RC, and
xCAT::Utils::runcmd and the service helpers of every plugin inside the
subrequest assign to that global, so the status of the last command of the
subrequest becomes the status of the subrequest. makedhcp supplies that
command: the ISC branch restarts dhcpd6 whenever /etc/dhcp/dhcpd6.conf is
absent or foreign, which is every run of a cluster with no IPv6 network, and
the restart fails because dhcpd6 has no subnet to serve.

runxcmd_subrequest_errorcode.t holds the result of a subrequest to the
errorcode of its responses. dhcp_isc_dhcp6_restart.t holds the restart of
dhcpd6 to a run that serves an IPv6 network. The condition moves out of
dhcp.pm into xCAT::DHCP::Backend::ISC unchanged, so that a test can read it.

Against this tree the first test fails 3 of its 5 assertions and the second
fails 1 of its 4.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 07:18:31 -03:00
Daniel Hilst a89fe164c2 Merge branch 'master' into fix/kickstart-selinux-relabel 2026-11-07 06:44:02 -03:00
Daniel Hilst 64f9bc1d20 Merge pull request #8015 from VersatusHPC/fix/kickstart-bmc-usb-nic
fix(install): leave the USB NIC of the BMC down on installed EL nodes
2026-11-07 06:33:47 -03:00
Vinícius Ferrão c3c466c9a0 test(install): leave the USB NIC of the BMC down on installed EL nodes
The rendered post.rhels8, run in a sandbox with a fixture sysfs, must turn
on the PCI NICs with link, a USB Ethernet adapter with its own driver,
and a NIC with no sysfs entry, and leave a cdc_ether NIC with link down.
When only the cdc_ether NIC has link, it must fall back to the
connections active in the installer.
2026-11-07 00:59:02 -03:00
Vinícius Ferrão 63bd36cfd4 fix(install): leave the USB NIC of the BMC down on installed EL nodes
post.rhels8 turns on every NIC that has link during the installation.
The USB NIC of a BMC host interface always has link, so the installed
node starts DHCP on it at boot, gets no lease, and
NetworkManager-wait-online fails.

post.rhels8 now skips NICs bound to a USB class driver: cdc_ether,
cdc_ncm, cdc_eem or rndis_host, which Linux binds to the USB gadget of a
BMC. USB Ethernet adapters with their own driver, the other NICs with
link, and NICs without a sysfs entry come up as before.
2026-11-07 00:59:01 -03:00
Daniel Hilst a695723541 Merge pull request #8006 from VersatusHPC/fix/el-kickstart-pre-log
fix(install): copy the kickstart pre-install log from the installer
2026-11-07 00:54:01 -03:00
Daniel Hilst 03b0439bb8 Merge pull request #8016 from VersatusHPC/fix/netboot-nm-lease-handoff
fix(netboot): hand the NetworkManager lease of the initrd to diskless roots
2026-11-07 00:46:35 -03:00
Vinícius Ferrão 568db90972 test(install): cover the kickstart pre-install log handoff
Run the rendered %post --nochroot blocks of each kickstart template
whose %pre writes /tmp/pre-install.log the way anaconda runs them: in
the installer, with its own /tmp and the installed system at
/mnt/sysimage. Each run must append the log to a new or an existing
xcat.log. The riscv64 profile test now keeps the installer's /tmp out
of the installed root too. Both fail on the old templates, whose chroot
%post reads a /tmp that does not hold the log.

Run the new test in the profile artifact job.
2026-11-06 23:10:32 -03:00