Fixed defect 2771631: getmacs writes lpar name instead of node name to mac table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3221 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
20417faff7
commit
529c817892
@ -61,9 +61,9 @@ sub parse_args {
|
||||
|
||||
|
||||
##########################################################################
|
||||
# IVM rnetboot
|
||||
# Netboot the lpar
|
||||
##########################################################################
|
||||
sub ivm_rnetboot {
|
||||
sub do_rnetboot {
|
||||
|
||||
my $request = shift;
|
||||
my $d = shift;
|
||||
@ -243,14 +243,14 @@ sub rnetboot {
|
||||
#########################################
|
||||
# Manually perform boot.
|
||||
#########################################
|
||||
$result = ivm_rnetboot( $request, $d, $exp, $name, $node, \%opt );
|
||||
$result = do_rnetboot( $request, $d, $exp, $name, $node, \%opt );
|
||||
$Rc = shift(@$result);
|
||||
|
||||
##################################
|
||||
# Form string from array results
|
||||
##################################
|
||||
if ( exists($request->{verbose}) ) {
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
return( [[$node,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
##################################
|
||||
# Return error
|
||||
@ -268,9 +268,9 @@ sub rnetboot {
|
||||
##################################
|
||||
if ( $Rc != SUCCESS ) {
|
||||
if ( @$result[0] =~ /lpar_netboot: (.*)/ ) {
|
||||
return( [[$name,$1,$Rc]] );
|
||||
return( [[$node,$1,$Rc]] );
|
||||
}
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
return( [[$node,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
##################################
|
||||
# Split array into string
|
||||
@ -293,7 +293,7 @@ sub rnetboot {
|
||||
#
|
||||
#####################################
|
||||
if ( $data =~ /Finished/) {
|
||||
return( [[$name,"Success",$Rc]] );
|
||||
return( [[$node,"Success",$Rc]] );
|
||||
}
|
||||
#####################################
|
||||
# Can still be error w/ Rc=0:
|
||||
@ -308,9 +308,9 @@ sub rnetboot {
|
||||
#
|
||||
#####################################
|
||||
if ( $data =~ /lpar_netboot: (.*)/ ) {
|
||||
return( [[$name,$1,RC_ERROR]] );
|
||||
return( [[$node,$1,RC_ERROR]] );
|
||||
}
|
||||
return( [[$name,$data,RC_ERROR]] );
|
||||
return( [[$node,$data,RC_ERROR]] );
|
||||
}
|
||||
|
||||
|
||||
|
@ -210,9 +210,9 @@ sub validate_ip {
|
||||
|
||||
|
||||
##########################################################################
|
||||
# IVM get LPAR MAC addresses
|
||||
# Get LPAR MAC addresses
|
||||
##########################################################################
|
||||
sub ivm_getmacs {
|
||||
sub do_getmacs {
|
||||
|
||||
my $request = shift;
|
||||
my $d = shift;
|
||||
@ -372,7 +372,7 @@ sub getmacs {
|
||||
#########################################
|
||||
# Manually collect MAC addresses.
|
||||
#########################################
|
||||
$result = ivm_getmacs( $request, $d, $exp, $name, $node );
|
||||
$result = do_getmacs( $request, $d, $exp, $name, $node );
|
||||
$Rc = shift(@$result);
|
||||
|
||||
##################################
|
||||
@ -381,19 +381,19 @@ sub getmacs {
|
||||
if ( exists($request->{verbose}) ) {
|
||||
if ( $Rc == SUCCESS ) {
|
||||
if ( !exists( $opt->{d} )) {
|
||||
writemac( $name, $result );
|
||||
writemac( $node, $result );
|
||||
}
|
||||
}
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
return( [[$node,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
##################################
|
||||
# Return error
|
||||
##################################
|
||||
if ( $Rc != SUCCESS ) {
|
||||
if ( @$result[0] =~ /lpar_netboot: (.*)/ ) {
|
||||
return( [[$name,$1,$Rc]] );
|
||||
return( [[$node,$1,$Rc]] );
|
||||
}
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
return( [[$node,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
#####################################
|
||||
# lpar_netboot returns:
|
||||
@ -422,9 +422,9 @@ sub getmacs {
|
||||
# Write first valid adapter MAC to database
|
||||
#####################################
|
||||
if ( !exists( $opt->{d} )) {
|
||||
writemac( $name, $result );
|
||||
writemac( $node, $result );
|
||||
}
|
||||
return( [[$name,$data,$Rc]] );
|
||||
return( [[$node,$data,$Rc]] );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user