2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-26 04:12:17 +00:00
Commit Graph

1175 Commits

Author SHA1 Message Date
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 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 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 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 428298e9a1 Merge branch 'fix/ipv6-ubuntu-dracut-and-test-isolation' into feat/ipv6 2026-11-05 17:12:35 -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 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 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 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 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 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 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 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
Daniel Hilst fbc64196ba fix(xcat-core): an ISC subnet6 loses its resolvers and keeps a deleted host
Two gaps in the ISC DHCPv6 path.

An IPv6 node on an ISC backend gets no resolver and no domain-search list.
addrangedetection keys %netcfgs on networks.net, which a conf may write with
no prefix length, while addnet6 names the subnet "<net>/<prefix>" from the
"ip -6 route" output. addnet6 read the domain, the nameservers and the
ddnsdomain under the long name alone, so all three were undef and the
subnet6 carried neither statement. dynamic_range_for in the same file already
fell back to the bare net, which is why the range was the only value that
survived.

And "makedhcp -d <node>" removed the DHCPv4 host alone. addnode6 creates the
DHCPv6 host as a separate omapi object on port 7912, and delnode never
touched it, so the reservation outlived the node and kept its address and its
boot file.

net_config_for does the lookup with the same fallback dynamic_range_for uses,
and addnet6 takes its values from it. isc_dhcp6_subnet_statements renders the
domain and resolver statements from that entry, so they can be read back.
delnode6 writes the removal over the open DHCPv6 session.

dhcp_isc_dhcpv6_subnet_and_delete.t captures both. Removing the fallback from
net_config_for fails its three lookup assertions and leaves the
dynamic_range_for assertion passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-05 09:20:31 -03:00
Daniel Hilst d3a23c713c fix(xcat-core): makedns publishes no AAAA for a dual-stack name server
makedns writes the address record of the name server itself into every zone file
it creates, and it wrote one record. The address came from
_preferred_ip_address, which returns the first IPv4 address, so a server with an
A and an AAAA in /etc/hosts published the A alone.

An IPv6-only compute node resolves that name to reach the server. With no AAAA in
the zone it gets no usable address, and behind a NAT64 translator it gets the
synthesis of the IPv4 address, which does not reach the server.

_server_ip_addresses returns every valid address, IPv4 first, and the zone writer
loops over it, taking the record type from _dns_record_type as before.
_preferred_ip_address is unchanged and still names one address for the error path.

xCAT-test/unit/ddns_server_dual_stack.t captures this. With the routine returning
the single preferred address, its first assertion fails and the other six pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-04 13:05:34 -03:00
Daniel Hilst 684f26e530 fix(xcat-core): an IPv6-only node is given no DNS resolver
An IPv6-only node netboots, installs and reaches the end of its installer, then
fails in any step that resolves a name. The node console reports "no search or
nameservers found in /run/net-*.conf /run/net6-*.conf". On Ubuntu this stops
subiquity in its postinstall package step, seconds after curtin finishes and
before any xCAT late command, so the node never boots from disk.

Three writers were involved, and none of them produced a resolver:

kea_subnet6_intent wrote dns-servers only when a configured nameserver resolved
to an IPv6 address. site.nameservers holds IPv4 addresses and the IPv6 network
row's nameservers column is normally empty, so the option was absent.

addnet6 wrote "nameservers <list>;", which is not an ISC dhcpd statement. RFC
3646 names the option dhcp6.name-servers. dhcpd refuses the whole file on an
unknown statement, so the only networks that could reach that line were the ones
that broke the configuration.

radvd_config emitted no RDNSS, so a node that configures itself from the router
advertisement had no second source.

dhcp6_resolvers_for_network is now the one chooser for all three. It keeps a
configured IPv6 nameserver, and otherwise falls back to the management node's
own address on that network, which is what <xcatmaster> names for IPv4. It
returns undef when the management node has no address on the network, because a
resolver that never answers costs the node a DNS timeout instead of a lease.

