kea_client_classes6 built one class per client architecture, each naming the
signed iPXE shim. That answers the firmware. The shim starts iPXE, which
solicits again carrying the iPXE user class, and a client xCAT has never seen
matches no per-node class: its only match is the same architecture class, so it
is given the shim again and never fetches a kernel. The Genesis image never
runs, no findme reaches xcatd, and sequential discovery over IPv6 cannot start.
The DHCPv4 side has carried this second stage for years in
kea_xnba_network_classes, keyed on option 93.
kea_client_classes6 now also builds an iPXE second-stage class for the network,
naming the per-network script mknb writes under xcat/ipxe/nets, which carries
destiny=discover and no node name. The class is offered before the architecture
class, because Kea takes the first class that defines an option.
kea_boot_client_classes6 passes the network and its prefix length, which name
that script.
Measured on xcat88-mn: /tftpboot/xcat/ipxe/nets holds 2001:db8:188::_64.uefi and
no DHCPv6 class named it.
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>
render_dhcp6_config wrote no expired-leases-processing block, so Kea held a
reclaimed lease for hold-reclaimed-time, which is 3600 seconds. A node boots in
stages that share one DUID and use a different IAID each. The firmware takes the
reserved address and releases it, the reclaimed lease keeps that address bound to
the IAID of the firmware, and Kea gives the Genesis image a pool address. The
image then speaks from an address xcatd cannot map to a node, and discovery
stops at "Node unassigned".
_expired_leases6 writes the block, with hold-reclaimed-time 0 and both timers at
5 seconds, so a reserved address is free again inside one boot. A caller can
override any of the three values.
Measured on xcat88-cn: the firmware released 2001:db8:188::20 and the image was
given 2001:db8:188::1003 29 seconds later. With the block in place the image was
granted ::20 and the node reached status=shell.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 looked up the interface name literally. With
dhcpinterfaces=*, which Kea accepts, no interface was served and
makedhcp wrote no advertisement.
configure_router_advertisements returned when no IPv6 network was
left, and the Kea callers ran it only with a DHCPv6 subnet. radvd then
kept announcing the old prefix and default route.
The wildcard now serves every interface. radvd_config starts its output
with a marker line. When no IPv6 network remains and the file carries
that marker, makedhcp stops and disables radvd and removes the file.
radvd sends a router lifetime of zero when it stops. A radvd
configuration without the marker is left alone. Both Kea paths now
call configure_router_advertisements on every run.
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, addnode6 gave the shim to the host that
answers iPXE, so iPXE never loaded the node script. delnode6 listed
only the ipxe and genesis hosts, so makedhcp -d left <node>-firmware.
On Kea, an entry of a client that holds no address has no hostname.
After a change of netboot, no reservation of the new set matched it,
and makedhcp -d matched only the DUIDs of the current clients.
addnode6 now asks for the boot file of the client that mac.duid
selects, removes the hosts of clients the node no longer has, and
delnode6 also removes <node>-firmware. Each Kea DHCPv6 entry names its
node in user-context. upsert_reservations replaces the entries of a
node as a set, and makedhcp -d matches on that owner.
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>
mypostscript assigned DHCP6DUID and did not export it, so configdhcpv6duid, which runs as a
child process, never saw mac.duid and wrote the firmware DUID-UUID. The script also rejected
ll, which makedhcp accepts and selects by default on ppc64le. It read the SMBIOS UUID before
the attribute, so a missing or nil UUID ended the script although a literal DUID needs none.
And it wrote no systemd-networkd configuration for a DUID that is not a DUID-UUID.
mypostscript now exports DHCP6DUID. The script reads the attribute first, builds the DUID-LL
from the first mac.mac address for ll and for an unset value on ppc64le, reads the UUID only
for firmware and canonical, and gives systemd-networkd the type of every DUID through
DUIDType and the rest through DUIDRawData.
postscript_dhcpv6_duid.bats fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
configdhcpv6duid writes a DHCPv6 client identifier that does not match the reservation in
four cases. mypostscript does not export DHCP6DUID, so the postscript, a child process,
never sees mac.duid and writes the firmware UUID. The postscript rejects ll, which makedhcp
accepts and which is the default on ppc64le. It exits on a missing or nil SMBIOS UUID before
it reads a literal DUID that needs none. And it writes no systemd-networkd configuration
for a DUID that is not a DUID-UUID, although DUIDType and DUIDRawData express every type.
These tests fail on the current tree for those four reasons. The test that held the old
NetworkManager-only behaviour for a DUID-LLT now expects the networkd file.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
_subiquity_netplan6 wrote dhcp4: false and a static address, and left accept-ra unset. A
router advertisement with the managed flag still starts DHCPv6 in systemd-networkd. The pool
address it gets has no PTR record, so xcatd refuses the completion callback and the node
boots the installer again.
The same sub filtered site.nameservers on a colon, so a resolver given as a host name was
dropped and the management node replaced it.
The netplan now carries dhcp6: false and accept-ra: false, and the resolvers come from
_ipv6_nameservers_for_node, which resolves a host name to its AAAA address as the kickstart
path already does. subiquity_ipv6_netplan.t fails without this change.
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>
xcatconfig now puts configdhcpv6duid in the postscripts of xcatdefaults,
so a node made from a template inherits syslog,remoteshell,
configdhcpv6duid,syncfiles. Eight lsdef and mkdef checks still match
syslog,remoteshell,syncfiles. Four cases failed in xcat_pr_test on
559577a41: mkdef_template_cec_template_without_remainder,
mkdef_template_switch_template_without_attribute,
lsdef_template_switch_template and mkdef_node_with_a_node_template.
The checks now match the list that xcatconfig writes.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6-only diskless node needs its address in a NetworkManager keyfile, because the
booted system does not repeat the DHCPv6 exchange of the initial ramdisk. This branch
writes that keyfile inside the dhclient and ifcfg handoff of
xCAT-server/share/xcat/netboot/rh/dracut_105/stateless/xcatroot, and upstream commit
1c42a2c72 deletes the whole handoff. So the branch does not merge, and the keyfile
depends on ETHX and MACX, which getdevfrommac() and the deleted derivation supplied.
The deletion is the base now. xcat_boot_netif() names the provisioning NIC from ifname=,
from netdev=, or by matching the BOOTIF MAC against /sys/class/net/<dev>/address.
xcat_persist_ipv6_boot() reads the MAC of that interface from sysfs and calls
persist_ipv6_nm_connection(). The removal of ifcfg-$ETHX is dropped: the script writes no
ifcfg file any more, so there is no competing profile to remove.
Eight checks in xCAT-test/bats/ipv6_xcatroot_el_stateless.bats run the two functions
against a scratch sysfs tree. Three mutations of the rework each turn one check red. The
checks cannot run against the unreworked file, which holds neither function, so the test
and the change are one commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The OpenEmbedded Genesis image ships one NetworkManager configuration,
10-xcat-genesis.conf, and it sets ipv6.dhcp-duid=ll. The image therefore sends
the DUID-LL of the provisioning NIC on every netboot method. makedhcp reserves
the two DUID-UUID orders that EDK2 and iPXE send, and only a DUID-LL where
mac.duid says ll, so a node with the default selector gets no answer once
Genesis runs and a node with ll leaves the firmware and iPXE unanswered. Three
programs boot one node and each sends an identifier of its own.
dhcp6_client_duid_list in xCAT-server/lib/xcat/plugins/dhcp.pm returned the two
UUID orders alone. It now derives 00:03:00:01 and the MAC, which needs no value
the node reports first, and appends it as a third client. dhcp6_node_clients is
the one place the clients of a node are selected: it drops the iPXE order where
the method does not load iPXE and keeps the DUID-LL for every method, because
Genesis runs whatever loaded it. kea_node_reservations6, the ISC hosts and the
makedhcp -d match list all read that selection, so delnode6 removes the hosts
it writes. The first client still keeps the address and the hostname.
mac.duid=ll, a literal DUID and DHCPv4 are unchanged.
Seventeen assertions in dhcp_dhcpv6_duid.t fail without the appended client.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The OpenEmbedded Genesis image ships one NetworkManager configuration,
10-xcat-genesis.conf, and it sets ipv6.dhcp-duid=ll. The image therefore sends
the DUID-LL of the provisioning NIC. makedhcp reserves the two DUID-UUID orders
that EDK2 and iPXE send, or a DUID-LL when mac.duid asks for one, and the two
forms are exclusive. No test says which identities one node needs, so a
reservation set that answers the firmware and the loader and not the image
passes.
The new block renders the Kea DHCPv6 reservations of a netboot=ipxe node and
asserts the DUIDs, which client keeps the address and the hostname, and the boot
file URL of each. It asserts the same node on ISC DHCP and through
makedhcp -d, and that mac.duid=ll, a literal DUID and the DHCPv4 reservations
are unchanged.
Ten assertions fail on this commit: the DUID-LL is reserved nowhere.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
run_genesis in xCAT-test/bats/helpers/genesis_sandbox.bash compared the status of
"timeout 20 /bin/bash /run/script" with one exact number. GNU coreutils timeout reports
a child that a signal killed as 128+signal, so genesis_discovery_uuid.bats expects 143
for SIGTERM. The uutils coreutils of Ubuntu 26.04 reports the signal number alone, 15,
so the same outcome fails the assertion there.
run_genesis now accepts the expected status or, when that status is above 128, the
signal number alone. A caller that expects 0 keeps one accepted value, and an unrelated
failure is still a failure. The comment names the two conventions.
Evidence: a four-case bats file drives run_genesis with a controlled status. With the
change, 143 and 15 both pass against an expected 143, while status 1 against 143 and
status 15 against 0 still fail. Without the change only the 15 case flips to "Expected
exit 143, got 15"; the control and both discriminators are unchanged.
The five "= 143" comparisons in genesis_openembedded_runtime.bats stay as they are:
terminate_after reads its status from the bash wait builtin, which computes 128+signal
itself and does not call timeout.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT-test/integration/dhcp_dhcpv6_duid.t runs makedhcp through kea_process_request,
which calls configure_router_advertisements on every IPv6 run
(xCAT-server/lib/xcat/plugins/dhcp.pm). The step did not localize
$xCAT_plugin::dhcp::radvdconffile, so it wrote the real /etc/radvd.conf, and it called
enableservice, checkservicestatus and restartservice on the radvd of the management
node. The test plans skip_all unless it runs as root, and "ip netns exec" changes only
the network namespace, so the mount namespace and the services are the host's.
makedhcp_step now points $radvdconffile at the scratch directory of the test and stubs
the three service calls, as xCAT-test/unit/dhcp_dhcpv6_duid.t already does. The DHCPv6
reservations the test measures are unchanged.
Evidence: configure_router_advertisements driven with these four lines writes the
scratch radvd.conf and reports nothing; without them it reports "Cannot write
/etc/radvd.conf, so the IPv6 networks announce no route" and the scratch file stays
absent. No other file in xCAT-test/integration reaches that sub.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhcp6_client_duid gained the "ll" choice, so the refusal of an invalid mac.duid now
reads "only firmware, canonical, ll, or a DUID of colon-separated hexadecimal octets
is supported" (xCAT-server/lib/xcat/plugins/dhcp.pm). Two assertions in
xCAT-test/integration/dhcp_dhcpv6_duid.t still held the text without "ll", one for the
Kea backend and one for ISC. Both compare the whole sentence, so both fail against the
current plugin.
The new invalid_duid_error helper calls dhcp6_client_duid and wraps its error in the
sentence that dhcp6_client_duids builds, so the expectation is read from the plugin
instead of written out a second time. The plugin loader moves to require_dhcp_plugin,
which both the helper and makedhcp_step call.
Evidence: against the current plugin the derived sentence matches what
dhcp6_client_duids returns and the old literal does not. A further change of the
wording, to "firmware, canonical, ll, duid-uuid, or ...", keeps the derived sentence
correct and leaves the literal wrong.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Ubuntu genimage enters dracut mode only when the rootimg holds
/usr/share/dracut or /usr/lib/dracut (netboot/ubuntu/genimage:791). Seven
netboot package lists hold no dracut, so genimage writes the legacy /init.
That /init waits for an "inet addr" line from ifconfig (genimage:1339) and
cuts XCATSERVER at the first colon (genimage:1348). Both steps are IPv4-only,
so an IPv6-only diskless node never boots. Ubuntu 26.04 diskless is the row
this blocks.
Add dracut and dracut-network to the 24.04 ppc64el list, its ppc64le copy,
and the five 26.04 netboot lists. Both packages are published for noble
(universe, 060+5-1ubuntu3) and resolute (main, 110-11) on amd64, ppc64el and
riscv64. dracut-network pulls iproute2 on resolute and iputils-arping on
noble, so no other entry is needed.
The new xCAT-test/unit/ubuntu_netboot_dracut_pkglists.t reads the seven lists
plus the working 24.04 x86_64 reference and asserts both entries.
profile_customization.t now expects dracut in the 26.04 riscv64 list.
Removing dracut from compute.ubuntu26.04.pkglist fails only that list's
assertion; the reference stays green.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Subiquity autoinstall of an IPv6-only node asked netplan for DHCPv6, and
the late-command wrote the same request into the installed system. A DHCPv6
client is identified by its DUID, which the installer generates in the
initramfs, so it matched no Kea reservation and the node took an address out
of the dynamic range. That address has no PTR record, because makedns writes
PTRs from the hosts table, and xcatd identifies a client over IPv6 only by the
name its address resolves to. post.xcat then fetched a mypostscript that
getpostscript could not build, and the install stopped.
subiquity_dhcp_keys and subiquity_target_dhcp_keys in Template.pm now render
the static address of the node, through a new _subiquity_netplan6, in the shape
xcatroot writes for a diskless IPv6 node. A new subiquity_install_match
replaces the literal name: "e*" of both templates: a static address on each of
three interfaces of one bridge is a broken network, so an IPv6-only node is
matched by its MAC. Each IPv4 return keeps its former string.
casper takes no static ip6=, so the debian.pm docs say where the reserved
address comes from instead.
subiquity_ipv6_netplan.t fails 15 of 30 without this change, and
subiquity_install_match.t has no subroutine to call.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Subiquity autoinstall of an IPv6-only node asks netplan for DHCPv6, and
the installed system does too. A DHCPv6 client is identified by its DUID, so
the installer and systemd-networkd each send one that matches no Kea
reservation. Both take an address out of the dynamic range, which carries no
PTR record, and xcatd identifies a client over IPv6 only by the name its
address resolves to. The install reaches post.xcat, getpostscript cannot say
which node asked, and the node stops.
The autoinstall also matches the provisioning NIC by the glob name: "e*".
Three interfaces of one bridge match it.
The tests assert the rendered netplan of both stages, the match key, and the
file the late-command writes: one static address, from the node's own network
configuration, on the interface that carries the node's MAC.
xCAT-test/bats holds the late-command, because the template renders the keys
into a printf argument list and the shell decides which lines reach the file.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
site.nameservers holds one list for the whole cluster, and on a normal lab it
names IPv4 resolvers. _static_kickstart_network6 in Template.pm kept only the
entries that resolve to an IPv6 address, so it rendered no --nameserver at all
and the installed node had no /etc/resolv.conf. Measured on a riscv64
openEuler install. EL 10 takes the same path, and EL 8 and EL 9 now take it
too, so the number of nodes exposed grows.
_autoyast_network6 in the same file already answered this: it maps
'<xcatmaster>' through ipv6_server_for_node and falls back to the management
node when the cluster configures no IPv6 resolver. The chooser is now one sub,
_ipv6_nameservers_for_node, and both callers use it. The fallback is the
management node and not the gateway, because a gateway can be a router that
serves no DNS. A management node with no address on the network of the node
yields no resolver, rather than a guess.
template_ipv6_rendering.t asserts the rendered network line for all three
cases. Without the fallback the IPv4-resolver case fails while the configured
IPv6 resolver case and the no-address control keep passing, and
autoyast_ipv6_network.t goes red with it, which shows both callers read the
same chooser.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
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>
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>
xnba.pm started its script server at ${next-server} and replaced it only when the IPv6 lookup
answered. An IPv6 node for which this server has no facing IPv6 address therefore kept the
DHCPv4 variable, an IPv6 client resolved it to the empty string, every URL in the script lost
its host, and nodeset reported success. ipxe.pm runs the same code with SCRIPTS set to
xcat/ipxe, so netboot=ipxe took the same path.
NetworkUtils gains ipxe_script_server_for_node, which makes the decision and returns either the
server or a reason. No value serves such a node, so xnba.pm now stops with that reason instead
of writing a script that cannot work.
netboot_ipxe_method.t and secureboot_ipxe_node_shim.t replace the whole NetworkUtils module
through %INC, so the new sub is stubbed there as well; both carry IPv4 nodes, for which the real
sub answers the iPXE variable.
Restoring the old behaviour in the new sub -- keep ${next-server} when the lookup does not
answer -- fails eight of the sixteen assertions in ipxe_script_server_for_node.t and leaves the
IPv4, unknown-family and IPv6-with-an-address outcomes passing.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>