base check for MN on __mgmtnode group name

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13747 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2012-09-10 18:59:47 +00:00
parent 93f5b9f6cb
commit d913682fe2

View File

@ -2938,11 +2938,11 @@ sub noderangecontainsMn
# check if any node in the noderange is the Management Node return the
# name
my $mname;
my $tab = xCAT::Table->new('nodetype');
my @nodelist=$tab->getAllNodeAttribs(['node','nodetype']);
my $tab = xCAT::Table->new('nodelist');
my @nodelist=$tab->getAllNodeAttribs(['node','groups']);
foreach my $n (@nodelist) {
if (defined($n->{'nodetype'})) {
if ($n->{'nodetype'} eq "mn") { # this is the MN
if (defined($n->{'groups'})) {
if ($n->{'groups'} eq "__mgmtnode") { # this is the MN
$mname=$n->{'node'};
last;
}