fix 2 problem in lsslp (source forge defect 2608905):problem 1:sslp cannot always find hosts via snmp;problem 2:lsslp cannot distinguish nodes if their BPA has not been defined.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2802 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1ccc54d423
commit
08aa2bcd99
@ -100,7 +100,11 @@ sub find_mac {
|
||||
if ((lc($mac) ne $_) and ($self->{mactable}->{lc($mac)} eq $self->{mactable}->{$_})) {
|
||||
#$reftbl = 1;
|
||||
#Delete *possibly* stale data, without being heavy handed..
|
||||
delete $self->{mactable}->{$_};
|
||||
#But if this mac indicates multiple nodes, leave it there
|
||||
if ( $self->{mactable}->{lc($mac)} !~ /,/)
|
||||
{
|
||||
delete $self->{mactable}->{$_};
|
||||
}
|
||||
}
|
||||
}
|
||||
unless ($reftbl) { return $self->{mactable}->{lc($mac)};}
|
||||
|
@ -2177,7 +2177,7 @@ sub disti_multi_node
|
||||
my $names = shift;
|
||||
my $slp = shift;
|
||||
|
||||
return undef if ( !$slp->{'cage-number'});
|
||||
return undef if ( ! exists $slp->{'cage-number'});
|
||||
|
||||
my $ppctab = xCAT::Table->new( 'ppc');
|
||||
return undef if ( ! $ppctab);
|
||||
@ -2188,21 +2188,28 @@ sub disti_multi_node
|
||||
for my $node ( @nodes)
|
||||
{
|
||||
my $id_parent = $ppctab->getNodeAttribs( $node, ['id','parent']);
|
||||
next if (! $id_parent or ! $id_parent->{'id'});
|
||||
next if (! defined $id_parent or ! exists $id_parent->{'id'});
|
||||
if ( $id_parent->{'id'} eq $slp->{'cage-number'})
|
||||
{
|
||||
my $vpdnode = undef;
|
||||
if ( $id_parent->{ 'parent'}#if no parent defined, take it as is.
|
||||
and $vpdtab
|
||||
and $vpdnode = $vpdtab->getNodeAttribs($id_parent->{ 'parent'}, ['serial','mtm'])
|
||||
and $vpdnode->{'serial'}
|
||||
and $vpdnode->{'mtm'})
|
||||
if ( defined $id_parent->{ 'parent'})#if no parent defined, take it as is.
|
||||
{
|
||||
if ( $vpdnode->{'serial'} ne $slp->{'bpc-serial-number'}
|
||||
or $vpdnode->{'mtm'} ne $slp->{'bpc-machinetype-model'})
|
||||
{
|
||||
if( $vpdtab
|
||||
and $vpdnode = $vpdtab->getNodeAttribs($id_parent->{ 'parent'}, ['serial','mtm'])
|
||||
and exists $vpdnode->{'serial'}
|
||||
and exists $vpdnode->{'mtm'})
|
||||
{
|
||||
if ( $vpdnode->{'serial'} ne $slp->{'bpc-serial-number'}
|
||||
or $vpdnode->{'mtm'} ne $slp->{'bpc-machinetype-model'})
|
||||
{
|
||||
next;
|
||||
}
|
||||
}
|
||||
elsif ( "$slp->{'bpc-machinetype-model'}*$slp->{'bpc-serial-number'}" ne $id_parent->{ 'parent'})
|
||||
{
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return undef if ( $correct_node);#had matched another node before
|
||||
$correct_node = $node;
|
||||
|
Loading…
Reference in New Issue
Block a user