From e628125cf91cd3a96e918b5fb512e1efc96824b5 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 6 Nov 2026 17:29:55 -0300 Subject: [PATCH] fix(xcat-core): Subiquity IPv6 netplan lets RA start DHCPv6 and drops named resolvers _subiquity_netplan6 wrote dhcp4: false and a static address, and left accept-ra unset. A router advertisement with the managed flag still starts DHCPv6 in systemd-networkd. The pool address it gets has no PTR record, so xcatd refuses the completion callback and the node boots the installer again. The same sub filtered site.nameservers on a colon, so a resolver given as a host name was dropped and the management node replaced it. The netplan now carries dhcp6: false and accept-ra: false, and the resolvers come from _ipv6_nameservers_for_node, which resolves a host name to its AAAA address as the kickstart path already does. subiquity_ipv6_netplan.t fails without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-server/lib/perl/xCAT/Template.pm | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 1b195d5e24..5807d13bfd 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -2072,22 +2072,15 @@ sub _subiquity_netplan6 { $gateway = xCAT::NetworkUtils->ipv6_server_for_node($nodename, $gateway); } - # site.nameservers holds one list for the cluster, so the node can be given the IPv4 - # resolver of another network. An IPv6-only node cannot reach it, and an unreachable - # server in resolv.conf makes every lookup wait for its timeout. - # - # '' is the management node, which runs named. It is not the gateway: a - # cluster whose gateway is a separate router would be given a resolver that answers - # nothing. - my %nameservers = %{ xCAT::NetworkUtils->getNodeNameservers([$nodename]) }; - my $master6 = xCAT::NetworkUtils->ipv6_server_for_node($nodename, ''); - my @resolvers = grep { index($_, ':') >= 0 } - grep { defined && length } - map { $_ eq '' ? $master6 : $_ } split(/,/, $nameservers{$nodename} // ''); - @resolvers = ($master6) - if !@resolvers && defined($master6) && index($master6, ':') >= 0; + my @resolvers = _ipv6_nameservers_for_node($nodename); - my @lines = ("${pad}dhcp4: false", "${pad}addresses: [$address/$prefix]"); + # A router advertisement with the managed flag starts DHCPv6 in systemd-networkd even with + # dhcp6 off. The pool address it takes has no PTR record, and xcatd refuses a callback from + # an address it cannot name. + my @lines = ( + "${pad}dhcp4: false", "${pad}dhcp6: false", "${pad}accept-ra: false", + "${pad}addresses: [$address/$prefix]" + ); if (defined($gateway) && length($gateway)) { # 'to: default' rather than the deprecated gateway6, which netplan warns about and # drops. This is the shape xcatroot already writes for a diskless IPv6 node, so the