mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-24 03:12:18 +00:00
fix(genesis): imgserver falls back to the IPv4 address of an IPv6-only node
The imgserver of the nodeset response takes noderes.tftpserver, then noderes.xcatmaster, then site.master, and falls back to my_ip_facing. That resolver is IPv4 only, and an IPv6-only node shares the link with the management node, so the fallback answers with the IPv4 address and the node is sent to fetch its image from an address it has no route to. It now uses my_ip_facing_node, which picks the family from the node. InstUtils and grub2 already make the same choice, each with its own ternary; this is the third site and the first to use the shared helper. The fallback is reached only when none of the three attributes is set, so a cell that sets noderes.tftpserver was never affected. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -990,7 +990,10 @@ sub getdestiny {
|
||||
} elsif (defined($master_value)) {
|
||||
$response{imgserver} = $master_value;
|
||||
} else {
|
||||
my @resd = xCAT::NetworkUtils->my_ip_facing($node);
|
||||
# In the family the node provisions in, as InstUtils and grub2 already do: an
|
||||
# IPv6-only node shares the link, so my_ip_facing answers with the IPv4 address and
|
||||
# the node is sent to fetch its image from an address it cannot reach.
|
||||
my @resd = xCAT::NetworkUtils->my_ip_facing_node($node);
|
||||
unless ($resd[0]) { $response{imgserver} = $resd[1]; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user