2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 01:42:15 +00:00
Commit Graph

29471 Commits

Author SHA1 Message Date
Daniel Hilst dd065ea99a test(xcat-core): one IPv6 address cannot reach every DHCPv6 client of a node
A node solicits under more than one DUID. Measured on 2026-11-08, the OpenEmbedded Genesis
image sends the DUID-UUID in the byte order the firmware sends, not the DUID-LL that
dhcp6_client_duid_list assumes. It matched the reservation of the node that holds no address,
took 2001:db8:188::1005 from the dynamic pool, and xcatd could not name it. Genesis reported
CERTIFICATE_ACTION_FAILED with the node unassigned.

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

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

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

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

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

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 01:19:12 -03:00
Daniel Hilst 182f3d9ef2 fix(xcat-core): DHCPv6 gives the firmware an http boot file it cannot fetch
A UEFI node that chainloads solicits twice. dhcp6_client_duid_list labelled the SMBIOS
little-endian DUID-UUID 'firmware' and the RFC 4122 one 'ipxe', and kea_node_reservations6 wrote
the boot file of that stage into each reservation.

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

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

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

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

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

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

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 01:11:13 -03:00
Daniel Hilst cbfbbe12d7 fix(genesis): imgserver falls back to the IPv4 address of an IPv6-only node
The imgserver of the nodeset response takes noderes.tftpserver, then
noderes.xcatmaster, then site.master, and falls back to my_ip_facing. That
resolver is IPv4 only, and an IPv6-only node shares the link with the management
node, so the fallback answers with the IPv4 address and the node is sent to
fetch its image from an address it has no route to.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 19:15:10 -03:00
Daniel Hilst f38c6cd33d fix(xcat-core): rinstall reports a nodeset failure although nodeset succeeded
rinstall prints "Failed to run 'nodeset' against the node: <node>" and returns
1, while nodeset against the same node exits 0 and reports no error. rinstall
returns before rnetboot and rpower, so the node is never powered on and every
provisioning case waits for a machine that nobody booted.

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

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

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

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

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

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

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 07:18:31 -03:00
Daniel Hilst 99619fe205 fix(xcat-core): radvd ignores dhcpinterfaces=* and outlives the last IPv6 network
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>
2026-11-06 17:36:42 -03:00
Daniel Hilst 0c394c3c6e fix(xcat-core): test the router advertisements for dhcpinterfaces=* and for no IPv6 network
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>
2026-11-06 17:36:42 -03:00
Daniel Hilst aac8356fe5 fix(xcat-core): DHCPv6 entries of secondary clients stay behind
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>
2026-11-06 17:36:42 -03:00
Daniel Hilst f6a69db0fb fix(xcat-core): test the DHCPv6 entries of secondary clients
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>
2026-11-06 17:36:42 -03:00
Daniel Hilst a5cd542a5d fix(xcat-core): configdhcpv6duid writes a DUID that the reservation does not hold
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>
2026-11-06 17:32:00 -03:00
Daniel Hilst 9c778b9155 fix(xcat-core): test that configdhcpv6duid writes the DUID makedhcp reserved
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>
2026-11-06 17:30:59 -03:00
Daniel Hilst e628125cf9 fix(xcat-core): Subiquity IPv6 netplan lets RA start DHCPv6 and drops named resolvers
_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>
2026-11-06 17:29:55 -03:00
Daniel Hilst 007ec08369 fix(xcat-core): test that Subiquity netplan blocks RA-started DHCPv6 and keeps named resolvers
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>
2026-11-06 17:29:29 -03:00
Daniel Hilst 26742a8d36 fix(xcat-core): template cases expect the old default postscripts
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>
2026-11-06 14:59:16 -03:00
Daniel Hilst 559577a410 Merge branch 'fix/ipv6-xcatroot-on-8009' into feat/ipv6 2026-11-05 17:36:54 -03:00
Daniel Hilst 3f79229fc0 fix(xcat-core): the EL10 IPv6 keyfile is written inside a deleted ifcfg block
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>
2026-11-05 17:36:03 -03:00
Daniel Hilst 428298e9a1 Merge branch 'fix/ipv6-ubuntu-dracut-and-test-isolation' into feat/ipv6 2026-11-05 17:12:35 -03:00
Daniel Hilst fdddbc6427 Merge branch 'fix/dhcp6-reserve-duid-ll' into feat/ipv6 2026-11-05 17:09:29 -03:00
Daniel Hilst 6de92d269b fix(xcat-core): the Genesis image matches no DHCPv6 reservation of its node
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>
2026-11-05 17:08:45 -03:00
Daniel Hilst 95bbecafce test(xcat-core): nothing asserts that the DUID the Genesis image sends is reserved
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>
2026-11-05 16:56:24 -03:00
Daniel Hilst e89f68d59e test(xcat-core): the Genesis bats helper accepts only the GNU form of a signalled exit
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>
2026-11-05 16:53:11 -03:00
Daniel Hilst 81e08e711b test(xcat-core): the DUID integration test rewrites the radvd configuration of the host
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>
2026-11-05 16:51:35 -03:00
Daniel Hilst 330db051a3 test(xcat-core): the DUID integration test asserts a message the plugin no longer writes
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>
2026-11-05 16:51:25 -03:00
Daniel Hilst 9c311c8946 fix(xcat-core): Ubuntu diskless nodes cannot netboot over IPv6 only
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>
2026-11-05 16:46:29 -03:00
Daniel Hilst dc2b3b4aea Merge branch 'fix/subiquity-ipv6-static-netplan' into feat/ipv6 2026-11-05 16:40:34 -03:00
Daniel Hilst 94225e8034 fix(xcat-core): a Subiquity IPv6 install takes a pool address and stops at post.xcat
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>
2026-11-05 16:39:13 -03:00
Daniel Hilst 11392034be test(xcat-core): nothing asserts which address a Subiquity IPv6 install uses
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>
2026-11-05 16:38:38 -03:00
Daniel Hilst fc2f4ed11b Merge branch 'fix/el8-el9-static-ipv6-boot' into feat/ipv6 2026-11-05 16:33:08 -03:00
Daniel Hilst 657ff339e1 fix(xcat-core): a static IPv6 kickstart install leaves the node with no resolv.conf
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>
2026-11-05 16:31:56 -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 9a1df09075 Merge remote-tracking branch 'versatus/fix/ipv6-off-cluster-tests' into feat/ipv6 2026-11-05 10:15:44 -03:00
Daniel Hilst 6cee09e22c Merge remote-tracking branch 'versatus/fix/ipv6-discovery-neighbour-callback' into feat/ipv6 2026-11-05 10:15:43 -03:00
Daniel Hilst b62b3e8fc9 Merge remote-tracking branch 'versatus/fix/ipv6-mknb-nets' into feat/ipv6 2026-11-05 10:15:43 -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 aba7b80288 fix(xcat-core): an IPv6 node gets a boot script whose URLs carry no host
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>
2026-11-05 09:45:49 -03:00
Daniel Hilst 0373cd6568 fix(xcat-core): discovery cannot resolve an IPv6 findme and never calls an IPv6 node back
A node that sends its findme request over IPv6 is never discovered. Two
steps fail.

