From e01d6ba039c19da7bc118a437bbee823802f19b9 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 16 Sep 2009 17:58:41 +0000 Subject: [PATCH] fix perl syntax error in xcatpreprocessed check git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4148 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/nodestat.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/nodestat.pm b/xCAT-server/lib/xcat/plugins/nodestat.pm index 251eee230..caf13549d 100644 --- a/xCAT-server/lib/xcat/plugins/nodestat.pm +++ b/xCAT-server/lib/xcat/plugins/nodestat.pm @@ -77,12 +77,15 @@ sub preprocess_request my $req = shift; my $cb = shift; my %sn; - if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; } + if ((defined($req->{_xcatpreprocessed})) && + ($req->{_xcatpreprocessed}->[0] == 1)) { + return [$req]; + } my $nodes = $req->{node}; my $service = "xcat"; my @requests; if ($nodes){ - return [$req]; #For now, do not distribute, nodestat seems to lose accuracy and slow down distributed + return [$req]; #For now, do not distribute, nodestat seems to lose accuracy and slow down distributed # find service nodes for requested nodes # build an individual request for each service node my $sn = xCAT::Utils->get_ServiceNode($nodes, $service, "MN");