2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 08:52:15 +00:00
Commit Graph

2261 Commits

Author SHA1 Message Date
Daniel Hilst 2eb12d2c27 fix(xcat-core): a BMC cannot be given an IPv6 address
When ipmi.bmc is an IPv6 address, bmcconfig finds no network for it and
Genesis leaves the BMC unconfigured. bmcsetup only writes IPv4 LAN
parameters.

bmc_net_params now accepts an IPv6 address, or a name that resolves only
to one, and returns the prefix length, the gateway and the prefix of the
networks row that contains it. bmcconfig sends the prefix as
routerprefix. bmcsetup writes the address with "ipmitool lan6 set
static_addr" and, when there is a gateway, a static router. A name with
an IPv4 address keeps the IPv4 setup.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-10 14:19:50 -03:00
Daniel Hilst 150d820300 fix(xcat-core): makehosts keeps the old line of a node moved to IPv6
After chdef <node> ip=<IPv6> and makehosts <node>, /etc/hosts held the
old IPv4 line and the new IPv6 line of the node. node_address_family
answers 4 for such a node, so nodeset rendered ip=dhcp and an IPv4
kickstart with no warning.

addnode matches a node name only against lines of the family it writes,
which keeps both lines of a dual-stack node. When makehosts writes
hosts.ip and the node has no line of that family, the address moved to
the other family. addnode now replaces the old line in that case. A
node with a line of each family keeps both, and makehosts -m is
unchanged. ipv6_provisioning.rst says how to move a dual-stack node to
IPv6 only.

makehosts_family_change.t fails 3 of 6 assertions without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-10 07:23:29 -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 1b91c188ce Merge pull request #8018 from VersatusHPC/fix/ubuntu-genimage-boot-files
fix(genimage): publish the kernel and ramdisks together
2026-11-06 17:17:10 -03:00
Daniel Hilst efb8e81cb3 Merge pull request #7996 from VersatusHPC/fix/xcattest-table-value-class
fix(xcattest): a [Table_*] value stops at its first colon or slash
2026-11-06 16:28:35 -03:00
Vinícius Ferrão cec5fd2557 docs(genimage): require the image lock for boot file publication 2026-11-06 15:32:09 -03:00
Vinícius Ferrão 4fc0d3e211 docs(genimage): describe how genimage builds and publishes boot files
The page also names the genimage scripts that do not follow the rules
yet.
2026-11-06 15:10:27 -03:00
Daniel Hilst d74285f4a2 fix(xcat-core): an EL 8 or EL 9 IPv6-only node installs with a DHCPv6 address that holds no reservation
An IPv6-only EL 8 or EL 9 node presents a different DHCPv6 DUID at each boot
stage: the UEFI firmware, then iPXE, then anaconda. makedhcp reserves the
first two, so the installer takes an address from the dynamic range and every
step that reads the reserved address or its PTR record fails.

xCAT::SvrUtils::uses_static_ipv6_boot accepted the rh family only at major 10,
so Template.pm rendered "dhcp --noipv4 --ipv6=dhcp" for EL 8 and EL 9. The
floor is now 8, by operator decision of 2026-11-05.

pre.rhels8 was IPv4 only in two places. The install monitor opened an AF_INET
socket, so the node reported no status. The install server was cut out of its
URL at the first colon, which splits an IPv6 literal. Both forms come from
pre.rhels10. pre.openeuler includes pre.rhels8 whole, so this also fixes the
reported openEuler defect.

