From 6497b1a1a6a379979c9871d0d5a19bd3bf00a3cb Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:12:52 -0300 Subject: [PATCH] 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> --- xCAT-server/lib/xcat/plugins/dhcp.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 19c83ff7b7..5fffbbfd84 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -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); } }