Keep rendering and client execution on the shared filesystem fixture. Preserve raw status, output ordering, temporary storage and repository visibility through explicit adapter options.
Keep synthetic kernel inputs, FIPS files and host-tool policies in the Genesis adapters. Share only namespace setup and command provisioning, with explicit setup error propagation and behavioral isolation checks.
Share filesystem setup, command staging and executable restrictions. Keep each adapter responsible for its script mounts and working directory.
Route and package cases now use the common restricted tool set and per-test writable directories. Preserve their command doubles and network namespace isolation.
Reuse fixture allocation and file access through ImageSandbox. Keep the prerequisite checks, XCATROOT, process status and output capture contracts of each adapter. Exercise those contracts in private namespaces.
Keep console environment paths in one owner without changing caller-specific locale, terminal or program settings. Trigger console checks when the owner changes.
Read repository assets through the test path owner. Use File::Slurper for generated files and command fixtures, preserving optional reads, line boundaries and executable modes.
Reuse the dependency guards, message collector and session recorder in
both SDR suites. Keep callback execution and assertions in their callers.
Limit the cache test command guard to cache-directory creation.
The case saves /etc/passwd, /etc/group and /etc/shadow on the compute
node to /tmp, and puts them back with mv -f. mv keeps the tmp_t label
of the copy in /tmp. On a node that runs SELinux enforcing, sshd then
cannot read /etc/shadow, so every later xdsh to the node fails. On the
el9 and el10 CI cells about sixty later cases failed for this reason.
Put the files back with cp -f, which keeps the label of the file in
/etc.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 20903fce1c)
(cherry picked from commit 7d8af9ecc8a6b3701ff1b8ae482c57b9493d2b17)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
selinux_cn_diskful_enforcing provisions a diskful compute node with
SELinux enforcing and expects no xCAT denial on it. The SELinux support
covers the management node only: xcatd runs in xcat_t and the image
build in xcat_image_t, and no policy is shipped for a compute node.
The case therefore cannot pass, and its failure reads as a defect in
the management-node policy.
Remove the case from testcase/selinux/cases1 and from selinux.bundle.
selinux_bundle.t still passes: every remaining case is in a bundle.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3c254f221a)
(cherry picked from commit f85106929cc94872d0e9cdc02b735f5387f45615)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Five cases in xcatroot_rootimg_checksum.bats run the Ubuntu xcatroot
as a systemd initial ramdisk runs it:
- with imgurl, XCAT and rootimgchecksum only on the kernel command
line, not in the environment;
- with the DNS servers and domain only in the systemd-networkd lease;
- with an image whose resolv.conf links to the systemd-resolved stub;
- with an image whose hostname file is empty.
Three of them fail on this tree. The other two check that a
resolv.conf and a hostname which are already set are kept.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit e221262d91de99299341d0ca35248c9360dab342)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
ubuntu_netboot_initqueue.bats captures two defects in the Ubuntu dracut
module. The boot NIC gets no DHCPv4 lease, because nothing turns on
DHCP for the 70-BOOTIF.network file that systemd-network-generator
writes from BOOTIF=. And xcat-cmdline.sh writes its finished condition
outside $hookdir, so dracut-initqueue ends before the settled hook
that fetches the root runs. Both new cases fail on this tree.
imgutils_ubuntu_dracut_module.t now also checks the inst_simple
sources of the install script.
ubuntu_netboot_root_handler.bats sourced the online hook from sh. On
an Ubuntu host sh is dash, whose "." passes no arguments, so two cases
failed there. The initramfs sh is bash, so the cases now use bash.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 22cf6d78573f3df38c5d395dde4f50fc5c7a3640)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An IPv6 address can end in dotted decimal: 2001:db8:1::192.0.2.20 and
2001:db8:1::c000:214 are the same address. ipmitool and BMCUtils accept
the dotted form, but ipv6_expand in bmcsetup rejects the dots, so an
OpenBMC configured with that spelling reports installstatus failed.
The new cases check the final OpenBMC status for both spellings, in both
directions, and for a different address. The first case fails on the
current bmcsetup.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
An OpenBMC node can report "failed" after its IPv6 address is set
correctly, and "bmcready" when the BMC has a different address.
bmc_has_address in bmcsetup searches the lan6 print output for the
configured text, so a different spelling of the same address does not
match, and "2001:db8:1::2" matches "2001:db8:1::20".
The new tests give the BMC equivalent spellings (zero-padded and
compressed, upper and lower case, with and without a prefix length),
and different addresses that share a text prefix, for IPv6 and IPv4.
They fail on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
rewritemyfru answers "Unable to prove root on your IP approves of this
request" to a node on an IPv6 cluster, so the FRU of the node is not
rewritten.
The new test starts a credential listener on ::1 and on 127.0.0.1 and
calls ok_with_node and process_request in frusetter.pm against it. The
IPv6 tests fail on this commit. The IPv4 tests pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On an IPv6 cluster, bmcsetup in Genesis sends the bmcready status to
"[2001" instead of the management node. An OpenBMC node also reports
"failed" after its IPv6 address is set correctly.
The new tests run bmcsetup with xcatd=[2001:db8::1]:3001 on the kernel
command line and XCATMASTER in the environment, as doxcat starts it.
They record the host that updateflag.awk and allowcred.awk receive. The
OpenBMC tests supply the lan6 print output of the BMC. The IPv6 tests
fail on this commit. The IPv4 tests pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
getbmcconfig answers "Unable to prove root on your IP approves of this
request" to a Genesis node on an IPv6 cluster, so getipmi retries and
bmcsetup never configures the BMC.
The new test starts a credential listener on ::1 and on 127.0.0.1 and
calls ok_with_node and process_request in bmcconfig.pm against it. The
IPv6 tests fail on this commit. The IPv4 tests pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On an IPv6 cluster, getcert and bmcsetup in Genesis start allowcred.awk
with the environment that doxcat exports. doxcat exports XCATMASTER.
allowcred.awk reads only MASTER_IP and MASTER, so it opens an IPv4
listener. xcatd calls back over IPv6, gets no answer and issues no
certificate.
The existing tests set MASTER_IP, so they do not see this failure.
The new tests start the Genesis allowcred.awk with only XCATMASTER,
XCATPORT and XCATDEST set, as doxcat does, and connect over the family
of that address. The IPv6 test fails on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
bmcconfig finds the netmask and gateway of a BMC with inet_aton and a
dotted-quad match, so a BMC with an IPv6 address gets no network and
Genesis does not configure it. bmcsetup only writes IPv4 LAN parameters.
Move the network lookup of net_parms into xCAT::BMCUtils::bmc_net_params,
with the IPv4 behaviour unchanged, so a unit test can call it. Add tests
for the IPv4 and IPv6 results of the lookup, and bats tests for the lan6
commands that bmcsetup must issue. The IPv6 tests fail on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhcp_dhcpv6_duid.t fails 5 checks on Kea. A client without a
reservation gets the iPXE loader, and the test expects no bootfile-url.
The test is stale. 69737e20f gave each IPv6 network Kea client classes,
so that an unknown UEFI x86_64 client gets the iPXE loader and can start
sequential discovery. kea_client_classes6 adds that class only when the
loader is in site.tftpdir. The GitHub runner installs the loader, so the
pool clients of the test get it. The unit suite failed before this file
ran on every push since then, so no run reported the change.
The test now sets site.tftpdir to a private directory that holds the
loader, and expects the loader for the Kea clients without a
reservation. The ISC checks do not change, because the ISC backend has
no such class. The result no longer depends on the files of the host.
On a tree before 69737e20f the new checks fail, 5 of 64. On the current
tree they pass, with and without the loader in /tftpboot.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT does not set rd.net.timeout.carrier. dracut does not retry a static
ip= configuration that found no carrier. On a port whose link came up
46 s after the driver loaded, the EL and openEuler installer logged "No
carrier detected" and stopped in the dracut emergency shell.
_el10_static_ipv6_boot_args now adds rd.net.timeout.carrier=120. dracut
waits only while the boot interface has no carrier. The static IPv4
path of managedaddressmode=static and the Ubuntu diskless path do not
get the argument.
anaconda_ipv6_rendering.t fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT does not set rd.net.timeout.carrier. dracut does not retry a static
ip= configuration that found no carrier. On a port whose link came up
46 s after the driver loaded, the installer logged "No carrier
detected" and stopped in the dracut emergency shell.
The test expects rd.net.timeout.carrier=120 in the static IPv6 boot
arguments of the EL and openEuler installer. It fails before the fix.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
run_genesis stops the Genesis script after 20 s. On a riscv64 host,
tests 2 and 3 of genesis_secondary_dhcp6_order.bats take about 34 s
each, so they fail with exit 124 although the script is correct.
The cap is now 120 s, and GENESIS_SANDBOX_TIMEOUT overrides it. With
GENESIS_SANDBOX_TIMEOUT=10 on x86_64, tests 2 and 3 fail with exit
124, which is the failure seen on riscv64.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
After chdef <node> ip=<IPv6> and makehosts <node>, /etc/hosts holds the
old IPv4 line and the new IPv6 line of the node. node_address_family
answers 4, and nodeset renders an IPv4 install with no warning.
The test runs makehosts with and without a noderange on a node that
changed family, and on a dual-stack node, whose two lines must stay.
The three family-change assertions fail before the fix. The dual-stack
and makehosts -m assertions pass before and after it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
grub2 adds BOOTIF= to the kernel command line of every node. On Ubuntu
26.04, systemd-network-generator then writes 70-BOOTIF.network with no
address. It drops an ip= that names no interface, and a file for a named
interface sorts after 70-BOOTIF.network. debian.pm gives the static ip=
an empty interface when the node has no installnic or primarynic.
The test drives static_ip6_boot_arg with the net_params of the caller.
It expects rd.bootif=0 on every static ip=, and ifname=xcatboot0:<mac>
when the node has no installnic. 5 of its 9 assertions fail before the
fix.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedhcp applies the firmware and canonical policies of mac.duid to
vpd.uuid. configdhcpv6duid applies them to product_uuid of the node. A
KVM domain that an earlier mkvm defined holds the byte swap of
vpd.uuid, so in that guest product_uuid is the swap. With duid=canonical
the installed DHCPv6 client then sends the firmware order, and matches
no reservation.
postscript_dhcpv6_duid.bats gives the script a vpd.uuid in VPDUUID and
a product_uuid that is its swap, and asserts the DUID that makedhcp
reserves for each policy. It also asserts that mypostscript exports
VPDUUID. The five tests fail on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
genesis_openembedded_duid.t fails in the unit suite. The
xcat-genesis-network recipe enables xcat-genesis-duid.service and
xcat-genesis-bootnic.service, and the test matched SYSTEMD_SERVICE
against a list that holds the first unit alone.
The test now reads SYSTEMD_SERVICE as a list and asserts that it holds
xcat-genesis-duid.service. With that unit removed from the recipe the
assertion fails, and with the recipe as it is the test passes.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A KVM guest that mkvm defines gets no reserved IPv6 address for its
firmware, its Genesis image or its installed system. The address is
reserved for the DUID that iPXE sends.
dhcp6_firmware_uuid_order answered canonical for mgt=kvm. That was
true while getNodeUUID wrote the byte swap of vpd.uuid into the domain.
The carried kvm fixes make mkvm write the UUID that the guest reports
as vpd.uuid, so the firmware of the guest sends the byte swap of
vpd.uuid, as a physical node does.
dhcp6_client_duid now uses the firmware order for every node that sets
no duid attribute, as the mac.duid schema text states. The
dhcp6_firmware_uuid_order sub, its test and the nodehm read in
dhcp6_client_duids are removed. Comments that described the old mkvm
now describe a domain that an earlier mkvm defined.
dhcp_dhcpv6_duid.t asserts that a kvm node holds its address on the
byte-swapped order. It fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mkvm now gives the libvirt domain the UUID that the guest reports as
vpd.uuid, through xCAT::KVMUtils::guest_uuid. The firmware of the guest
then sends the byte swap of vpd.uuid, as a physical node does.
dhcp6_firmware_uuid_order still answers canonical for mgt=kvm, because
it was written for the earlier mkvm that swapped the UUID. So makedhcp
reserves the address of a KVM node for the DUID that iPXE sends, and
the firmware, Genesis and the installed node match no address.
dhcp_dhcpv6_duid.t now asserts that a kvm node holds its address on
the byte-swapped order, as a node xCAT does not define does. The
assertion fails on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On ISC DHCP a KVM guest that xCAT defines and that netboots with ipxe
boots neither stage: the firmware receives the iPXE boot script and
iPXE receives the shim.
addnode6 and addnode6_other_clients chose the boot file of each DHCPv6
host from the client label of its DUID. The label follows from vpd.uuid,
but which UUID order the firmware sends depends on the UUID of the
libvirt domain. For a guest that mkvm defines the labels are reversed.
The two hosts that hold a UUID order of a chainloading node now carry
one statement that chooses the file by boot stage: the boot script when
option 15, the User Class, holds iPXE, and the shim otherwise. The Kea
classes from kea_node_boot_classes6 make the same split.
isc_dhcp6_boot_stage_statement in BootPolicy builds the statement.
dhcp_dhcpv6_duid.t asserts the statement on both hosts of a KVM node.
The assertions fail without this change. Two older assertions expected
one file per label and now expect the statement.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On ISC DHCP, makedhcp gives each DHCPv6 host of a netboot=ipxe node the
boot file of the client that its DUID label names. The firmware of a
KVM guest that xCAT defines sends the canonical UUID order and iPXE
sends the swap, so the labels are reversed. ISC gives the boot script
to the firmware and the shim to iPXE, and the node boots neither.
dhcp_dhcpv6_duid.t runs makedhcp on ISC for a KVM ipxe node and asserts
that the host of each UUID order chooses the boot file by the iPXE user
class, option 15, as the Kea classes do. Both assertions fail on this
tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
When the Control Agent host updates succeed, makedhcp restarts Kea only
if client_classes_changed is set. kea_process_request sets it from the
DHCPv4 class updates alone. The results of kea_sync_node_boot_classes6
and kea_remove_node_boot_classes6 are discarded, so an IPv6-only node
skips the reload: a new boot class stays inactive and a deleted one
stays active.
dhcp_kea_reload_boot_classes6.t runs kea_process_request with a Kea
backend whose live host commands succeed, and counts the restarts. It
asserts a restart when a DHCPv6 boot class is added or removed, and
keeps the two controls: no class change, and a DHCPv4 class change.
The two DHCPv6 assertions fail on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With site.httpport=8080 an unknown node loads iPXE over DHCPv6 and
cannot fetch the boot script of its network. kea_client_classes6
writes that URL with no port, so the client asks port 80.
dhcp6_boot_client_classes.t gives kea_client_classes6 port 8080 and
asserts the port in the second-stage URL. dhcp_dhcpv6_duid.t sets
site.httpport and asserts the same URL from kea_boot_client_classes6,
which is the caller in the plugin. Both assertions fail on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
kea_client_classes6 builds the boot classes of one network, and the
subnet names them in its additional-class list. The classes do not set
the additional-only flag, so Kea also evaluates them for every client of
every other subnet. A discovery client on the second network then
receives the boot URL of the first network.
dhcp6_boot_client_classes.t renders the classes of one network through
the Kea backend and asserts that each one carries
only-in-additional-list. The assertion fails on this tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On Ubuntu 26.04 genimage stops with "dracut[F]: Cannot install a hook
(.../97xcat/xcat-online.sh) that does not exist". install.netboot hooks
xcat-online.sh into initqueue/online, but mkinitrd_dracut in the Ubuntu
genimage copies a fixed file list into 97xcat, and that list does not
name xcat-online.sh. The stateless image gets no initrd and no kernel,
so nodeset fails and the node never boots.
This commit moves the copy into imgutils::stage_dracut_module, with the
same file list, so a unit test can call it. The test stages each mode
from the source tree and checks that every file the staged install
script gives to inst_hook is in the module. It fails on xcat-online.sh.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 4155d98dc35a65d5d6721298bf9c2c89428a29fa)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
After the IPv6 diskful install on xcat88-cn, the node netbooted iPXE,
which fetched nodes/seqdisc1.uefi and ran its "exit". OVMF loaded
BootManagerMenuApp, and the node waited at "Please select boot device"
until the case timed out.
UEFI firmware that runs a boot option which returns success stops at
its boot manager menu and does not try the next option. iPXE "exit"
returns success. _write_uefi_exit_script in xnba.pm, which the ipxe
method also uses, now writes "exit 1", so the firmware goes on to the
disk. The BIOS script keeps "exit". netboot_ipxe_method.t fails
without this change; xnba_semicolon.t is updated to the new script.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
After the IPv6 diskful install on xcat88-cn, the node netbooted iPXE,
which fetched nodes/seqdisc1.uefi and ran its "exit". OVMF then loaded
BootManagerMenuApp and the node waited at "Please select boot device"
for the rest of the case. UEFI firmware that runs a boot option which
returns success stops at its boot manager menu instead of trying the
next option, and iPXE "exit" returns success.
The test sets an ipxe node to boot and asserts that its UEFI script
exits with a failure status. It fails today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
"the online hook calls the handler with dracut's three arguments" and
"a second interface does not fetch the image again" fail in the GitHub
CI with "called: No such file or directory". Both cases source
xcat-online.sh from sh. On Ubuntu sh is dash, and the dash "." builtin
passes no arguments, so the hook sees no interface and returns before
it calls the stub handler.
The initramfs links sh to bash, so the cases now source the hook from
bash. Run on an Ubuntu host, both cases fail before this change and
pass after it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The OpenEmbedded metadata check failed in test_installed_network with
'xcat-genesis-bootnic.service' missing from the expected set. The
xcat-genesis-network recipe installs and enables genesis-bootnic and
its unit since the Genesis DHCPv6 boot nic fix, and the test still
expected only xcat-genesis-duid.service.
The test now expects both services, and asserts that the bootnic
script is installed and that its unit runs it before NetworkManager.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Sequential discovery over IPv6 matched the pool node and then failed
with "No nic found in deploy network for seqdisc1". NetworkManager
installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as
2001:db8:188::1004/128. hosttag_for_ipv6_nic masked both addresses with
that prefix length, and a /128 never matches the address of the node.
For a /128, hosttag_for_ipv6_nic now takes the network from the IPv6
rows of the networks table, which nodediscover reads once per request
through the new ipv6_networks. discovery_hosttag_ipv6_nic.t fails
without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On xcat88-mn the findme from the OpenEmbedded Genesis reached xcatd
over IPv6 and seqdiscovery matched seqdisc1, then zzzdiscovery failed
with "No nic found in deploy network for seqdisc1". NetworkManager
installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as
2001:db8:188::1004/128. hosttag_for_ipv6_nic masks both addresses with
that prefix length, and a /128 never matches the address of the node.
The test asserts that a /128 lease inside an xCAT IPv6 network of the
node is the node itself. It fails today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
seq_discovery_ipv6 clears mac= on the compute node and runs makedhcp,
so the node is unknown and sends a findme. kea_node_reservations6
drops the reservation of a node with no MAC, but
kea_node_boot_classes6_for_nodes still writes the two per-node classes,
which match the DUID. On xcat88-cn iPXE took a pool address and still
fetched nodes/xcat88-cn.uefi, Genesis booted with destiny=shell, and
xcatd never ran sequential discovery.
The test clears the MAC of an ipxe node and asserts that it gets no
reservation and no boot class. The class assertion fails today.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedns on a dual-stack or IPv6-only cluster fails in six places:
- a node in an IPv6 network whose prefix is not a multiple of 4 makes
get_reverse_zones_for_entity die, and makedns stops;
- the reverse walk asks the resolver for the NS of ip6.arpa. and arpa.,
because its stop list matches only upper case;
- a node whose hosts.ip is IPv4 gets an AAAA but no PTR for its IPv6
address;
- site.dnsinterfaces does not replace "listen-on-v6 port 53 { ::1; };"
of the EL named.conf, so named stays on ::1;
- site.dnsupdaters is written after the allow-update block of a new
zone, which named rejects;
- hosts.otherinterfaces and nics.nicips with the ":" separator cut an
IPv6 address at its first colon.
ddns_ipv6_records.t runs each routine and reads the records, the
named.conf or the host entries it produced. These checks fail on this
commit and pass with the fixes that follow.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
genesis-bootnic writes ipv6.method into [connection-*] sections of a
NetworkManager conf.d file. NetworkManager.conf(5) does not list
ipv6.method among the properties such a section can default, so
NetworkManager ignores it. On xcat88-cn all three nics still sent a
SOLICIT under the same DUID, and the boot nic held a pool address
while a secondary nic held the reservation.
The test asserts that the boot nic gets a connection profile bound to
its BOOTIF address with ipv6.method=auto, that the other nics get a
link-local profile, and that no conf.d file carries ipv6.method. It
fails on the current script.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dracut SOURCES a hook: source_all runs `. "$f" "$@"`. An `exit` in the hook
therefore ends networkd-run.sh, which is the script bringing the network up, so
the early return path would stop network setup on the second interface. A compute
node with three nics on the provisioning network reaches that path.
The hook leaves with `return` now. A case sources it with the marker already
present and asserts the caller still runs; putting `exit` back fails only that
case. Two cases drove the hook with `sh hook.sh` and now source it, which is both
what dracut does and what `return` requires.
dracut's own 98syslog/rsyslogd-start.sh uses `exit` in an online hook, so the
convention is not uniform. `return` is correct for a sourced script and says what
is meant: end this hook, not its caller.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dracut dispatches a netroot= handler from network-legacy's ifup. Ubuntu 25.10 and
later ship no network-legacy, so network resolves through systemd-networkd and
nothing calls /sbin/netroot. install.netboot already says so in a comment, and
treats the dispatcher as optional.
Measured on xcat32-cn with the 26.04 netboot image: the initramfs does no DHCP of
its own, the management node logs no request for rootimg.cpio.gz, and dracut
enters emergency mode 3.3 seconds in. Under quiet that surfaces as "Failed to
isolate default target". The initrd is complete: modules.txt lists network,
systemd-networkd, net-lib, nfs and xcat, and both /sbin/netroot and
/sbin/xcatroot are present. Nothing calls them.
The cases run install.netboot the way dracut does, with its helpers stubbed, and
assert what it registers. They also drive the new hook with a stub handler.
Deleting the registration fails only "the root handler is registered on an
interface coming online".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
genesis_nic_has_address ends the wait for the boot nic on an address of either
family. xcatd is on one family, so on a dual stack provisioning network the node
can go on to getcert and getdestiny holding only the family xcatd is not on, with
no route to the management node.
The cases drive the three address helpers out of doxcat with a stub ip and assert
what ends the wait for an IPv4 xcatd and for an IPv6 one. Two of the six fail
before the change: "an IPv6 xcatd is not reached by an IPv4 address alone" and
"an IPv4 xcatd is not reached by an IPv6 address alone". The other four pass
before and after, so the file is not vacuous.
No cell is in this state today, because an IPv6 cell serves no IPv4 pool and an
IPv4 cell sends no router advertisement, so the boot nic gets one family. The
form was still wrong.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
A DHCPv6 reservation is keyed on the DUID, and a DUID names the machine, not the
nic. 10-xcat-genesis.conf puts the DHCPv6 settings in [connection], which
NetworkManager applies to every nic, so each nic of a node asks for the same
reserved address and Kea gives it to the first REQUEST.
Measured on xcat88-cn, which carries three nics on the provisioning bridge
virbr-p88. Kea logged four solicits under one DUID in one boot, and granted
2001:db8:188::20 to whichever IA asked first; the others took pool addresses.
The node then reported to xcatd from an address xcatd could not match to a node,
so el10-x86_64-genesis-oe-ipv6 passed or failed by chance.
genesis-bootnic reads BOOTIF and writes 16-xcat-genesis-bootnic.conf, which
leaves DHCPv6 on the boot nic and puts every other nic on link-local. It follows
genesis-duid, which already writes 15-xcat-genesis-duid.conf from the SMBIOS UUID
before NetworkManager starts.
The six cases pass with the file as committed, so the evidence is a mutation:
writing ipv6.method=auto for the secondary nics, which is the behaviour before
this change, reds only "the boot nic keeps DHCPv6 and every other nic does not
ask for an address".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>