ipv6_pre_rhels8.bats and the EL 8 and EL 9 cases of template_ipv6_rendering.t
capture it. With AF_UNSPEC back to AF_INET the three IPv6 monitor cases fail
and the IPv4 one passes. Without the bracket branch the three IPv6 URL cases
fail and the four IPv4 ones pass. With the floor back at 10 the EL 8 and EL 9
rendering cases fail and the EL 10 ones pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 16:31:41 -03:00
Daniel Hilst d45db7a6e4 Merge pull request #8010 from VersatusHPC/docs/mixed-cluster-build-node-perl
docs(mixed-cluster): copy the xCAT Perl library to the image build node
2026-11-05 15:59:48 -03:00
Daniel Hilst d4f080ce77 Merge pull request #8004 from VersatusHPC/fix/ubuntu-subiquity-install-disk
fix(ubuntu): apply partitionfile entries on Subiquity installs
2026-11-05 15:58:54 -03:00
Daniel Hilst ac4a63d67d Merge pull request #8003 from VersatusHPC/docs/riscv64-ubuntu-support-matrix
docs(support-matrix): list Ubuntu 24.04 and 26.04 on riscv64
2026-11-05 15:58:11 -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 bc2be657b6 fix(xcat-core): a ppc64le node is reserved for a DHCPv6 identifier its firmware never sends
SLOF, the open firmware of a PowerKVM guest and a PowerVM LPAR, identifies
itself with an RFC 3315 DUID-LL built from the MAC of its interface, and it
reports no UUID at all. makedhcp derives every DHCPv6 reservation from
vpd.uuid, so the reservation of a ppc64le node can never match: measured on an
IPv6-only node, SLOF sent 00:03:00:01:<mac> against the 00:04:<uuid>
reservation xCAT wrote. The node gets no reserved address and no RFC 5970
option 59, and its firmware has nothing to load.

dhcp6_client_duid now takes the MAC and the architecture. kea_duid_ll_from_mac
builds the DUID-LL from the first address of mac.mac, which is the interface
that netboots, and dhcp6_firmware_duid_is_link_layer says which architectures
send one. A ppc64le node takes the DUID-LL with no attribute set, and the
byte-order warning about vpd.uuid is not reported for it, because that firmware
does not read the value. mac.duid gains ll, which selects the DUID-LL on any
architecture. firmware and canonical are unchanged and still override.

One reservation covers the whole netboot: the grub2 ieee1275 network stack
builds its DUID from the same interface, so the loader sends what the firmware
sent. That is why no second reservation is written, unlike a chainloading UEFI
node.

dhcp_dhcpv6_duid.t gains five cases. On the unfixed tree 15 of its 195
assertions fail, cn11 with the firmware-order DUID-UUID where the DUID-LL is
expected. A mutation that gives every architecture the DUID-LL fails 42,
naming the x86_64 cases that must keep the DUID-UUID.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-03 19:32:00 -03:00
Vinícius Ferrão 00fb5843cf docs(ubuntu): describe partitionfile on Subiquity installs
State that on Subiquity installs the partition definition file or script
provides a curtin storage section that replaces the default layout, that
a layout without a match is restricted to the disk a disk entry selects,
that a failed layout or disk entry stops the install, that the first disk
of a disk file is used, and that a disk script runs in the live installer
under dash. Name the file that the disk file and the disk script write as
/tmp/xcat.install_disk, which both Ubuntu installers read, instead of
/tmp/install_disk.
2026-11-03 17:53:21 -03:00
Vinícius Ferrão e95818d928 docs(openeuler): say that copycds refuses mixed riscv64 builds
The openEuler guide now says that copycds refuses to copy the RVA20 and
RVA23 builds of a release over each other, and that -p copies the second
build to another directory.
2026-11-02 19:55:57 -03:00
Vinícius Ferrão da5aea54f5 docs(openeuler): list riscv64 compute nodes
List openEuler 24.03 LTS SP4 on riscv64 in the openEuler guide, the
riscv64 guide and the support matrix. The scope is installed and stateless
compute nodes from the RVA23 media. riscv64 management and service nodes
stay out, because xCAT publishes no openEuler riscv64 packages.

The openEuler guide also says to import the openEuler key on the genimage
build host. A new installation has no key in its RPM keyring.
2026-11-02 17:49:23 -03:00
Daniel Hilst b195fea1a7 fix(yaboot): a dual-stack node is linked to a boot configuration name no firmware asks for
yaboot links its configuration file to one name for each address of the node in
the mac table. The name is sprintf("%02x%02x%02x%02x", split(/\./, $ip)), and an
IPv6 address has no four octets: sprintf reads the first field as a number and
fills the rest with zeroes, so 2001:db8:156::10 gives 7d1000000. A dual-stack
node got one correct link and one link to a name no firmware requests, with no
warning. getipaddr returns the IPv6 address first on such a node, so this is
reachable without an IPv6-only network.

yaboot_config_name returns a name only for an address with four octets in range,
and the loop passes over anything else. A node that produced no name at all is
reported with what to use instead, rather than reporting success.

