From 07ee30b7bb4ceccbf211b192229ab5f4d3bc9158 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Wed, 23 Oct 2013 23:44:04 -0700 Subject: [PATCH] fix bug 3651: rspconfig with cmm does not execute or provide error when entry found in ipmi table --- perl-xCAT/xCAT/Utils.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index c64a87162..30fda8d1e 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -3221,6 +3221,11 @@ sub filter_nodes{ if ($ipmitab) { $ipmitabhash = $ipmitab->getNodesAttribs(\@nodes,['bmc']); } + my $nodehmhash; + my $nodehmtab = xCAT::Table->new("nodehm"); + if ($nodehmtab) { + $nodehmhash = $nodehmtab->getNodesAttribs(\@nodes,['mgt']); + } my (@mp, @ngpfsp, @ngpbmc, @commonfsp, @commonbmc, @unknow); @@ -3230,6 +3235,15 @@ sub filter_nodes{ # if only in 'ipmi', a common x86 node foreach (@nodes) { if (defined ($mptabhash->{$_}->[0]) && defined ($mptabhash->{$_}->[0]->{'mpa'})) { + if ($mptabhash->{$_}->[0]->{'mpa'} eq $_) { + if (defined($nodehmhash->{$_}->[0]) && defined($nodehmhash->{$_}->[0]->{'mgt'}) && + $nodehmhash->{$_}->[0]->{'mgt'} eq "blade") { + push @mp, $_; + } else { + push @unknow, $_; + } + next; + } if (defined ($ppctabhash->{$_}->[0]) && defined ($ppctabhash->{$_}->[0]->{'hcp'})) { # flex power node push @ngpfsp, $_; @@ -3275,6 +3289,7 @@ sub filter_nodes{ } else { push @{$mpnodes}, @ngpfsp; } + push @{$mpnodes}, @ngpbmc; } elsif ($cmd eq "rvitals") { if (@args && (grep /^lcds$/,@args)) { push @{$fspnodes},@ngpfsp;