mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-26 04:12:17 +00:00
test(xcat-core): sequential discovery over IPv6 finds no nic in the deploy network
On xcat88-mn the findme from the OpenEmbedded Genesis reached xcatd over IPv6 and seqdiscovery matched seqdisc1, then zzzdiscovery failed with "No nic found in deploy network for seqdisc1". NetworkManager installs a DHCPv6 lease as a /128, so Genesis reports the boot nic as 2001:db8:188::1004/128. hosttag_for_ipv6_nic masks both addresses with that prefix length, and a /128 never matches the address of the node. The test asserts that a /128 lease inside an xCAT IPv6 network of the node is the node itself. It fails today. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
# $localnic and stops process_request returning "No nic found in deploy network".
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 9;
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../../perl-xCAT";
|
||||
|
||||
@@ -38,3 +38,20 @@ my %taken = ( seqdisc1 => 1 );
|
||||
is( xCAT::DiscoveryUtils::hosttag_for_ipv6_nic(
|
||||
'seqdisc1', '2001:db8:188::21', 'eth2', '2001:db8:188::32', 64, \%taken ),
|
||||
'seqdisc1-eth2', 'a second nic on that network takes an interface-qualified name' );
|
||||
|
||||
# NetworkManager installs a DHCPv6 lease as a /128 and takes the on-link route from the router
|
||||
# advertisement, so Genesis reports the boot nic as 2001:db8:188::1004/128. A /128 names one
|
||||
# address and no network, so the network comes from the xCAT networks table.
|
||||
my @networks = ( [ '2001:db8:188::', 64 ] );
|
||||
my %fresh;
|
||||
is( xCAT::DiscoveryUtils::hosttag_for_ipv6_nic(
|
||||
'seqdisc1', '2001:db8:188::21', 'eth0', '2001:db8:188::1004', 128, \%fresh, \@networks ),
|
||||
'seqdisc1', 'a /128 DHCPv6 lease in the network of the node is the node itself' );
|
||||
|
||||
is( xCAT::DiscoveryUtils::hosttag_for_ipv6_nic(
|
||||
'seqdisc1', '2001:db8:188::21', 'eth0', '2001:db8:99::1004', 128, \%fresh, \@networks ),
|
||||
undef, 'a /128 lease on another network is not the node' );
|
||||
|
||||
is( xCAT::DiscoveryUtils::hosttag_for_ipv6_nic(
|
||||
'seqdisc1', '2001:db8:188::21', 'eth0', '2001:db8:188::1004', 128, \%fresh ),
|
||||
undef, 'with no networks to compare a /128 against, it is not the node' );
|
||||
|
||||
Reference in New Issue
Block a user