seqdiscovery.pm reads the arp(8) table to turn the client address into a MAC
and looks that MAC up in the mac table. arp(8) prints the IPv4 table only, so
the table holds no row for the client and the plugin logs "Could not find mac
of the <address>" and returns. aaadiscovery.pm, profilednodes.pm, blade.pm and
hpblade.pm carry the same parse. All five interpolate the address into a
regular expression as well, so a dot matches any character and 192.168.201.1
matches the row of 192.168.201.120.

nodediscover.pm then opens a TCP connection to the node to send "restart",
and NetworkUtils::send_tcp_msg does the same for its callers. Both build the
socket with IO::Socket::INET, which has no AF_INET6, so the node receives
nothing and Genesis exits on DISCOVERY_TIMEOUT after 36 attempts.

NetworkUtils gains mac_from_neighbour_table, which takes the text of a
neighbour table and the address and returns the MAC; neighbour_table_text,
which reads arp(8) for IPv4 and "ip -6 neigh show" for IPv6; and
mac_of_neighbour, which joins them. The addresses are compared after both
are normalized, so 2001:db8::2 and its full form are one address. The five
plugins call mac_of_neighbour. open_tcp_socket opens the callback through
IO::Socket::INET6 when it is installed and keeps IO::Socket::INET as the
fallback, the way credentials.pm already does; nodediscover.pm and
send_tcp_msg use it.

networkutils_neighbour_mac.t and networkutils_tcp_callback_family.t fail
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:44:41 -03:00
Daniel Hilst 13132cb416 test(discovery): nothing asks how xcatd resolves an IPv6 findme or calls an IPv6 node back
Sequential discovery resolves the address a findme arrived from to a MAC and
looks that MAC up in the mac table. Five plugins carry the same arp(8) parse,
which reads the IPv4 table only and interpolates the address into a regular
expression. After the match xcatd opens a TCP connection back to the node
with IO::Socket::INET, which cannot reach an IPv6 address.