Measured with dig against an IPv6 cluster management node: a cluster name and an
external name both resolve over IPv6, so the fallback address answers.

xCAT-test/unit/dhcp6_resolver_fallback.t covers the chooser and all three
writers. Against the previous behaviour 12 of its 17 checks fail, and the 5 that
pass are the controls: a configured IPv6 nameserver is kept, and a management
node with no address on the network yields no resolver, no statement and no
RDNSS.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-04 06:51:58 -03:00
Daniel Hilst e20f5fb621 fix(xcat-core): an aarch64 node writes its console to ttyS0, which does not exist
nodehm.serialport holds a port number, so the plugin that writes the kernel
command line also names the device. anaconda.pm, debian.pm, sles.pm, destiny.pm
and mknb.pm each chose between hvc for POWER and ttyS for everything else. An
aarch64 platform presents a PL011 serial port, which Linux names ttyAMA, so an
aarch64 node was told console=ttyS0 and wrote its console to a device that is
not there. A provisioning failure on such a node leaves no console record.

Three of those sites named ttyS with no architecture test at all, so a ppc64le
node lost its console the same way in mksysclone.

The device is now chosen in one place, xCAT::ConsolePolicy, which maps the
architecture to hvc, ttysclp, ttyAMA or ttyS and builds the console arguments
from a port and an optional speed. The ten call sites call it.
_genesis_uses_power_console is removed; destiny.pm calls the module.

console_policy.t covers every architecture and the empty-port case.
anaconda_console_device.t drives mknetboot and reads the arguments out of the
command line the plugin wrote: it fails on the unfixed tree with ttyS0,115200
where ttyAMA0,115200 is expected, and the ppc64le and x86_64 cases pass either
way, so a change that renamed every device would not satisfy it.

An aarch64 platform with a 16550 instead of a PL011 is not covered, as a POWER
machine without a hypervisor console is not: the map takes one device per
architecture, which is what the two existing entries already assumed.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 1b984211212a12cd56603bdfb6fab6cecf197314)
2026-11-03 19:39:22 -03:00
Daniel Hilst 6a95d50acd test(xcat-core): an aarch64 node is told to write its console to ttyS0
nodehm.serialport holds a port number, so the plugin that writes the kernel
command line also names the device. anaconda.pm chooses between hvc and ttyS,
and an aarch64 platform presents its serial port as pl011, which Linux names
ttyAMA. So an aarch64 node is given console=ttyS0 and writes its console to a
device that does not exist.

The test drives mknetboot for aarch64, ppc64le and x86_64 and reads the console
arguments out of the command line the plugin wrote. The aarch64 case fails with
'ttyS0,115200' where 'ttyAMA0,115200' is expected; the other two pass, so a
change that renamed every console device would not satisfy this test.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 42b80b63497022a7d9e19b169ef011d259233fa7)
2026-11-03 19:39:22 -03:00
Daniel Hilst 6b11e0a419 test(xcat-core): a ppc64le node is reserved for a DUID its firmware never sends
SLOF, the open firmware of a PowerKVM guest and a PowerVM LPAR, identifies
itself with a DUID-LL built from the MAC and reports no UUID at all. makedhcp
derives the DHCPv6 reservation from vpd.uuid, so the reservation of a ppc64le
node can never match it: the node gets no reserved address and no RFC 5970
option 59, and its firmware has nothing to load.

Five cases are added to the identifier table. cn11 fails with the
firmware-order DUID-UUID where the DUID-LL of its MAC is expected; cn13 to cn15
fail with no DUID at all. cn12 sets mac.duid=firmware on a ppc64le node and
passes either way, so a change that gave every node a DUID-LL would not satisfy
the table. The MAC each DUID-LL is built from is asserted, so the expected
values are checkable by hand.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-03 19:29:50 -03:00
Daniel Hilst d202094813 test(xcat-core): an IPv6-only node that chainloads iPXE never gets a boot file
Over DHCPv6 a UEFI node that chainloads iPXE is two DHCP clients on one NIC, and
the two send different DUIDs. EDK2 copies the SMBIOS UUID into its DUID-UUID in
the order SMBIOS stores it, little-endian in the first three fields from SMBIOS
2.6 on. iPXE converts the same bytes to RFC 4122 order first. makedhcp reserves
the address for one DUID, so iPXE matches nothing, receives no RFC 5970 option
59 and prints "Nothing to boot: No such file or directory".

