From 4dcd400f639c012c10f141ca9cd88872d61576a9 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 7 Jul 2011 02:53:15 +0000 Subject: [PATCH] Modify the process of find node type git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10029 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-rmc/plugin/rmcmon.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-rmc/plugin/rmcmon.pm b/xCAT-rmc/plugin/rmcmon.pm index 17d816caf..da8ac053b 100644 --- a/xCAT-rmc/plugin/rmcmon.pm +++ b/xCAT-rmc/plugin/rmcmon.pm @@ -16,6 +16,7 @@ use xCAT::GlobalDef; use xCAT_monitoring::monitorctrl; use xCAT_monitoring::rmcmetrix; use xCAT::MsgUtils; +use xCAT::DBobjUtils; #print "xCAT_monitoring::rmcmon loaded\n"; 1; @@ -485,7 +486,7 @@ sub config { my $nodetype=$_->[1]; if ($nodetype){ if ($nodetype =~ /$::NODETYPE_OSI/) { push(@nodes_to_add, $node); } - elsif ($nodetype =~ /$::NODETYPE_HMC/) { push(@hmc_nodes, $node); } + elsif (xCAT::DBobjUtils->getnodetype($node) =~ /$::NODETYPE_HMC/) { push(@hmc_nodes, $node); } } } } @@ -560,7 +561,7 @@ sub deconfig { my $nodetype=$_->[1]; if ($nodetype) { if ($nodetype =~ /$::NODETYPE_OSI/) { push(@nodes_to_rm, $node);} - elsif ($nodetype =~ /$::NODETYPE_HMC/) { push(@hmc_nodes, $node); } + elsif (xCAT::DBobjUtils->getnodetype($node) =~ /$::NODETYPE_HMC/) { push(@hmc_nodes, $node); } } } } @@ -648,11 +649,11 @@ sub startNodeStatusMon { if (! $iphash{$key_a[0]}) { next;} my $mon_nodes=$pPairHash->{$key}; - foreach(@$mon_nodes) { - my $nodetype=$_->[1]; + foreach my $nn(@$mon_nodes) { + my $nodetype=$nn->[1]; if ($nodetype) { - if (($nodetype =~ /$::NODETYPE_OSI/)|| ($nodetype =~ /$::NODETYPE_HMC/)) { - $status_hash{$_->[0]}=$_->[2]; + if (($nodetype =~ /$::NODETYPE_OSI/)|| (xCAT::DBobjUtils->getnodetype($nn->[0]) =~ /$::NODETYPE_HMC/)) { + $status_hash{$nn->[0]}=$nn->[2]; } } }