Sequential discovery over IPv6 matched the pool node and then failed
with "No nic found in deploy network for seqdisc1". NetworkManager
installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as
2001:db8:188::1004/128. hosttag_for_ipv6_nic masked both addresses with
that prefix length, and a /128 never matches the address of the node.
For a /128, hosttag_for_ipv6_nic now takes the network from the IPv6
rows of the networks table, which nodediscover reads once per request
through the new ipv6_networks. discovery_hosttag_ipv6_nic.t fails
without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On xcat88-mn the findme from the OpenEmbedded Genesis reached xcatd
over IPv6 and seqdiscovery matched seqdisc1, then zzzdiscovery failed
with "No nic found in deploy network for seqdisc1". NetworkManager
installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as
2001:db8:188::1004/128. hosttag_for_ipv6_nic masks both addresses with
that prefix length, and a /128 never matches the address of the node.
The test asserts that a /128 lease inside an xCAT IPv6 network of the
node is the node itself. It fails today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
seq_discovery_ipv6 clears mac= on the compute node and runs makedhcp,
so the node is unknown and sends a findme. kea_node_reservations6
drops the reservation of a node with no MAC, but
kea_node_boot_classes6_for_nodes still writes the two per-node classes,
which match the DUID. On xcat88-cn iPXE took a pool address and still
fetched nodes/xcat88-cn.uefi, Genesis booted with destiny=shell, and
xcatd never ran sequential discovery.
The test clears the MAC of an ipxe node and asserts that it gets no
reservation and no boot class. The class assertion fails today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedns on a dual-stack or IPv6-only cluster fails in six places:
- a node in an IPv6 network whose prefix is not a multiple of 4 makes
get_reverse_zones_for_entity die, and makedns stops;
- the reverse walk asks the resolver for the NS of ip6.arpa. and arpa.,
because its stop list matches only upper case;
- a node whose hosts.ip is IPv4 gets an AAAA but no PTR for its IPv6
address;
- site.dnsinterfaces does not replace "listen-on-v6 port 53 { ::1; };"
of the EL named.conf, so named stays on ::1;
- site.dnsupdaters is written after the allow-update block of a new
zone, which named rejects;
- hosts.otherinterfaces and nics.nicips with the ":" separator cut an
IPv6 address at its first colon.
ddns_ipv6_records.t runs each routine and reads the records, the
named.conf or the host entries it produced. These checks fail on this
commit and pass with the fixes that follow.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
nodediscover.pm decides two things with IPv4-only code, and sequential discovery
over IPv6 stops at each of them.
It gates the MAC record on inet_aton($node), so a node whose only address is
IPv6 fails and process_request returns "Can not resolve IP for the matching
node". update_discovery_data runs after every such early return, so no
discoverydata row is written and makedhcp never runs. Measured on xcat88-mn:
tabdump discoverydata empty after a full seq_discovery_ipv6 run.
It then matches a NIC behind if ($ip =~ /\d+\.\d+\.\d+\.\d+/). The OpenEmbedded
image sends address=${ipv4_address:-$ipv6_address}, so over IPv6 the NIC record
carries the v6 address, the branch is skipped, $localnic stays 0 and
process_request returns "No nic found in deploy network".
The three tests ask xCAT::DiscoveryUtils for the two decisions and for the
hostname tag of an IPv6 NIC. Each holds an IPv4 case down as well, because every
green discovery cell depends on that path being unchanged. All three fail on this
commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhcp6_client_duids builds the DHCPv6 identity of a node from vpd.uuid, and no
other table holds it. Sequential discovery writes mac, hosts, ipmi, nodepos,
nodelist, nodehm and chain for the node it assigns and never wrote vpd, so the
reservation of a discovered node falls back to a DUID-LL built from its MAC.
Measured on xcat88-mn: the firmware, iPXE and the Genesis image all send a
DUID-UUID, so that reservation matches nothing and the node keeps a pool address.
The findme request already carries the value. The new test asks
xCAT::DiscoveryUtils which vpd attributes a request carries, and holds down the
one case that must be refused: the OpenEmbedded image synthesises
"<machine type>-<serial>-<first mac>" when the firmware reports no product_uuid,
and a DUID built from that string matches no client.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mknb writes one boot script per network under xcat/ipxe/nets, and that script is
what an unknown client boots: it carries destiny=discover and no node name, so
the Genesis image asks to be discovered. Every URL in it named the server with
${next-server}. DHCPv4 fills that from the siaddr of the offer, and DHCPv6 has no
next-server option, so iPXE leaves it empty and the fetch has no host.
The new test asks xCAT::NetworkUtils for the base of those URLs and holds down
both families. Measured on xcat88-mn: the per-node script, which boots, carries
http://[2001:db8:188::1]/ while the per-network script carried
http://${next-server}/.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
kea_client_classes6 names the shim for an unknown client, which answers the
firmware. The shim starts iPXE, and iPXE solicits again with the iPXE user class.
A client xCAT has never seen matches no per-node class, so its only match is the
architecture class, and it is handed the shim a second time. It never fetches a
kernel and never sends a findme, so sequential discovery over IPv6 cannot start.
The new assertions ask for an iPXE second-stage class carrying the per-network
script that mknb writes, and for it to be offered before the architecture class,
because Kea takes the first class that defines an option. All four fail on this
commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A boot chain presents one DUID in several stages, and each stage asks for its own
IA. Kea holds a reclaimed lease for an hour by default, so the reserved address a
boot loader released is still bound to the IAID of the loader when the Genesis
image asks for it. The image is given a pool address, and xcatd names a node by
the address it speaks from.
The new assertions read expired-leases-processing out of the rendered DHCPv6
document. They fail on this commit, because render_dhcp6_config writes no such
block and all three Kea defaults apply.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The implementation for 596450159, which committed only its test.
dhcp6_firmware_uuid_order answers canonical for a kvm node and firmware for any other, because
getNodeUUID writes the byte swap of vpd.uuid into the libvirt domain of a guest xCAT defines and
the SMBIOS encoding swaps it back. dhcp6_client_duid uses it when the node sets no duid attribute,
and dhcp6_client_duids reads nodehm.mgt to supply it.
dhcp_dhcpv6_duid.t gains the mgt column and asserts the address holder of a kvm node against that
of a node xCAT does not define.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
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>
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>
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>
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>
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.
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>
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>
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.
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>
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.
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>
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>
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>
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>
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>
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>
ra_interface_is_served looks up the interface name literally, so
dhcpinterfaces=* serves no interface and radvd gets no configuration.
When the last IPv6 network is removed, configure_router_advertisements
returns early and radvd keeps the old prefix and route. The Kea callers
do not call it at all when no DHCPv6 subnet remains.
These tests fail on the current tree. The other Kea tests that run
kea_process_request now stub the radvd step, so they do not read or
change the radvd configuration of the host.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With mac.duid=canonical the ISC host named after the node answers
iPXE, but it gets the shim, so iPXE never loads the node script.
makedhcp -d on ISC does not remove the <node>-firmware host.
After a change from netboot=ipxe to grub2, the Kea entry of iPXE holds
no hostname and no address, so neither the update nor makedhcp -d
removes it. The ISC host <node>-ipxe also stays.
These tests fail on the current tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The static netplan of an IPv6-only Subiquity node leaves accept-ra unset. A router
advertisement with the managed flag then starts DHCPv6 in systemd-networkd, the pool address
it gets has no PTR record, xcatd refuses the completion callback from it, and the node boots
the installer again.
The same netplan keeps only resolvers that contain a colon, so a site.nameservers entry given
as a host name with an AAAA record is dropped, and the node resolves through the management
node instead.
These assertions fail on the current tree: the rendered keys carry no dhcp6 or accept-ra key,
and the named resolver is replaced by the management node.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Parallel::ForkManager does not fork when max_procs is 0: start()
returns 0 in the original process, and the caller runs the work there.
buildrpms.pl passes --nproc to ForkManager and starts each worker
through start_build_worker. That helper takes the 0 as a forked worker,
closes the only writer of the gate pipe, reads end-of-file and exits
127 before any package work.
The test starts one worker through a ForkManager with max_procs 0 and
checks that the work runs in the original process and process group,
with --nproc=1 as the control. It fails on this tree: the process exits
127.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
start_build_worker releases a gated worker by writing one byte to a
pipe. When the worker dies after the lock records its group and before
that write, the pipe has no reader, and the write raises SIGPIPE. The
default disposition ends the builder, which skips the cleanup that
restores the Debian package tree and releases the build lock.
The test kills the worker inside the record step and checks that the
builder exits normally and reports the worker as not released. It fails
on this tree: the builder ends on signal 13.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>