2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Support noboot on interfaces that are tagged vlan on the mangement node

This commit is contained in:
Victor Hu 2016-11-14 13:27:27 -05:00
parent 4366b48c7f
commit 2ca61ad9e8

View File

@ -74,8 +74,27 @@ sub process_request {
}
my $nicips = xCAT::NetworkUtils->get_nic_ip();
foreach (keys %nobootnics) {
if (defined($nicips->{$_})) {
$nobootnicips{$nicips->{$_}} = 1;
# looping on each nics that has 'noboot' configured
print "DEBUG ==> Interface $_ is set to 'noboot'\n";
if (defined($nicips)) {
foreach my $nicipkey (keys $nicips) {
if ( $nicipkey =~ "@" ) {
# If VLAN tagging is in use on this management node, the interface name is taken
# from 'ip addr show' command and will contain the physical interface:
# enP1p12s0f0.2@enP1p12s0f0
if ($nicipkey =~ m/$_\@/i ) {
print "DEBUG ---- FOUND ---- Interface name $_ is part of $nicipkey, IP=$nicips->{$nicipkey}!\n";
if (defined($nicips->{$nicipkey})) {
$nobootnicips{$nicips->{$nicipkey}} = 1;
}
}
} else {
# Non VLAN case
if (defined($nicips->{$_})) {
$nobootnicips{$nicips->{$_}} = 1;
}
}
}
}
}
}