diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 854271c11..5f5e32c52 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2918,10 +2918,12 @@ sub noderangecontainsMn my $tab = xCAT::Table->new('nodetype'); my @nodelist=$tab->getAllNodeAttribs(['node','nodetype']); foreach my $n (@nodelist) { + if (defined($n->{'nodetype'})) { if ($n->{'nodetype'} eq "mn") { # this is the MN $mname=$n->{'node'}; last; } + } } if (grep(/$mname/, @noderange)) { # if MN in the noderange return $mname;