The second client also needs a different boot file. The shim loads ipxe.efi from
the directory it came from, which iPXE cannot do, so a chainloaded iPXE given
the shim again stops at "Failed to open ipxe.efi".

This adds the cases to xCAT-test/unit/dhcp_dhcpv6_duid.t. They assert on the
reservations that kea_build_node_reservations6 returns and on the omshell hosts
that makedhcp creates on ISC DHCP. Seven fail against the unfixed plugin.

One existing case moves from cn03 to cn01. It asserts that an ipxe node whose
shim is absent gets no option 59, and cn03 asks for the canonical DUID order,
which is the order iPXE sends, so the boot file of its first reservation is the
boot script and not the shim.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-02 14:58:30 -03:00
Daniel Hilst b195fea1a7 fix(yaboot): a dual-stack node is linked to a boot configuration name no firmware asks for
yaboot links its configuration file to one name for each address of the node in
the mac table. The name is sprintf("%02x%02x%02x%02x", split(/\./, $ip)), and an
IPv6 address has no four octets: sprintf reads the first field as a number and
fills the rest with zeroes, so 2001:db8:156::10 gives 7d1000000. A dual-stack
node got one correct link and one link to a name no firmware requests, with no
warning. getipaddr returns the IPv6 address first on such a node, so this is
reachable without an IPv6-only network.

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

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

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

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

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

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

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

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

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-31 08:55:22 -03:00
Daniel Hilst a85baeaf3d fix(template): the Subiquity install fetches from an unbracketed IPv6 server
The Subiquity templates build three URLs as
"http://#XCATVAR:XCATMASTER##COLONHTTPPORT#/install/autoinst/...", and that tag
renders the bare value of the master. For an IPv6-only node that is a literal
address, so wget read the last group as a port:

    wget -T 30 -O /tmp/getinstdisk http://2001:db8:147::1/install/autoinst/getinstdisk
    http://2001:db8:147::1/install/autoinst/getinstdisk: Bad port number.

The early-commands script runs under "set -eux", so that one line ended it.
subiquity reported CalledProcessError from Early/run, wrote a crash report of
kind "unknown", and stopped before curtin ran. Nothing in the installer logs
named the cause: curtin-install.log was empty, cloud-init was healthy, and the
error report that looked like the failure was the Error CONTROLLER loading its
own configuration.

Template.pm already computed $master_uri_host, bracketed for an IPv6-only
node, and used it for the SLES media URL and the repo baseurl. It is now
exposed as #MASTERURIHOST#, and the three URLs take it.

#XCATVAR:XCATMASTER# keeps the bare value where it is right: bash reads
/dev/tcp/<host>/<port> with no brackets, and the updateflag notification uses
that form.

subiquity_uri_host.t reads both templates, which are the artifact: every
http:// URL has to take the URI host, the /dev/tcp line has to keep the bare
one, and Template.pm has to substitute the tag. Restoring the bare tag in one
URL fails two checks; dropping the substitution fails the third.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 15:56:24 -03:00
Daniel Hilst 319a20106e fix(template): the Subiquity autoinstall gives an IPv6-only node DHCPv4 only
Both Subiquity templates wrote "dhcp4: true" for every node, in the network
section the installer uses and in the netplan the late command writes into the
installed system. An IPv6-only node has no DHCPv4 server to answer, so netplan
brought the provisioning NIC up with no address.

