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 whole lan6 print output for
the configured text. One IPv6 address has many spellings, so
"2001:0db8:0001::0020" does not match "2001:db8:1::20". A substring
match also accepts "2001:db8:1::20" for "2001:db8:1::2". The IPv4 check
has the same substring defect.
bmc_has_address now reads each "Address:" entry of lan6 print and
compares it with the configured address after ipv6_expand writes both
as eight zero-padded lowercase groups without the prefix length.
ipv6_expand uses only bash. The IPv4 check compares the complete
"IP Address" field.
The new tests in genesis_bmcsetup_users.bats fail without this change.
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.
ok_with_node in frusetter.pm opens the credential callback with
IO::Socket::INET, which cannot connect to an IPv6 address.
ok_with_node now opens the socket with
xCAT::NetworkUtils::open_tcp_socket, as bmcconfig.pm does. The
challenge and the expected answer do not change.
The IPv6 tests in frusetter_ipv6_callback.t fail without this change.
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.
bmcsetup reads the xcatd= kernel argument again and splits it on the
first colon. For "[2001:db8::1]:3001" this gives "[2001", and bmcsetup
writes it over the XCATMASTER that doxcat exported. updateflag.awk and
allowcred.awk then get an invalid host. The OpenBMC check reads the
address back with "lan print", which shows only IPv4 parameters.
bmcsetup now reads a bracketed xcatd= value as doxcat does. The new
bmc_has_address reads an IPv6 address back with "lan6 print" on the LAN
channel, and an IPv4 address as before.
The IPv6 status tests in genesis_bmcsetup_users.bats fail without this
change.
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. getipmi then retries
without end, and bmcsetup never configures the BMC.
ok_with_node in bmcconfig.pm opens the credential callback with
IO::Socket::INET, which cannot connect to an IPv6 address.
ok_with_node now opens the socket with
xCAT::NetworkUtils::open_tcp_socket, which uses IO::Socket::INET6 and
keeps IO::Socket::INET as the fallback. The challenge and the expected
answer do not change.
The IPv6 tests in bmcconfig_ipv6_callback.t fail without this change.
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, xcatd cannot confirm a credential request from a
Genesis node, so the node gets no certificate. getcert and bmcsetup
start allowcred.awk with the environment that doxcat exports.
allowcred.awk selects the listener family from MASTER_IP or MASTER.
doxcat exports neither. It exports XCATMASTER, so the listener is
always IPv4 and the IPv6 callback from xcatd gets no answer.
The Genesis allowcred.awk now reads XCATMASTER first. MASTER_IP and
MASTER stay as fallbacks.
The tests in ipv6_genesis_awk_inet6.bats that use the doxcat
environment fail without this change.
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>
When ipmi.bmc is an IPv6 address, bmcconfig finds no network for it and
Genesis leaves the BMC unconfigured. bmcsetup only writes IPv4 LAN
parameters.
bmc_net_params now accepts an IPv6 address, or a name that resolves only
to one, and returns the prefix length, the gateway and the prefix of the
networks row that contains it. bmcconfig sends the prefix as
routerprefix. bmcsetup writes the address with "ipmitool lan6 set
static_addr" and, when there is a gateway, a static router. A name with
an IPv4 address keeps the IPv4 setup.
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 held the
old IPv4 line and the new IPv6 line of the node. node_address_family
answers 4 for such a node, so nodeset rendered ip=dhcp and an IPv4
kickstart with no warning.
addnode matches a node name only against lines of the family it writes,
which keeps both lines of a dual-stack node. When makehosts writes
hosts.ip and the node has no line of that family, the address moved to
the other family. addnode now replaces the old line in that case. A
node with a line of each family keeps both, and makehosts -m is
unchanged. ipv6_provisioning.rst says how to move a dual-stack node to
IPv6 only.
makehosts_family_change.t fails 3 of 6 assertions without this change.
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>
On Ubuntu 26.04 an IPv6-only diskless node boots with no address and
cannot fetch its root image. grub2 adds BOOTIF= to every node, and
systemd-network-generator turns it into 70-BOOTIF.network with no
address. The generator drops an ip= that names no interface, and the
file for a named interface sorts after 70-BOOTIF.network. debian.pm
gave the static ip= an empty interface when the node had no installnic
or primarynic.
static_ip6_boot_arg now takes the net_params hash. It adds rd.bootif=0,
so the generator writes no 70-BOOTIF.network, and it names the
interface xcatboot0 through ifname=<name>:<mac> when the node has no
installnic, as the EL path does. The DHCP=ipv4 drop-in for
70-BOOTIF.network then has no file to apply to on an IPv6 node. An
IPv4 node is unchanged.
debian_static_ip6_gateway.t fails 5 of 9 assertions without this change.
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>
With mac.duid=canonical or firmware, an installed KVM guest whose
domain an earlier mkvm defined sends a DHCPv6 client identifier that
its reservation does not hold.
makedhcp applies the policy to vpd.uuid. configdhcpv6duid applied it to
product_uuid of the node. In such a guest product_uuid is the byte swap
of vpd.uuid, so the script wrote the other UUID order.
mypostscript now exports vpd.uuid as VPDUUID, and configdhcpv6duid
applies the policy to it. The script reads product_uuid only when
VPDUUID holds no UUID.
postscript_dhcpv6_duid.bats asserts the DUID for each policy with a
swapped product_uuid, and the VPDUUID export. The tests fail without
this change.
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>
pc-q35-2.1 and the Ubuntu pc-i440fx-utopic store the UUID bytes
unencoded behind an SMBIOS 2.8 entry point, as pc-i440fx-2.1 does, so
their guest reports the domain UUID with the first three fields
swapped. guest_uuid kept the UUID unchanged for them, so mkvm and
clonevm gave the guest a UUID that differed from vpd.uuid, and rinv and
rscan reported the domain UUID.
guest_uuid now swaps the UUID for both machine types. Only QEMU 2.1 to
2.6 provide pc-q35-2.1. pc-i440fx-utopic is the default machine type of
Ubuntu 14.10, and the QEMU of Ubuntu 16.04 keeps it with the 2.1
settings. The QEMU of Ubuntu 15.04 and 15.10 defines it with current
settings, so a guest there reports the UUID unchanged. pc-q35-2.0 uses
SMBIOS 2.4 tables and keeps the UUID unchanged.
(cherry picked from commit ba9dfbfed7ea24b0f5344c0c906ce10db4829996)
(cherry picked from commit fe83337ce0)
(cherry picked from commit 26b6ca5806)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The UUID conversion of mkvm, clonevm, rinv and rscan used the machine
type that the domain XML names. A domain that names none, or names an
alias such as pc, gets the default machine type of the hypervisor:
pc-i440fx-2.1 on QEMU 2.1 and pc-i440fx-rhel7.1.0 on the qemu-kvm of
RHEL 7.1. Its guest then reported a swapped UUID that the plugin did
not expect.
The plugin now asks libvirt for the machine type through the domain
capabilities of the hypervisor, as it already does for the video
model, and converts the UUID for that machine type. The domain XML
keeps the machine type it names. When libvirt cannot answer, the
plugin uses the machine type of the XML, as before.
(cherry picked from commit f3b47fcca98ca75c123615433df38d3642d2c5d4)
(cherry picked from commit 1e830adaa9)
(cherry picked from commit 8f81a34a3e)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mkvm and clonevm wrote the libvirt domain UUID with the first three
fields of vpd.uuid swapped, rscan swapped them back when it stored a
domain UUID in vpd.uuid, and rinv printed the swapped value. QEMU
stores the domain UUID as SMBIOS 2.6 specifies, so the guest reported
the swapped UUID, not vpd.uuid, and its UEFI firmware sent a DUID that
the reservation makedhcp derives from vpd.uuid did not match.
The plugin now converts through xCAT::KVMUtils::guest_uuid, which
keeps the UUID unchanged for every machine type except pc-i440fx-2.1
and its RHEL counterpart pc-i440fx-rhel7.1.0. Those machine types,
which QEMU before 9.1 and the qemu-kvm of EL8 still offer, store the
UUID bytes unencoded behind an SMBIOS 2.8 entry point, so their guest
reports the first three fields swapped and the swap stays. mkvm and
clonevm take the machine type of the domain they build, and rscan and
rinv the machine type of the domain they read.
A guest that mkvm defined before keeps its UUID, because mkvm reuses
the domain XML in kvm_nodedata. Its vpd.uuid keeps the swapped order
until it is corrected.
(cherry picked from commit 4d8007091c9a8ba2e246749a7278c0f5e04da374)
(cherry picked from commit 76f2008779)
(cherry picked from commit 32d61367cd)
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
rscan -u, and rscan -w for a guest that xCAT already knows, deleted the
mac row of the guest and wrote back only its MAC address. That dropped
mac.duid, so the next makedhcp reserved the default DUID in place of
the identifier the node had selected, and its client lost the reserved
address. rscan now updates the MAC address in the existing row and
keeps the other mac attributes. The other tables it rewrites are
unchanged.
(cherry picked from commit b464b57499d74d525188c59a340c1bde8e3ffcf1)
(cherry picked from commit b1ed21d010)
(cherry picked from commit 5f1fd10929)
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 Kea Control Agent host updates succeed, an IPv6-only node
skips the Kea reload. A new DHCPv6 boot class stays inactive and a
deleted one stays active.
kea_process_request restarts Kea after a live update only when
client_classes_changed is set. It set the flag from the DHCPv4 class
updates and discarded the results of kea_sync_node_boot_classes6 and
kea_remove_node_boot_classes6.
kea_process_request now also sets the flag when either DHCPv6 boot
class update reports a change.
dhcp_kea_reload_boot_classes6.t asserts the restart for an added and
for a removed DHCPv6 boot class. Both assertions fail without this
change.
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 wrote the second-stage URL of a network as
http://<server>/tftpboot/..., with no port. The per-node URL from
dhcp6_bootfile_url_for_node already carries the site port.
kea_client_classes6 now takes an httpport option and adds the suffix
from httpport_suffix, as the DHCPv4 network classes do.
kea_boot_client_classes6 passes the value of site.httpport.
dhcp6_boot_client_classes.t and dhcp_dhcpv6_duid.t assert the port in
the URL. Both fail without this change.
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>
A discovery client on the second IPv6 network received the boot URL of
the first network.
kea_client_classes6 builds the boot classes of one network. Each URL
carries the address of the management node on that network. The
classes go to the global client-classes of Dhcp6 without the
additional-only flag, so Kea evaluates their tests for the clients of
every subnet. The additional-class list of the subnet does not restrict
them.
kea_client_classes6 now sets additional_only on every class it returns.
The Kea backend renders it as only-in-additional-list, or as
only-if-required before Kea 2.7.4, the same flag the DHCPv4 network
classes use.
dhcp6_boot_client_classes.t asserts the rendered flag. It fails without
this change.
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, but stage_dracut_module does not copy it into 97xcat, so
the stateless image gets no initrd and the node never boots.
Add xcat-online.sh to the files of the stateless module.
imgutils_ubuntu_dracut_module.t fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit ed9a23ba7b203cb3aff6583e07455172be6f2394)
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>
When sequential discovery clears mac= on a defined node, makedhcp drops
the DHCPv6 reservation of the node but keeps its two per-node client
classes. The classes match the DUID, so iPXE still fetches the boot
script of the node, Genesis boots with that node's destiny, and no
findme reaches xcatd.
kea_node_boot_classes6_for_nodes now skips a node with no MAC, as
kea_node_reservations6 does, so kea_sync_node_boot_classes6 removes
the classes with the reservation. dhcp_dhcpv6_duid.t fails without
this change.
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>
hosts.otherinterfaces and nics.nicips take "<name>!<ip>" or
"<name>:<ip>". The ":" form was split at every colon, so
"node01:2001:db8::5" gave the address "2001". otherinterfaces dropped
the entry; nicips wrote "2001 node01-eth1" to the host entries, which
makedns then rejects as malformed.
addotherinterfaces, delotherinterfaces and donics now split at the
first colon only. ddns_ipv6_records.t holds both forms down.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
makedns stops with "the mask should be a factor of 4" when a node is
in an IPv6 network with a /62 or other non-nibble prefix.
get_reverse_zones_for_entity rejected the prefix that getzonesfornet
already accepts. It now takes the zone of the next nibble that holds
the node address, which is one of the zones getzonesfornet creates.
A node whose hosts.ip is IPv4 got an AAAA for its IPv6 address but no
PTR, because add_or_delete_records walked hosts.ip only. It now also
walks the other addresses the makehosts content gives the node.
find_nameserver_for_dns asked the resolver for the NS of ip6.arpa. and
arpa.: its stop list matched IN-ADDR.ARPA and upper-case ARPA only.
update_namedconf matched "listen-on {" and "listen-on-v6 {". The EL
named.conf writes "listen-on-v6 port 53 { ::1; };", so
site.dnsinterfaces was ignored and named stayed on ::1. The match now
allows options before the brace and a block on one line.
A new zone closed allow-update before the site.dnsupdaters entries,
and named rejects the entries as unknown options.
ddns_ipv6_records.t holds each case down.
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>