The error for a node with no facing address and no service node interpolated
$myname, which is declared in the branch above it and not in that one. The file
has no "use strict", so the message read ": " and the name of the management node
was lost. It now determines the name where it uses it.

This commit no longer routes the facing address by family. yaboot is reachable
only at osarch=ppc64 with RHEL earlier than 7 or SLES earlier than 11.4, and the
support matrix carries no ppc64 column, so there is no supported configuration
whose yaboot node could be IPv6-only. petitboot keeps that work, because
nodediscover selects it for PowerNV and noderes.5 documents it for bare-metal
ppc64le.

yaboot_config_name.t covers the guard. Removing it fails the four name checks and
leaves the two IPv4 checks passing, which tells the defect apart from a test that
dies.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-31 09:07:37 -03:00
Daniel Hilst 9804168ca9 Merge upstream master into feat/ipv6
Integration test of the 51 commits that landed on upstream master after this
branch was built. Four conflicts, all from edits to the same lines:

perl-XCAT/xCAT/BootUtils.pm: both sides add a new sub at the end of the file.
Master adds expand_node_template, this branch adds grub2_kernel_commands and
grub2_image_provides. All three are kept.

xCAT/xCAT.spec and xCATsn/xCATsn.spec: master wraps the chrony and dhcpd
requirements in a suse_version test, and its %endif lands on the line this
branch uses for radvd. The requirement stays outside the test, because an
openSUSE management node writes radvd.conf too.

xCAT-server/xCAT-server.spec: master's openSUSE requirement list is a superset
of this branch's, so master's is taken whole.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-31 08:55:22 -03:00
Vinícius Ferrão 2b8eb6a5fd docs(mixed-cluster): copy the xCAT Perl library to the image build node
genimage loads the xCAT Perl library and the Perl modules it uses. The
procedure that builds an image on a node of the target architecture
copied only /opt/xcat/share/xcat/netboot, so genimage stopped with
"Can't locate xCAT/SvrUtils.pm".

The procedure now also copies /opt/xcat/lib/perl and installs the Perl
modules. EL7 packages Digest::SHA and Sys::Syslog apart from perl, so
the command names them.
2026-10-30 17:43:41 -03:00
Vinícius Ferrão 3c85a7180c docs(support-matrix): list Ubuntu 24.04 and 26.04 on riscv64
The overview support matrix marked Ubuntu unsupported on riscv64 and limited
riscv64 support to EL 10. The riscv64 guide and the mixed cluster support
matrix document Ubuntu 24.04 and 26.04 riscv64 management and compute nodes,
and the xcat-core and xcat-dep apt repositories index riscv64 for both
releases. Mark both releases supported on riscv64 and name Ubuntu in the
riscv64 note.
2026-10-29 22:03:30 -03:00
Daniel Hilst 1d148d1847 Merge branch 'master' into fix/xcattest-table-value-class
No conflicts. master gained #7990, #7979 and #7977 after the previous merge.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 15:01:18 -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 9f4a296310 Merge branch 'master' into fix/xcattest-table-value-class
xCAT-server/lib/xcat/plugins/anaconda.pm conflicted in the module
imports: this branch adds "use xCAT::MediaPerms" and master adds
"use xCAT::SELinux" on the same line. Both imports are kept. The two
modules are used in different subs, and no other hunk conflicted.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:45:55 -03:00
Daniel Hilst e1a36fd5b5 docs(networks): IPv6 provisioning has no admin documentation
The IPv6 provisioning support has no page in the admin guide, so two
requirements that a cluster cannot work without are only visible in the code.
Only netboot=grub2, grub2-http and grub2-tftp get a bootfile-url in a DHCPv6
reservation, and the grub2 image under /tftpboot/boot/grub2 is not signed, so
firmware that enforces Secure Boot downloads it and refuses to start it.

The page states both requirements, how xCAT predicts the DHCPv6 client
identifier from vpd.uuid, what the configdhcpv6duid postscript does, and the
static address that nodeset puts on the kernel command line.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-28 02:11:09 -03:00
Daniel Hilst 2811c2761d fix(xcat-core): the byte-order warning cannot be silenced, and a delete keeps one family
makedhcp reported a vpd.uuid that looks byte-swapped for duid=firmware and duid=canonical as
well as for a node with no duid attribute. Setting duid is the remedy the message names, so the
message could not be silenced except by a literal DUID. The check reads the version field, which
also reports a UUID that does not follow RFC 4122. It is now reported only for a node with no
duid attribute, and makedhcp.8 says so.