Measured on an IPv6-only node: the installer fetched its autoinstall seed over
IPv6, then could not configure the interface and fell back to asking at the
console. On a serial console that waits for a keypress, so the install stopped
at the mode prompt with no sign of why. The installed system would have had no
address either, which is the defect xcatroot had for a diskless node and
cd6719946 fixed there.

#SUBIQUITYDHCP:<indent># and #SUBIQUITYTARGETDHCP# render from the address
family of the node, beside the #SUBIQUITYINSTALLNIC# and #SUBIQUITYINSTALLMAC#
tags that were already there. An IPv6-only node gets dhcp6 with dhcp4 turned
off explicitly, because netplan defaults dhcp4 to false only when nothing
names it, and the overrides follow the family in use. An IPv4 node gets what
it had, byte for byte.

$node_ipv6_only becomes 'our' so a test can set it. subvars already computes
it before these substitutions run, so nothing recomputes the lookup.

subiquity_ipv6_netplan.t covers both families and both sites, and asserts the
templates carry the tags rather than a literal. ubuntu_subiquity_installnic.t
renders the new tag and gains an IPv6 case: it runs the late command for real,
and an unrendered tag is a shell comment that swallows the redirect, so that
test would have written no file at all.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 14:59:20 -03:00
Daniel Hilst 518ddee895 test(service-node): a check matches the path of the checkout it runs in
service_node_artifacts_el.t asserts the EL service template is not a
Subiquity one, and it matched the pattern against the whole absolute path. A
checkout directory named for the thing under test therefore matched itself:
in a worktree called ipv6-subiquity-net the check failed on
share/xcat/install/rh/service.rhels9.tmpl, which is the right template.

It now matches the basename. A real Subiquity template still fails it, and an
EL one in a path carrying the word still passes.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 14:59:19 -03:00
Daniel Hilst f92df9bc9b fix(debian): an IPv6-only Ubuntu node never configures its interface
subiquity_url_kcmdline left ip= out of the command line, on the reasoning that
casper treats an absent IPv4 half as already done. It does, and it also skips
the whole networking stage: casper calls configure_networking only inside

    if [ -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]

and STATICIP comes from ip=. With no ip= the interface was never brought up,
so wget answered "Cannot assign requested address" and casper panicked with
"Unable to find a live file system on the network". The URL, the brackets and
the served ISO were all correct; nothing had an address to reach them from.

ip=off takes that branch while asking for no IPv4: configure_networking reads
ip= into IP and treats off as already done, then runs dhcpcd -6 on ip6=dhcp.

Measured on an IPv6-only node. With ip=off the console shows dhcpcd-10.0.6,
then "Trying to download and mount http://[2001:db8:147::1]:80/.../install.iso",
and the management node's access log records

    2001:db8:147::1003 "GET /install/ubuntu24.04.4/x86_64/install.iso" 200 3405470119 "Wget"

the whole 3.2G ISO over IPv6, after which subiquity starts. Without ip=off the
same node fails at the wget every time.

debian_subiquity_boot_params.t asserts ip= is present. Removing it from the
command line fails that check alone.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 14:21:32 -03:00
Daniel Hilst 12e1deb45a fix(xcat-core): nothing installs radvd, so the IPv6 networks announce nothing
makedhcp writes /etc/radvd.conf for every IPv6 network in the networks table
and starts the service, and no package declared radvd. On a management node
that did not happen to carry it the file was written and nothing read it. A
client that follows RFC 4861 starts DHCPv6 only when an advertisement sets the
managed flag, and takes its on-link prefix and default route from the
advertisement rather than from the lease, so an IPv6-only node received one
address with a prefix length of 128 and no route to its server.

Measured on an Ubuntu management node: radvd.service answered "not-found"
while /etc/radvd.conf held the right configuration, the compute node held a
/128 DHCPv6 lease, and its installer answered "wget: can't connect to remote
host: Cannot assign requested address" when it tried to fetch its root over
HTTP. Installing radvd made the service active and makedhcp kept it that way.

