diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index 71d4e5444..c565eae72 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -966,10 +966,10 @@ sub getMonHierarchy { my $row3=$temp_hash3{$node}; my $nodetype=""; #default - #if (defined($row3) && ($row3)) { - # if ($row3->{nodetype}) { $nodetype=$row3->{nodetype}; } - #} - $nodetype=xCAT::DBobjUtils->getnodetype($node); + if (defined($row3) && ($row3)) { + if ($row3->{nodetype}) { $nodetype=$row3->{nodetype}; } + } + #$nodetype=xCAT::DBobjUtils->getnodetype($node); my $monserver; my $monmaster; @@ -1068,10 +1068,10 @@ sub getMonServerWithInfo { my $tmp3= $tabdata->{$node}->[0]; my $nodetype=""; #default - #if (defined($tmp3) && ($tmp3)) { - # if ($tmp3->{nodetype}) { $nodetype=$tmp3->{nodetype}; } - #} - $nodetype=xCAT::DBobjUtils->getnodetype($node); + if (defined($tmp3) && ($tmp3)) { + if ($tmp3->{nodetype}) { $nodetype=$tmp3->{nodetype}; } + } + #$nodetype=xCAT::DBobjUtils->getnodetype($node); my $pairs=$pPairHash->{$node}; @@ -1139,10 +1139,10 @@ sub getMonServer { my $tmp3=$tabdata3->{$node}->[0]; my $nodetype=""; #default - #if (defined($tmp3) && ($tmp3)) { - # if ($tmp3->{nodetype}) { $nodetype=$tmp3->{nodetype}; } - #} - $nodetype=xCAT::DBobjUtils->getnodetype($node); + if (defined($tmp3) && ($tmp3)) { + if ($tmp3->{nodetype}) { $nodetype=$tmp3->{nodetype}; } + } + #$nodetype=xCAT::DBobjUtils->getnodetype($node); my $pairs=$pPairHash->{$node};