Add an error message for missing certain plugin

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2983 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2009-03-25 14:31:39 +00:00
parent 2c8137a5c3
commit 81c33fff4a

View File

@ -230,7 +230,7 @@ sub plugin_command {
@nodes = xCAT::NodeRange::noderange($req->{noderange}->[0]);
if (xCAT::NodeRange::nodesmissed()) {
# my $rsp = {errorcode=>1,error=>"Invalid nodes in noderange:".join(',',xCAT::NodeRange::nodesmissed)};
#my $rsp->{serverdone} = {};
# my $rsp->{serverdone} = {};
print "Invalid nodes in noderangex:".join(',',xCAT::NodeRange::nodesmissed())."\n";
# if ($sock) {
# print $sock XMLout($rsp,RootName=>'xcatresponse' ,NoAttr=>1);
@ -385,6 +385,15 @@ sub plugin_command {
# close $parfd;
# $check_fds->add($pfd);
# }
} else {
my $pm_name = $plugins_dir."/".$modname.".pm";
foreach my $node (keys %{$handler_hash{$_}}) {
if ($sock) {
print $sock XMLout({node=>[{name=>[$node],data=>["Cannot find the perl module to complete the operation: $pm_name"],errorcode=>[1]}]},NoAttr=>1,RootName=>'xcatresponse');
} else {
$callback->({node=>[{name=>[$node],data=>["Cannot find the perl module to complete the operation: $pm_name"],errorcode=>[1]}]});
}
}
}
}
unless ($sock) { return $Main::resps };