xCAT and xCATsn now require it, in the rpm specs and in the Debian control
files. A service node answers DHCP for its own subnet and writes the same
file, so it needs the daemon too.

Depends rather than Recommends on Ubuntu, because the apt 3.0 solver drops a
Recommends: that is what took bind9 out of the 26.04 install and left makedns
with no named.

radvd_packaging.t reads the four manifests, which are the artifact. Removing
any one declaration fails its own check, and moving the Debian one to
Recommends fails the check that names the difference.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:45:04 -03:00
Daniel Hilst b1aac24b0a fix(dhcp): router advertisements reach an interface DHCP does not serve
configure_router_advertisements took the mgtifname of every IPv6 network in
the networks table. site.dhcpinterfaces names the interfaces this server
answers on, and the advertisement ignored it, so a management node restricted
to eth1 still advertised itself on eth0. Every client on that LAN can then
select it as a router, which is what restricting the interface was meant to
prevent.

The sub now takes the interface set the DHCP configuration was built from and
skips a network whose interface is not in it. All three call sites already had
the set: the ISC path in scope, and both Kea paths as a parameter. An empty or
absent set is no restriction, so a cluster that sets no dhcpinterfaces keeps
the behaviour it had.

There are also two fixes to how radvd is started:

- The service is examined on every call rather than only when the
  configuration file changed. A start that failed left the file already
  correct, so every later makedhcp returned on the file alone and never tried
  again while radvd stayed down. The call also moved out of the dhcpd6 restart
  branch of the ISC path, which a repeat makedhcp does not enter at all.
- restartservice answers -1 when the service is not installed and the exit
  status of the command otherwise. Only the -1 was reported, so a radvd that
  failed to start was silent. Every nonzero result is now reported, and the
  message says which of the two it was.

dhcp_dhcpv6_duid.t drives the sub directly for the service cases, because
process_request reaches it only on some paths. Dropping the interface filter
fails the check on an unserved network; restoring the early return on an
unchanged file fails the restart check and leaves the one for a service that
is already up passing; ignoring a positive exit status fails the two checks
that name it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:18:35 -03:00
Daniel Hilst 2ac19d7202 fix(debian): an IPv6-only node is given [<xcatmaster>] as its gateway
mknetboot read networks.gateway and passed it to dracut_static_ip6 as it
stood. '<xcatmaster>' is the common value of that column, and it reached the
kernel command line as "[<xcatmaster>]", which is not an address. A node whose
image server sits off its own link then had no route to it.

static_ip6_boot_arg resolves the gateway through ipv6_server_for_node, which
already knew the placeholder and which the AutoYaST path already used. A
gateway that does not resolve is dropped rather than written as a bad address:
an address with no route still reaches a server on the same link.

The composition is its own sub, taking its two lookups as coderefs, because
the helpers were covered while nothing connected them to the call site.
debian_static_ip6_gateway.t drives it with the real dracut_static_ip6.
Passing the gateway unresolved puts "[<xcatmaster>]" in the argument, which
two of its checks report.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:18:14 -03:00
Daniel Hilst 7f8fc5a937 fix(debian): copycds deletes the install media when it is given the ISO in the tree
link_install_iso unlinked its destination and then created the link. copycds
can be given the ISO that is already in the install tree, or the link that a
previous run left there, and the destination is then the same file as the
source. The unlink deleted it, and the symlink that followed pointed at a path
that no longer existed. An ISO copied into /install by hand was lost, and the
tree was left with a dangling link that answers 404 to the node fetching it.

The source and the destination are now compared by device and inode before
anything is removed, which also follows the link, so a second copycds of the
same media leaves the link alone instead of recreating it.

