mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	fix bug 3392336, rspconfig give bpa plugin bug err when enableASMI=yes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10340 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -146,17 +146,21 @@ sub parse_args { | ||||
|     foreach my $arg ( @ARGV ) { | ||||
|         my ($command,$value) = split( /=/, $arg ); | ||||
|         if ( !grep( /^$command$/, @$supported) and !$opt{resetnet}) { | ||||
|             my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI"); | ||||
|             if (defined($enableASMI[0])) { | ||||
|                 $enableASMI[0] =~ tr/a-z/A-Z/;    # convert to upper | ||||
|                     if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) | ||||
|                     { | ||||
|             my $res = xCAT::PPCcfg::parse_args($request, @_); | ||||
|             if (ref($res) eq 'ARRAY') { | ||||
|                 return(usage( "Invalid command for $request->{hwtype} : $arg" )); | ||||
|             } else { | ||||
|                 my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI"); | ||||
|                 if (defined($enableASMI[0])) { | ||||
|                     $enableASMI[0] =~ tr/a-z/A-Z/;    # convert to upper | ||||
|                     if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) { | ||||
|                         $request->{enableASMI} = 1; | ||||
|                         return xCAT::PPCcfg::parse_args($request, @_); | ||||
|                     } | ||||
|             } | ||||
|             return(usage( "Invalid command for $request->{hwtype} : $arg" )); | ||||
|         }  | ||||
|                         return $res; | ||||
|                     }  | ||||
|                 } | ||||
|                 return (usage( "You should enable \"ASMI\" first for \'$command\'.")); | ||||
|             }  | ||||
|         } | ||||
|         if ( exists( $cmds{$command} )) { | ||||
|             return(usage( "Command multiple times: $command" )); | ||||
|         } | ||||
|   | ||||
| @@ -1398,6 +1398,7 @@ sub process_children { | ||||
|         if (defined($conn_flag{$dir})) { | ||||
|             next; | ||||
|         } | ||||
|         $request->{$index->{node}}{cred} = $request->{$host}{cred}; | ||||
|         my $res = &handle_cmd($index->{node}, $host, $request); | ||||
|         $output{$side} = \$res; | ||||
|         if ($res->[0]->{errorcode} ne '128') { | ||||
| @@ -2118,22 +2119,24 @@ sub process_request { | ||||
|            if ($request_new->{command} =~ /^(rspconfig|rpower|reventlog)$/){ | ||||
|                my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI"); | ||||
|                if (defined($enableASMI[0])) { | ||||
|                    $enableASMI[0] =~ tr/a-z/A-Z/;    # convert to upper | ||||
|                    if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) { | ||||
|                         #through asmi ...... | ||||
|                         $request_new->{fsp_api} = 0; | ||||
|                         if(@failed_nodes != 0) { | ||||
|                             my @temp = @failed_nodes; | ||||
|                             @failed_nodes = ();  | ||||
|                             $request_new->{node} = \@temp; | ||||
|                             process_command( $request_new , \%hcps_will, \@failed_nodes, \%failed_msg); | ||||
|                         } #end of if | ||||
|                    } #end of if | ||||
|                } # end of if | ||||
|            } #end of if   | ||||
|                    if (($request_new->{command} !~ /^rspconfig$/) ||  | ||||
|                        (ref($request_new->{method} eq 'HASH'))) { | ||||
|                        $enableASMI[0] =~ tr/a-z/A-Z/;    # convert to upper | ||||
|                        if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) { | ||||
|                            #through asmi ...... | ||||
|                            $request_new->{fsp_api} = 0; | ||||
|                            if(@failed_nodes != 0) { | ||||
|                                my @temp = @failed_nodes; | ||||
|                                @failed_nodes = ();  | ||||
|                                $request_new->{node} = \@temp; | ||||
|                                process_command( $request_new , \%hcps_will, \@failed_nodes, \%failed_msg); | ||||
|                            } #end of if | ||||
|                        } #end of if | ||||
|                    } # end of if | ||||
|                } #end of if   | ||||
|            } | ||||
|        } #end of if | ||||
|     } #end of while(1) | ||||
|        | ||||
| } | ||||
|  | ||||
| ########################################################################## | ||||
|   | ||||
		Reference in New Issue
	
	Block a user