No test covers either step. networkutils_neighbour_mac.t drives the parse
against the text of an arp(8) table and of an ip(8) neighbour table, both
fixtures, so it measures the parse and not the test host's own cache.
networkutils_tcp_callback_family.t replaces both socket classes and asks
which one the callback uses.

Both files report that the subroutines do not exist on this commit, which is
why the fix commit follows.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:44:31 -03:00
Daniel Hilst 7f2fd291aa test(xcat-core): an IPv6 node with no facing address gets a boot script with no host
xnba.pm starts its script server at ${next-server} and replaces it only when the IPv6 lookup
answers: "$script_server = $resolved if defined $resolved". An IPv6 node for which this server
has no facing IPv6 address therefore keeps the DHCPv4 variable. An IPv6 client resolves that to
the empty string, every URL in the script loses its host, and nodeset reports success. ipxe.pm
runs the same code with SCRIPTS set to xcat/ipxe, so netboot=ipxe takes the same path.

ipxe_script_server_for_node.t drives the three outcomes through Perl-level stubs of
node_address_family and my_ip_facing_family: an IPv4 node keeps the variable, an IPv6 node with a
facing address carries it bracketed, and an IPv6 node without one yields no server and an error
that names the node and the family. It also asserts the error does not offer ${next-server} as a
fallback, and that the two families are not given the same text.

The decision has no sub to call yet, so this file names the sub the next commit adds.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:42:24 -03:00
Daniel Hilst 872bfdcefa fix(xcat-core): makedhcp drops the DHCPv6 boot file of an ipxe node without saying so
dhcp6_bootfile_url_for_node in dhcp.pm returned nothing when the UEFI loader was not under the
tftpdir of the node, and reported nothing. The reservation was still written with its address and
its DUID, makedhcp exited 0, and the node reached a firmware timeout with no line anywhere naming
the file it had asked for. On an IPv6 cell that is the whole boot: there is no second method to
fall back to.

BootPolicy gains dhcp6_missing_loader_warning, which takes the tftpdir of the node and the loader
name and returns the sentence or nothing. dhcp6_bootfile_url_for_node reports it through the
callback, once per node per makedhcp, and then drops the boot file as before. Naming the node
matters because the path comes from noderes.tftpdir, which the reader cannot derive from the site
value.

The three assertions the previous commit added to dhcp_dhcpv6_duid.t now pass, and the nine in
dhcp_ipxe_readiness.t with them. Blanking the file check in the new sub fails five of those nine
and leaves the four controls passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:41:07 -03:00
Daniel Hilst 66520c968c test(xcat-core): a netboot=ipxe node with no loader gets no boot file and no warning
dhcp6_bootfile_url_for_node drops the DHCPv6 boot file when the UEFI loader is not under the
tftpdir of the node, and says nothing. makedhcp exits 0, the reservation is written with its
address and its DUID, and the node then sits at a firmware timeout with no line on the
management node that names the file it was looking for.

upstream_loader_warnings does not cover this. It reads the SITE TFTP directory, and it runs on
makedhcp -n and makedhcp -a only, so a node that carries its own noderes.tftpdir is never
examined and makedhcp <node> warns about nothing at all.

dhcp_dhcpv6_duid.t now asserts the warning reaches the caller for the node whose loader is
absent, exactly once, attributed to the node and naming the full path. The node in the same run
whose loader is present must not be reported. dhcp_ipxe_readiness.t asserts the decision itself
for a present loader, an absent one, a trailing slash on the directory, and the three inputs that
are not a missing file.

These assertions fail on this tree: the three in dhcp_dhcpv6_duid.t report nothing in the
collected warnings, while the assertion that the boot file is absent, and the control on the node
whose loader is present, both still pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:39:41 -03:00
Daniel Hilst 251822deae fix(xcat-core): mknb writes no boot script for an IPv6 network, and an unbracketed xcatd=
An unknown client on an IPv6 provisioning network gets no network boot
script. mknb builds its list of networks from my_nets and my_hexnets, and
both skip inet6 on Linux, so nothing is written under xcat/ipxe/nets and
the client has nothing to fetch.

Where an address does reach a script it is written as
"xcatd=" . $address . ":$port". For 2001:db8:177::1 that is
xcatd=2001:db8:177::1:3001, which parses as an IPv6 literal with no port,
so Genesis contacts a different address and reports nothing. The same
concatenation builds the POWER HTTP URLs and the grub2 roots. xnba.pm and
destiny.pm already bracket an IPv6 address through
NetworkUtils::xcatd_cmdline_address and format_uri_host, so the node
files were correct and the net files were not.