delnode removed only the lines of the family of the address it was given. A node whose address
changed from IPv4 to IPv6 kept its old A record, and makedhcp then wrote a DHCPv4 reservation
with a boot file for a node whose only address was IPv6. The family filter stays on the update
path, which is what keeps both records of a dual-stack node.

dhcp_dhcpv6_duid.t asserts that each duid value silences the report and that the default still
makes it. makehosts_dual_stack.t asserts a family change followed by a delete. Reverting either
fix fails exactly one assertion in each file.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-27 10:12:58 -03:00
Vinícius Ferrão a2eaa50a7c docs(netboot): explain standalone Debian source copies 2026-10-26 18:29:45 -03:00
Daniel Hilst b49ff5aaec Merge remote-tracking branch 'origin/fix/ipv6-duid-collisions' into feat/ipv6 2026-10-26 17:56:24 -03:00
Daniel Hilst 6cdc48b595 fix(xcat-core): nothing reports a vpd.uuid left in the old byte order
Before this work xCAT stored vpd.uuid with its first three fields swapped for
nodes from Genesis discovery and for KVM guests from mkvm, clonevm and rscan.
vpd.uuid now holds the UUID that the operating system reports, and no row is
migrated. makedhcp swaps such a row a second time, so the DUID it reserves the
address for is the canonical order of the real UUID, which no client sends. The
node then gets no lease and makedhcp reports nothing. Until now the problem was
only described in makedhcp.8.pod.

A row cannot be rewritten, because nothing tells which spelling it holds. So
makedhcp reports instead. The new dhcp6_uuid_looks_byte_swapped reads the RFC
4122 version field: a swap of the first three fields moves it from the first
nibble of the third field to the third nibble, and moves nothing else. A value
whose version is valid only in the swapped position is therefore a row to look
at. dhcp6_client_duid returns the message as a third value, and addnode6 and
kea_node_reservations6 report it once for the node. Neither changes the value or
the reservation.

What the check cannot know: a swap leaves a valid version in the first field
about half the time, so it misses those rows. It also cannot read the UUID that
the node holds, so a node with a non-conformant firmware UUID can be reported
for nothing.

dhcp_dhcpv6_duid.t adds node cn10 and a block that holds down the detection, the
double swap, and the remedy the message gives. Reading the swapped version from
nibble 15 instead of 14 fails exactly the four assertions that name the report,
and leaves green the five that hold the limits of the check and the four that
hold the DUID values.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 17:43:36 -03:00
Daniel Hilst 587bbaabb3 fix(xcat-core): every PowerKVM node from nodeimport gets the same DHCPv6 DUID
nodeimport writes '00000000-0000-0000-0000-000000000000' to vpd.uuid for every
PowerKVM node it creates (profilednodes.pm). That value is 32 valid hexadecimal
digits, so kea_duid_from_uuid builds a DUID from it and returns
00:04:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 for all of them. makedhcp
then keeps the reservation of the node it wrote last and reports nothing.

kea_duid_from_uuid now refuses the nil UUID, which it reads through the new
dhcp6_uuid_is_placeholder. A node whose vpd.uuid is the nil UUID is treated like
a node with no vpd.uuid: with Kea DHCP the reservation falls back to the MAC
address of the node, and with ISC DHCP addnode6 skips the node and names the
reason. addnode6 carries a third message for the nil UUID, because the existing
'vpd.uuid is not a UUID.' is false for a value of the right form.

The all-f UUID is left alone. Nothing in the tree writes it, and RFC 4122 names
only the nil UUID.

dhcp_dhcpv6_duid.t adds node cn09 and a block for two PowerKVM nodes. Dropping
the one new line from kea_duid_from_uuid fails 15 assertions, among them 'two
nodes with the nil vpd.uuid keep one reservation each', while the three
neighbours that hold the limits of the check stay green.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 17:43:20 -03:00
Daniel Hilst 40178d4f08 fix(xcat-core): esx.pm writes vpd.uuid with two opposite conventions
vpd.uuid holds the UUID that the guest operating system reports, and makedhcp derives the
DHCPv6 DUID of a node from it. esx.pm uses two opposite conventions for the same column. The
clone callback stores config.uuid unchanged, while mkvm and rinv swap the first three fields.
One of the two is always wrong, so a VMware guest gets a dynamicrange address with no
bootfile-url and does not boot over IPv6, and rinv prints a UUID the guest does not report.

