2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-22 02:12:16 +00:00

fix(xcat-core): makedhcp does not reload Kea for a DHCPv6 boot class

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>
This commit is contained in:
Daniel Hilst
2026-11-09 18:12:52 -03:00
parent fcf4b9734e
commit 6497b1a1a6
+2 -2
View File
@@ -3038,7 +3038,7 @@ sub kea_process_request
push @deleted6, @{ $backend->delete_reservations($loaded6, $match) } if $loaded6;
}
$client_classes_changed = kea_remove_node_client_classes($loaded4, $nodes);
kea_remove_node_boot_classes6($loaded6, $nodes) if $loaded6;
$client_classes_changed = 1 if $loaded6 && kea_remove_node_boot_classes6($loaded6, $nodes);
} else {
# An upgrade keeps the option definitions of an older makedhcp -n.
( $option_defs_added, my $defs_error ) = xCAT::DHCP::BootPolicy->kea_declare_ipxe_features($loaded4->{Dhcp4});
@@ -3053,7 +3053,7 @@ sub kea_process_request
if ($loaded6) {
$reservations6 = kea_build_node_reservations6($backend, $loaded6, $nodes);
$backend->upsert_reservations($loaded6, $reservations6, \@replaced6);
kea_sync_node_boot_classes6($loaded6, $nodes);
$client_classes_changed = 1 if kea_sync_node_boot_classes6($loaded6, $nodes);
}
}