fix bug 3546270:rspconfig <cec> HMC_passwd=xxx output error message, for hierarchical environment

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13323 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-07-20 09:54:54 +00:00
parent 4d96588172
commit 00ac099deb

View File

@ -1420,7 +1420,19 @@ sub dispatch_request {
kill 2, $_;
}
};
# this is used to filter out the incorrect module that xcat command came into
# Mainly useful for hierarchical environment on SN
if (defined $req->{'_modname'} ) {
my $in_modname = undef;
if (ref $req->{'_modname'} eq 'ARRAY') {
$in_modname = $req->{'_modname'}->[0];
} else {
$in_modname = $req->{'_modname'};
}
if ($in_modname ne $modname) {
$reqs = [];
}
}
my $onlyone=0;
if (defined $reqs and (scalar(@{$reqs}) == 1)) {
@ -1497,6 +1509,8 @@ sub dispatch_request {
my $errstr;
eval {
undef $_->{'_xcatdest'};
#mainly used by SN to filter out the incorrect module that xcat command came into
$_->{'_modname'} = $modname;
xCAT::Client::submit_request($_,\&dispatch_callback,$xcatdir."/cert/server-cred.pem",$xcatdir."/cert/server-cred.pem",$xcatdir."/cert/ca.pem");
};
if ($@) {