Neither convention is right on its own. VMware writes uuid.bios into the SMBIOS type 1
structure unencoded and only the version of the entry point changes. Measured on ESXi 7.0.3,
8.0.3 and 9.1.0: EFI firmware gives SMBIOS 2.7 at every hardware version, and BIOS firmware
gives 2.4 up to hardware version 11 and 2.7 from hardware version 12. A 2.7 guest reports the
first three fields swapped, and a 2.4 guest reports them unchanged.

xCAT::VMCommon::esx_guest_uuid takes the UUID, config.firmware and config.version and returns
the UUID on the other side. inv and clone_task_callback read both properties from the VM view.
build_cfgspec learns them from the firmware and virtualHW.version keys of vm.othersettings,
which xCAT::VMCommon::esx_vmx_settings now passes to vSphere as fields of the
VirtualMachineConfigSpec, because extraConfig does not apply them.

xCAT-test/unit/esx_vm_uuid.t pins every row of the measurement with literal UUID strings, and
the DUID that kea_duid_from_uuid then derives for a UEFI guest against the DUID that its
firmware sent. A mutation that drops the SMBIOS 2.4 branch fails the 6 assertions that name a
BIOS guest at hardware version 8 or 11 and leaves the other 56 passing. A mutation that stops
converting an EFI guest fails the 24 assertions that name one and leaves 38 passing.

No ESXi host exists in the lab, so the change is not validated end to end.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 17:40:41 -03:00
Vinícius Ferrão 6e799f7aa1 docs(dhcp): describe the DHCPv6 client identifier of a node
Add the duid attribute to the mac table, node and group reference pages,
and describe in makedhcp(8) which DHCPv6 client identifier a reservation
matches and how the duid attribute selects it.

The vpd.uuid description and makedhcp(8) now say that vpd.uuid holds
the system UUID that the operating system reports, and what to do for
a node whose vpd.uuid Genesis discovery, mkvm or rscan stored with the
first three fields swapped.

(cherry picked from commit 5f19a715345853e9236fbc455b4f834ded2e0bd4)
(cherry picked from commit ef9b17d6e5)
2026-10-26 15:27:23 -03:00
Vinícius Ferrão f05677d173 feat(ipv6): add EL10 IPv6-only provisioning support
An IPv6-only provisioning network cannot deploy a node. The discovery and
credential callbacks open IPv4 sockets, the kickstart and boot templates
render an IPv4 address into every endpoint, and makehosts drops an IPv6
value because hosts.pm gates on isIpv4addr.

NetworkUtils gains the address helpers the rest of the change uses:
format_host_port, parse_host_port and format_uri_host bracket an IPv6
literal, getNodeNetworkCfg6 reads the static IPv6 configuration of a node,
my_ip_facing_family selects the management-node address of one family,
getIPv6ReverseZone builds a nibble-aligned reverse zone, and
node_is_ipv6_only and ipv6_server_for_node answer the two questions the
plugins used to answer for themselves. credentials.pm opens the callback
socket through IO::Socket::INET6 when the modules are present and keeps the
IPv4 path when they are not. Template.pm and anaconda.pm render an IPv6
kickstart network line and bracketed endpoints. The postscripts and the
stateless xcatroot format every endpoint through the bracketing helpers.

xCAT-server requires perl-IO-Socket-INET6 and perl-Socket6 on EL, and
libio-socket-inet6-perl and libsocket6-perl on Debian.

(cherry picked from commits c0a69bb5a and caa8ca790)
Ported onto upstream master ee6b4f532. The two commits are folded because the
second refactors the first. Master is kept where it has a newer form of the
same thing: the getipaddr cache guard, the Kea control_socket_path helper, the
netboot method list, install_device_params, the modern_installer test and the
isValidIp validator, which replaces the isValidIPAddress this branch added.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3928c04507)
2026-10-26 15:27:08 -03:00
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 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 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