FSP/BPA redundancy: add some checking of getNodeIPaddress

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2011-01-15 07:07:07 +00:00
parent 816d09a338
commit abf34b0acb

View File

@ -2868,11 +2868,16 @@ sub getNodeIPaddress
push (@nonip, $_);
}
}
my $hstab = xCAT::Table->new('hosts');
if ( $hstab ) {
my $ent = $hstab->getNodesAttribs(\@nonip,['ip']);
foreach ( @nonip) {
push (@myip, $_);
if (scalar(@nonip)){
my $hstab = xCAT::Table->new('hosts');
if ( $hstab ) {
my $ent = $hstab->getNodesAttribs(\@nonip,['ip']);
if ($ent){
foreach (@nonip) {
my $i = $ent->{$_}->[0]->{ip};
push (@myip, $i);
}
}
}
}
$ips = join ",", @myip;