From 00ac099deb055babe118f849ed63245dfbb1d3dc Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Fri, 20 Jul 2012 09:54:54 +0000 Subject: [PATCH] fix bug 3546270:rspconfig 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 --- xCAT-server/sbin/xcatd | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 817e518a6..dad84fc00 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -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 ($@) {