debian_subiquity_boot_params.t covers an ISO at the destination, a link that
resolves to the media, and a different ISO that replaces the link. Without the
comparison the first case leaves a dangling link and the file is gone, which
three of the new checks report.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:18:14 -03:00
Daniel Hilst 3fbf0b2a85 fix(xcat-test): a conf value is cut at its first semicolon
The value class of the conf parser held ':' and '/' and not ';', so
"othersettings=cpumode:host-passthrough;firmware:efi-secureboot" was read as
"cpumode:host-passthrough" and the rest was dropped with no warning. chtab
wrote the row with the first setting alone, and the node was defined without
the firmware it needs to boot over IPv6. The [Object_*] branch had the same
class and the same effect on vmothersetting.

The chtab command was also built by interpolation, with the row selector
unquoted, so a row name or a key carrying shell syntax would have ended the
command. chdef left its type and object name unquoted for the same reason.

parse_conf_assignment is now the one place the class is written, for both
section kinds. table_row_command builds the chtab command with every argument
quoted, the row selector among them, and object_definition_command quotes its
type and name.

xcattest_object_quoting.t asserts the argument list each command delivers, not
only its text, so a quoting change that splits an argument is caught. Removing
';' from the class fails the one check that names a semicolon value and leaves
the other fifteen passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:17:39 -03:00
Daniel Hilst 8c704104ab fix(template): the AutoYaST profile gives a node its gateway as a resolver
_autoyast_network6 replaced '<xcatmaster>' in site.nameservers with the
gateway of the node, and fell back to the gateway when the list held no IPv6
address. '<xcatmaster>' is the management node, which runs named. The gateway
is not: a cluster whose gateway is a separate router gave every node a
resolver that answers nothing, and a cluster with no gateway gave none at all,
so the installed node resolved no hostname.

The placeholder now resolves through ipv6_server_for_node, which is what the
gateway itself already used. A value that is not an address is not written,
so an unresolvable placeholder leaves the list empty rather than putting
"<xcatmaster>" in the profile.

autoyast_ipv6_network.t gains a management node that is nobody's gateway, so
the two can be told apart, and the check that asserted the old behaviour now
asserts the new one. Restoring the gateway fails five checks and leaves the
other nineteen passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:17:23 -03:00
Daniel Hilst 7f46d8dab3 fix(ipv6): an NFS root loses the last group of its IPv6 server
substitute_facing_address brackets the facing address only where a port
follows the placeholder. An NFS root carries the server between two colons,
as in "root=nfs:!myipfn!:/install/netboot", so an IPv6 server came out as
"root=nfs:2001:db8::1:/install/netboot". dracut reads the server up to the
last colon, so it took "2001:db8:" and the statelite node could not mount its
root.

The substitution now also brackets a placeholder that an NFS path follows. A
placeholder with nothing after it still takes the bare address, because
xcatd=!myipfn! names a host with no port and the postscripts read that value
as it stands.

networkutils_ipv6_helpers.t covers both forms in one command line. Removing
the new substitution fails the two IPv6 checks and leaves the IPv4 and
bare-placeholder checks passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:17:23 -03:00
Daniel Hilst c0f8fd42b0 feat(debian): an IPv6-only node installs Ubuntu from the ISO over HTTP
An IPv6-only node could not install Ubuntu. subiquity_boot_params refused it,
because casper mounts the live filesystem with klibc nfsmount, which has no
IPv6: it answers "need a path" for "[2001:db8::1]:/export" and for
"2001:db8::1:/export", while an IPv4 server gets past parsing to the mount.
casper takes nfsroot= as an opaque path, so no option changes the family.

casper has a second route. do_urlmount downloads an ISO with casper's own
wget, which speaks IPv6, and loop-mounts it, and the network itself was never
the limit: init parses ip6= and configure_networking runs "dhcpcd -1KL -6" on
it. The route needs an ISO to fetch, and xCAT serves the extracted media and
kept no ISO.

copycds now passes the ISO it was given to the distribution plugin, which
links it into the install tree as install.iso. A symbolic link, because the
Ubuntu 24.04 ISO is 3.2G, and the xcat.conf xCAT ships gives /install
"Options FollowSymLinks". A block device has no path to link and passes none.

