From 68e575a69d311b2147e69665c55d2aa64aab6054 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 25 Mar 2012 17:48:44 +0000 Subject: [PATCH] Have xcatd bulk xml transform 'unable to find plugin to handle' message to cut back server load'. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@11990 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 6248b1343..b32b0a830 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1144,10 +1144,15 @@ sub plugin_command { } $queuelist =~ s/;$//; $queuelist =~ s/:/./g; - foreach (keys %unhandled_nodes) { - if ($sock) { - print $sock XMLout({node=>[{name=>[$_],error=>["Unable to identify plugin for this command, check relevant tables: $queuelist"],errorcode=>[1]}]},NoAttr=>1,RootName=>'xcatresponse'); - } else { + if ($sock) { + my $xcatresponse = { xcatresponse => [] }; + foreach (keys %unhandled_nodes) { + push @{$xcatresponse->{xcatresponse}},{node=>[{name=>[$_],error=>["Unable to identify plugin for this command, check relevant tables: $queuelist"],errorcode=>[1]}]}; + } + print $sock XMLout({node=>[{name=>[$_],error=>["Unable to identify plugin for this command, check relevant tables: $queuelist"],errorcode=>[1]}]},NoAttr=>1,RootName=>'xcatresponse'); + print $sock XMLout($xcatresponse,KeepRoot=>1,NoAttr=>1); + } else { + foreach (keys %unhandled_nodes) { my $tabdesc = $queuelist; $tabdesc =~ s/=.*$//; $callback->({node=>[{name=>[$_],error=>['Unable to identify plugin for this command, check relevant tables: '.$tabdesc],errorcode=>[1]}]});