HMC has been updated to add -K netmask option in lpar_netboot.expect. xCAT needs to read the netmask from table and pass this option to HMC if -G,-S,-C has been specified.
Defect 2485129: Fail to getmacs from HMC with option -S -C -G git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2597 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e15c3791dc
commit
d549325b97
@ -621,9 +621,9 @@ sub lpar_netboot {
|
||||
$cmd.= " -i";
|
||||
} else {
|
||||
#################################
|
||||
# Determine if LPAR and mgmt node
|
||||
# are AIX or not.
|
||||
################################
|
||||
# Determine if LPAR and mgmt node
|
||||
# are AIX or not.
|
||||
################################
|
||||
my $table = "nodetype";
|
||||
my @TableRowArray = xCAT::DBobjUtils->getDBtable($table);
|
||||
if (defined(@TableRowArray))
|
||||
@ -632,13 +632,12 @@ sub lpar_netboot {
|
||||
{
|
||||
my @nodelist = split(',', $_->{'node'});
|
||||
my @oslist = split(',', $_->{'os'});
|
||||
my $nodename = @$d[6];
|
||||
my $osname = "AIX";
|
||||
if (grep(/^$nodename$/, @nodelist))
|
||||
if (grep(/^$name$/, @nodelist))
|
||||
{
|
||||
if (!grep(/^$osname$/, @oslist) || !xCAT::Utils->isAIX())
|
||||
{
|
||||
`xdsh $nodename "shutdown -h now" 2>/dev/null`;
|
||||
`xdsh $name "shutdown -h now" 2>/dev/null`;
|
||||
last;
|
||||
}
|
||||
}
|
||||
@ -662,8 +661,16 @@ sub lpar_netboot {
|
||||
# Network specified (-D ping test)
|
||||
#####################################
|
||||
if ( exists( $opt->{S} )) {
|
||||
my %nethash = xCAT::DBobjUtils->getNetwkInfo( [$name] );
|
||||
#####################################
|
||||
# Network attributes undefined
|
||||
#####################################
|
||||
if ( !%nethash ) {
|
||||
return( [RC_ERROR,"Cannot get network information for $name"] );
|
||||
}
|
||||
my $netmask = $nethash{$name}{mask};
|
||||
$cmd.= (!defined( $mac )) ? " -D" : "";
|
||||
$cmd.= " -s auto -d auto -S $opt->{S} -G $opt->{G} -C $opt->{C}";
|
||||
$cmd.= " -s auto -d auto -S $opt->{S} -G $opt->{G} -C $opt->{C} -K $netmask";
|
||||
}
|
||||
#####################################
|
||||
# Add lpar name, profile, CEC name
|
||||
|
Loading…
Reference in New Issue
Block a user