The plugin builds the DHCPv6 reservations from a private xCAT database,
and kea-dhcp6 and dhcpd -6 serve them in a network namespace. DHCPv6
clients in a second namespace send the DUID that UEFI firmware sends,
the RFC 4122 order and a given DUID, and check the address and the
bootfile-url that each one gets.
Without mac.duid only the firmware order gets the reservation. With
duid=canonical the operating system gets the reserved address and the
firmware leases a pool address, so the two never hold the same address.
When mac.duid changes, Kea revokes the lease of the old DUID and dhcpd
gives the fixed address to the new DUID at once. An invalid value keeps
the existing reservation, and makedhcp -d removes the selected one only.
An IPv4-only node with the vpd.uuid of another node leaves the
reservation of that node alone.
The makedhcp autotest case checks duid=canonical and an invalid value
through chdef and makedhcp, and no longer says that RFC 6355 requires
the firmware order.
(cherry picked from commit 740d1b846c0c13342f9f1ec2e24f570354e885d4)
(cherry picked from commit f630ab6572)
The packet test runs dhcpd and kea-dhcp4 in a network namespace with the
rules that BootPolicy renders, and sends relayed DHCPDISCOVER packets
from a second namespace. It checks the boot file of firmware PXE, xNBA
and iPXE clients, with each iPXE feature present or missing, for an xnba
node and an ipxe node that install, for both methods with a SAN disk,
and for an unknown node. On ISC it also covers an iSCSI node of each
method in the boot state, and repeats the node rows after a restart,
when dhcpd reads the host statements back from dhcpd.leases. On Kea it
repeats the rows of the ipxe nodes with a configuration that makedhcp
upgraded, which keeps the xNBA global classes of the older makedhcp -n.
It also checks that the UEFI clients of an xnba node get xNBA when the
server lacks the xNBA UEFI file.
The Kea validation test checks the x86 classes of xnba and ipxe nodes
with kea-dhcp4 -t. XCAT::Test::DHCP builds the packets, and the
integration case expects seven files.
dhcpd keeps the host statements that makedhcp gives it through OMAPI in
dhcpd.leases, where it saves them without parentheses, and reads them
back when it restarts.
The lease test stores the statements of netboot=ipxe nodes through OMAPI
in a private network namespace, checks the saved leases with dhcpd -t,
and restarts dhcpd with them. The configuration test checks the iPXE
feature declarations of the ISC header with dhcpd -t.
start_daemon can now keep the identity of the caller, and the
integration case expects six files.
The helpers that start, wait for and stop a DHCP daemon lived in the
Kea smoke test. The ISC lease test and the packet test need them too.
They move to XCAT::Test::DHCP in integration/lib, which the xCAT-test
packages install with the tests. The smoke test loads them from there
and behaves as before.