An IPv6-only node then gets "ip6=dhcp boot=casper netboot=url
url=http://[server]:port/install/<os>/<arch>/install.iso", with no nfsroot
and no toram: do_urlmount already holds the ISO in the initramfs tmpfs, so
copying the live filesystem again only doubles the memory the node needs.
That memory is the cost of the route -- 3.2G for the ISO on top of the
installer -- so a node with 4G cannot take it.

An IPv4 node is untouched and still mounts its root over NFS. A tree copied
before this change carries no ISO, so such a node is refused as before, with
a message naming install.iso and copycds.

debian_subiquity_boot_params.t goes from 17 checks to 36. Routing an IPv6-only
node back to the NFS form fails the six HTTP checks; dropping the bracketing
fails exactly the two bracketing checks; and returning success from
link_install_iso without creating the link fails the three that read the link
back, while the one that reads the return value still passes.

Not yet booted on a cluster.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:42:54 -03:00
Daniel Hilst 8cfb0c60a9 fix(debian): the Subiquity refusal names the wrong component
subiquity_boot_params refuses an IPv6-only node and says the live installer
"configures its network and mounts its root with klibc, which has no IPv6
support". The first half is wrong. casper reads ip6= from the kernel command
line and configures the interface with dhcpcd -6, which speaks DHCPv6:
scripts/functions runs "dhcpcd -1KL -t $ROUNDTTT -6" on the ip6= value, and
init parses ip6= at line 156. klibc ipconfig is only the IPv4 branch.

The one component with no IPv6 is klibc nfsmount, which casper uses for the
live filesystem. Measured on noble klibc-utils 2.0.13: it answers "need a
path" for "[2001:db8::1]:/export" and for "2001:db8::1:/export", while an
IPv4 server gets past parsing to the mount, and the binary carries no inet6
string against seven nfs and mount strings.

The refusal stands, because casper takes nfsroot= as an opaque path and has
no way to pass it an address family. Only its reason changes. The comment
also records the route that would close this: netboot=url fetches an ISO with
casper's own wget, which does IPv6, and that is a different provisioning
method than the extracted tree xCAT exports.

The check on the message matched /klibc/, which is the family and not the
component, so it passed for any klibc tool. It now matches /nfsmount/, and
the previous wording fails it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:31:41 -03:00
Daniel Hilst ec5acc96a1 fix(yaboot): a dual-stack node is linked to a boot configuration name no firmware asks for
yaboot links its configuration file to one name for each address of the node
in the mac table. The name is sprintf("%02x%02x%02x%02x", split(/\./, $ip)),
and an IPv6 address has no four octets: sprintf reads the first field as a
number and fills the rest with zeroes, so 2001:db8:156::10 gives 7d1000000.
A dual-stack node therefore got one correct link and one link to a name no
firmware requests, with no warning. An IPv6-only node got only the second.

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

The facing address was found with my_ip_facing, which resolves with inet_aton
and reports an IPv6-only node unresolvable. yaboot_facing_address asks
node_address_family first, the way grub2.pm and petitboot.pm do, and the
!myipfn! substitution goes through substitute_facing_address so a placeholder
that a port follows is bracketed.

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

yaboot_ipv6.t covers both subs. Restoring the unguarded sprintf fails the
four name checks; calling my_ip_facing unconditionally fails the three family
checks. The IPv4 checks pass under both, which is what tells the two defects
apart from a test that dies.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:23:38 -03:00
Daniel Hilst 6dcde28dc9 fix(petitboot): an IPv6-only node is given a boot configuration name no firmware asks for
petitboot asks for a configuration file named after the four octets of the
IPv4 address of the node, in hexadecimal. The name is built with
sprintf("%02x%02x%02x%02x", split(/\./, $ip)), and an IPv6 address has no
four octets: sprintf reads the first field as a number and fills the rest
with zeroes, so 2001:db8:156::10 gives 7D1000000. nodeset then links the
configuration to a name no firmware requests, reports success, and the node
boots nothing.

