From 18a22cb2a744b33edca5a303f3c64bab3e2e09ef Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 7 May 2012 14:08:29 +0000 Subject: [PATCH] There will be a performance issue in large cluster in the fix for 3524241, I made the fix again. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12550 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPUtils.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index fd7936e40..9079766aa 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -146,9 +146,6 @@ sub getIPaddress # only need to parse IP addresses for Frame/CEC/BPA/FSP - if ($type eq "lpar") { - $type = xCAT::DBobjUtils->getnodetype($nodetocheck); - } #my $type = xCAT::DBobjUtils->getnodetype($nodetocheck); #my $type = $$attrs[4]; if ($type) { @@ -168,7 +165,15 @@ sub getIPaddress } else { return -3; } - } elsif ($type eq "frame" or $type eq "cec") { + } elsif ($type eq "frame" or $type eq "cec" or $type eq "lpar") { + #In DFM + #1. when the node type is frame, its hcp( $nodetocheck ) is frame, + #and it will get the BPAs IPs for the Frame. + #2. when the node type is CEC, its hcp( $nodetocheck ) is CEC, + #and it will get the FSPs IPs for the CEC. + #3. when the node type is lpar, its hcp is the CEC. + #the $nodetocheck is its' hcp. So set $nodetocheck to $parent variable. + #And then get the FSPs IPs for the CEC. $parent = $nodetocheck; } else { return undef; @@ -448,8 +453,8 @@ sub fsp_state_action { ############################ $fsp_ip = getIPaddress($request, $$attrs[4], $fsp_name ); if(!defined($fsp_ip) or ($fsp_ip == -3)) { - $res[0] = ["Failed to get IP address for $fsp_name."]; - return ([$node_name, @res, -1]); + $res[0] = "Failed to get IP address for $fsp_name or the related FSPs/BPAs."; + return ([-1, $res[0]]); } #print "fsp name: $fsp_name\n";