From 83fc42f68184093d6c9c65986716aee870e03664 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 17 Mar 2011 09:39:31 +0000 Subject: [PATCH] Fix bug 3205993: change the process of flag -c. Only record and compute the CEC nodes' number. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9070 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index e103ae904..f54207e93 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -814,16 +814,26 @@ sub invoke_cmd { send_msg( $request, 0, "\n Begin to try again, this may takes long time \n" ); #my $uni_tmp = $unicast; my %val_tmp = %$values; + my %found_cec; + for my $v (keys %val_tmp) { + $v =~ /type=([^\)]+)\)\,\(serial-number=([^\)]+)\)\,\(machinetype-model=([^\)]+)\)\,/; + if ( $found_cec{$2.'*'.$3} ne 1 and $1 eq SERVICE_FSP) { + $found_cec{$2.'*'.$3} = 1; + } + } + my $rlt; my $val; my $start_time = Time::HiRes::gettimeofday(); my $elapse; - my $found = scalar(keys %val_tmp); + my $found = scalar(keys %found_cec); while ( $found < $expect_ent ) { $rlt = runslp( $args, $ip, $services, $request ); $val = @$rlt[1]; for my $v (keys %$val) { - if ( $val_tmp{$v} ne 1 ) { + $v =~ /type=([^\)]+)\)\,\(serial-number=([^\)]+)\)\,\(machinetype-model=([^\)]+)\)\,/; + if ( $found_cec{$2.'*'.$3} ne 1 and $1 eq SERVICE_FSP) { + $found_cec{$2.'*'.$3} = 1; $val_tmp{$v} = 1; } }