NetworkUtils gains my_nets6, which returns the host's global IPv6
networks keyed the way my_nets keys its IPv4 ones, and
ipv6_network_address, which masks an address to its prefix. my_nets keeps
its IPv4-only behaviour: lsslp.pm and PPCdb.pm read its keys with
dotted-quad arithmetic, so an IPv6 key there would be a wrong answer
rather than a new one. my_hexnets keeps its own, because a hexnet is a
PXELINUX file name built from a hexadecimal IPv4 prefix and DHCPv6 has no
equivalent. mknb merges my_nets6 into the networks it writes nets/
scripts for, asks getipaddr for the IPv6 addresses of site.master as well,
and takes every xcatd= value and every HTTP authority from the two
formatting helpers.

mknb_xcatd_address.t and networkutils_my_nets6.t fail without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:38:09 -03:00
Daniel Hilst a2d889da3d test(mknb): no test asks what mknb writes for an IPv6 network
mknb writes the network boot scripts of an unknown client from my_nets and
my_hexnets, both of which skip inet6 on Linux, and it builds every xcatd=
value by concatenation. No test covers either, so an IPv6 management node
gets no script, and an address written as xcatd=2001:db8:177::1:3001 reads
as a valid literal with no port.

mknb_xcatd_address.t stubbed the whole of xCAT::NetworkUtils, so the
formatting helpers were absent from the harness and could not be measured.
The three harnesses now load the real module and replace only the probes
that read the running host's interfaces. The new assertions cover the
nets/ scripts, the UEFI and elilo entries, the POWER URLs, the s390x
APPEND line and the grub2 roots for one IPv6 network, and
networkutils_my_nets6.t covers my_nets6 and the prefix masking.

16 of the mknb assertions fail on this commit, and the my_nets6 file does
not run at all for lack of the subroutine.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:37:57 -03:00
Daniel Hilst 02cd805478 test(xcat-core): nothing asserts the DHCPv6 reservation pair of a netboot=ipxe node
A netboot=ipxe node is two DHCPv6 clients. The firmware solicits first and takes the
Microsoft-signed shim over TFTP; the iPXE it chainloads solicits again with a DUID built from
the same vpd.uuid in RFC 4122 order and takes the boot script of the node over HTTP. Its sibling
case makedhcp_dhcpv6_boot_intent defines its node netboot=grub2, so no case read the pair, and a
cell could report green with every iPXE line of dhcp.pm broken.

makedhcp_dhcpv6_ipxe_boot_intent reads the rendered kea-dhcp6.conf. It counts the reservations
keyed on the two expected DUIDs, compares both entries byte for byte, asserts the two DUIDs
differ, and moves the address between the clients with mac.duid to say WHICH client gets WHICH
file. A grub2 arm and a return to iPXE are the discriminator: a case that cannot tell the two
methods apart only measures that a reservation exists.

The loader check is first. dhcp6_bootfile_url_for_node returns empty when the UEFI loader is not
under the tftpdir of the node and makedhcp still exits 0, so every later assertion would pass
vacuously on a management node with no ipxe-xcat.

Measured against the rendered reservations of this tree: reverting dhcp6_chainloads to return 0
takes the count from 2 to 1 and leaves the first reservation and the grub2 arm passing; deleting
the "if ($client eq 'ipxe')" arm of dhcp6_bootfile_url_for_node turns the second URL into the
TFTP shim and leaves nine of the eleven value assertions passing.

ipxe-xcat is packaged for x86_64 only, so a bundle must name this case for an x86_64 cell.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:35:26 -03:00
Daniel Hilst 63c81ab01f test(xcat-core): mac.duid is unmeasured on a table that predates it
mac.duid names the DHCPv6 client identifier that a node's reservations match.
A cluster that upgrades carries a mac table with no duid column, and nothing
recreates it, so the column has to arrive on an existing database.

xcatd adds it: at startup it walks every table in the schema and calls
updateschema, which compares the declared columns against the database and
issues the ALTER. Table->new does not do this, so the column arrives when
xcatd restarts and not when a plugin first opens the table.

The test builds a mac table with every column but duid, runs the schema
update, and reads a duid back. It also asserts the row the table already held
survives, and that a node attribute is mapped onto mac.duid so chdef and
lsdef reach it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:20:44 -03:00