From 7fb346f9ae9c01c3e968ffaaa261af38214abe13 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Fri, 20 Jul 2012 09:38:49 +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/branches/2.7@13322 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 1aa628fbb..5a1b67030 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1414,7 +1414,19 @@ sub dispatch_request { kill 2, $_; } }; - + # this is used by SN 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)) { @@ -1491,6 +1503,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 ($@) {