From 1f3580e1e06aa9629e14cba84b334efc1a03744d Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 14 Oct 2011 05:34:10 +0000 Subject: [PATCH] in DFM hierarchical cluster, mkhwconn/lshwconn/rmhwconn with -T fnm will send the command to CEC/Frame direclty, not through the service node if specified. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10776 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index c08b9ad0b..c4325d040 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1847,12 +1847,21 @@ sub preprocess_request { } } -# find service nodes for the HCPs + #When run mkhwconn/lshwconn/rmhwconn with -T fnm for CNM, it will send the command to CEC/Frame direclty, + #not through the service node if specified. + my $onlybymaster = 0; + if ((($req->{command}->[0] eq "mkhwconn") || ($req->{command}->[0] eq "lshwconn" ) || ($req->{command}->[0] eq "rmhwconn" )) + && ( $req->{opt}->{T} == 1) ) { + #for fnm + $onlybymaster = 1; + } + + # find service nodes for the HCPs # build an individual request for each service node my $service = "xcat"; my @hcps=keys(%hcp_hash); - my $sn = xCAT::Utils->get_ServiceNode(\@hcps, $service, "MN"); - + my $sn = xCAT::Utils->get_ServiceNode(\@hcps, $service, "MN", $onlybymaster); + # build each request for each service node foreach my $snkey (keys %$sn) {