petitboot_config_name returns the name only for an address that has four
octets in range, and nodeset reports the node instead of linking a name that
cannot work. The message says what to use: an IPv4 address on the node, or
netboot=grub2, which carries the server in the boot file URL and needs no
name of this form.

This is a refusal, not support. What name petitboot asks for over DHCPv6 is
not established here, and no cell in the lab runs petitboot, so the value
cannot be measured. An error that names the limit is what an operator can
act on; a wrong name is not.

Five checks in petitboot_ipv6.t cover it. Restoring the unguarded sprintf
fails the three IPv6 and undef checks and leaves the two IPv4 checks passing,
including the name of 192.0.2.50, which stays C0000232.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:15:49 -03:00
Daniel Hilst 9cc9503a96 fix(petitboot): an IPv6 node loses the server from its kernel and initrd URL
petitboot builds the URL it fetches a kernel and an initrd from as
"$httpmethod://$installsrv:$httpport$tftpdir/", so an IPv6 install server
gives "http://2001:db8::1:80/tftpboot/...", which cannot be split into a host
and a port. The node then has no server to fetch from.

The facing address is found with my_ip_facing, which resolves with inet_aton.
An IPv6-only node is reported unresolvable, and the node gets no
configuration at all.

petitboot_boot_url builds the URL through uri_authority, which brackets an
IPv6 address. petitboot_facing_address asks the family of the node which
helper answers, the way grub2.pm does. The three !myipfn! substitutions go
through substitute_facing_address, which brackets the placeholder that a port
follows and leaves every other one bare. petitboot.pm also now loads
xCAT::NetworkUtils, which it has always used and never named.

An IPv4 node keeps the URL it had, byte for byte, including the port that the
old form always wrote.

petitboot_ipv6.t covers both. Writing "$server:$port" back in place of
uri_authority fails the two IPv6 URL checks. Calling my_ip_facing
unconditionally fails the three family checks. Neither mutation touches the
IPv4 checks, which is what separates the two defects from a test that dies.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:15:36 -03:00
Daniel Hilst 38a60074e0 fix(dhcp): a unit test writes the radvd configuration of the host it runs on
configure_router_advertisements writes /etc/radvd.conf and runs sysctl on the
management interface. dhcp_dhcpv6_duid.t drives makedhcp through
process_request, so the test reaches both. The suite runs as root in the
GitHub CI, where the test therefore replaces the real /etc/radvd.conf of the
runner and turns IPv6 forwarding on for its interfaces.

Where the file is not writable the warning also reaches the callback that
other checks read, so the test failed on an unprivileged host:

  Structures begin differing at:
       $got->[2] = 'Cannot write /etc/radvd.conf, so the IPv6 networks
                    announce no route: Permission denied'
  $expected->[2] = Does not exist

The path is now the package variable $radvdconffile, and the sysctl call is
the sub enable_ipv6_forwarding. The test localizes both, the way it already
localizes $dhcpconffile and xCAT::Utils::restartservice.

Six checks now cover the behaviour the configuration carries: the file is
written, it names the interface of the IPv6 network, the interface sends
advertisements, the managed flag is on, the prefix is announced, and
forwarding is enabled. Removing the call from the ISC path fails exactly
those six and leaves the other 127 passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:15:08 -03:00
Daniel Hilst c0698fa253 Merge pull request #7995 from VersatusHPC/fix/opensuse-mn-package-requires
fix(xcat-core): xCAT cannot be installed on an openSUSE management node
2026-10-30 09:57:51 -03:00
Daniel Hilst 10c30c80ba Merge pull request #7993 from VersatusHPC/fix/getpostscript-client-identity-v2
fix(xcat-core): getpostscript serves no node when the client reverse lookup is empty
2026-10-30 09:57:22 -03:00