fix bug 3428: lsslp -n does not check xCAT DB properly for current objects
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@15529 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
36bc7c7ef7
commit
e3e3950755
@ -1195,6 +1195,8 @@ sub parse_responses {
|
||||
bpcmtm to ${$outhash{$name}}{bpcmtm}, bpcsn to ${$outhash{$name}}{bpcsn}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# find frame's hostname first, then use find the cec's parent
|
||||
@ -1257,7 +1259,7 @@ sub parse_responses {
|
||||
trace( $request, "\n\n\nBegin to find fsp/bpa's hostname and parent");
|
||||
foreach my $h ( keys %outhash ) {
|
||||
# Added a skip if processing Flex blades
|
||||
if(((${$outhash{$h}}{type} eq TYPE_FSP) && ${$outhash{$h}}{mtm} !~ /^7895|1457/ ) or ${$outhash{$h}}{type} eq TYPE_BPA) {
|
||||
if(${$outhash{$h}}{type} eq TYPE_FSP or ${$outhash{$h}}{type} eq TYPE_BPA) {
|
||||
$newhostname = $::OLD_DATA_CACHE{${$outhash{$h}}{type}."*".${$outhash{$h}}{mtm}.'*'.${$outhash{$h}}{serial}.'*'.${$outhash{$h}}{side}};
|
||||
if ($newhostname){
|
||||
${$outhash{$h}}{hostname} = $newhostname ;
|
||||
@ -1265,7 +1267,7 @@ sub parse_responses {
|
||||
push @matchnode, $h;
|
||||
}
|
||||
my $ptmp = ${$outhash{$h}}{parent};
|
||||
${$outhash{$h}}{parent} = ${$outhash{$ptmp}}{hostname};
|
||||
${$outhash{$h}}{parent} = ${$outhash{$ptmp}}{hostname} unless((${$outhash{$h}}{type} eq TYPE_FSP) && ${$outhash{$h}}{mtm} =~ /^7895|1457/ );
|
||||
trace( $request, "$h found parent ${$outhash{$ptmp}}{hostname}");
|
||||
#check if fsp/bpa's ip is valid
|
||||
my $vip = check_ip(${$outhash{$h}}{ip});
|
||||
@ -1282,8 +1284,6 @@ sub parse_responses {
|
||||
${$outhash{$child}}{fid} = ${$outhash{$h}}{fid};
|
||||
${$outhash{$child}}{cid} = ${$outhash{$h}}{cid};
|
||||
trace( $request, "child is $child, fid is ${$outhash{$child}}{fid}, cid is ${$outhash{$child}}{cid}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} # end - process fsp and bpa
|
||||
@ -1325,7 +1325,9 @@ sub parse_responses {
|
||||
}
|
||||
send_msg ( $request, 0, "These nodes defined in database but can't be discovered: $notdisnode \n");
|
||||
}
|
||||
|
||||
foreach my $no(keys %outhash) {
|
||||
delete $outhash{$no} unless ( ${$outhash{$no}}{hostname} );
|
||||
}
|
||||
return \%outhash;
|
||||
}
|
||||
##########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user