perl part of 'Enable/disable FSP failover' item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10565 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
c59c0683e5
commit
4063238a78
@ -75,7 +75,9 @@ sub parse_args {
|
||||
"resetnet",
|
||||
"sysname",
|
||||
"pending_power_on_side",
|
||||
"BSR"
|
||||
"BSR",
|
||||
"setup_failover",
|
||||
"force_failover"
|
||||
);
|
||||
my @frame = (
|
||||
"frame",
|
||||
@ -234,7 +236,8 @@ sub parse_args {
|
||||
$request->{method} = "resetnet";
|
||||
return( \%opt );
|
||||
}
|
||||
if(exists($cmds{sysname}) or exists($cmds{pending_power_on_side}) or exists($cmds{BSR})) {
|
||||
if(exists($cmds{sysname}) or exists($cmds{pending_power_on_side}) or exists($cmds{BSR})
|
||||
or exists($cmds{setup_failover}) or exists($cmds{force_failover})) {
|
||||
$request->{hcp} = $request->{hwtype} eq 'frame' ? "bpa":"fsp";
|
||||
$request->{method} = "do_fspapi_function";
|
||||
return (\%opt);
|
||||
@ -309,7 +312,12 @@ sub parse_option {
|
||||
return ("Invalid pending_power_on_side param '$value'");
|
||||
}
|
||||
}
|
||||
if ($command eq 'BSR') {
|
||||
if ($command eq 'setup_failover') {
|
||||
if ($value !~ /^(enable|disable)$/) {
|
||||
return ("Invalid setup_failover param '$value'");
|
||||
}
|
||||
}
|
||||
if ($command =~ /^(BSR|force_failover)$/ ) {
|
||||
return ("BSR value can not be set");
|
||||
}
|
||||
return undef;
|
||||
@ -353,6 +361,19 @@ my %fspapi_action = (
|
||||
query => {
|
||||
cec => "get_cec_bsr"
|
||||
}
|
||||
},
|
||||
setup_failover => {
|
||||
query => {
|
||||
cec => "cec_setup_failover"
|
||||
},
|
||||
set => {
|
||||
cec => "cec_setup_failover"
|
||||
}
|
||||
},
|
||||
force_failover => {
|
||||
query => {
|
||||
cec => "cec_force_failover"
|
||||
}
|
||||
}
|
||||
);
|
||||
sub do_process_query_res {
|
||||
@ -381,6 +402,8 @@ sub do_process_query_res {
|
||||
foreach my $v (@values) {
|
||||
push @$result, [$name, $v, '0'];
|
||||
}
|
||||
} else {
|
||||
push @$result, $res;
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@ -410,6 +433,8 @@ sub do_set_get_para {
|
||||
return (($value eq '*') ? $node_name : $value);
|
||||
} elsif ($cmd =~ /^pending_power_on_side$/){
|
||||
return ($value =~ /^perm$/) ? '0' : '1';
|
||||
} elsif ($cmd =~ /^setup_failover$/) {
|
||||
return ($value =~ /^enable$/) ? '1' : '0';
|
||||
}
|
||||
}
|
||||
|
||||
@ -453,7 +478,7 @@ sub do_fspapi_function {
|
||||
my @ret = ();
|
||||
my $res;
|
||||
my $args = $request->{arg};
|
||||
my @fspapi_array = qw/sysname pending_power_on_side BSR/;
|
||||
my @fspapi_array = qw/sysname pending_power_on_side BSR setup_failover force_failover/;
|
||||
my $invalid_node = &check_node_info($hash);
|
||||
if (defined($invalid_node)) {
|
||||
return ([[$invalid_node, "Node must be CEC or Frame", '1']]);
|
||||
|
@ -142,6 +142,9 @@ my %usage = (
|
||||
rspconfig <noderange> [cec_off_policy]
|
||||
rspconfig <noderange> [cec_off_policy=<poweroff|stayon>]
|
||||
rspconfig <noderange> [BSR]
|
||||
rspconfig <noderange> [setup_failover]
|
||||
rspconfig <noderange> [setup_failover=<enable|disable>]
|
||||
rspconfig <noderange> [force_failover]
|
||||
rspconfig <noderange> --resetnet
|
||||
BPA/Frame (using Direct FSP Management)specific:
|
||||
rspconfig <noderange> HMC_passwd=<currentpasswd,newpasswd>
|
||||
|
@ -140,6 +140,12 @@ B<rspconfig> I<noderange> B<cec_off_policy>={B<poweroff>|B<stayon>}
|
||||
|
||||
B<rspconfig> I<noderange> {B<BSR>}
|
||||
|
||||
B<rspconfig> I<noderange> {B<setup_failover>}
|
||||
|
||||
B<rspconfig> I<noderange> B<setup_failover>={B<enable>|B<disable>}
|
||||
|
||||
B<rspconfig> I<noderange> {B<force_failover>}
|
||||
|
||||
B<rspconfig> I<noderange> B<--resetnet>
|
||||
|
||||
=head2 BPA/Frame (using Direct FSP Management) Specific:
|
||||
@ -254,6 +260,14 @@ Display the CEC/BPA system names.
|
||||
|
||||
Get Barrier Synchronization Register (BSR) allocation for a CEC.
|
||||
|
||||
=item B<setup_failover>={I<enable>|I<disable>}
|
||||
|
||||
Enable or disable the service processor failover function of a CEC or display status of this function.
|
||||
|
||||
=item B<force_failover>
|
||||
|
||||
Force a service processor failover from the primary service processor to the secondary service processor.
|
||||
|
||||
=item B<hostname>={I<*|name>}
|
||||
|
||||
Set CEC/BPA system names to the names in xCAT DB or the input name.
|
||||
@ -615,6 +629,46 @@ B<rspconfig> I<cec01 BSR>
|
||||
|
||||
=item *
|
||||
|
||||
To disable service processor failover for cec01, in order to complete this command, the user should power off cec01 first:
|
||||
|
||||
B<rspconfig> I<cec01 setup_failover>
|
||||
|
||||
cec01: Failover status: Enabled
|
||||
|
||||
B<rpower> I<cec01 off>
|
||||
|
||||
B<rspconfig> I<cec01 setup_failover=disable>
|
||||
|
||||
cec01: Success
|
||||
|
||||
B<rspconfig> I<cec01 setup_failover>
|
||||
|
||||
cec01: Failover status: Disabled
|
||||
|
||||
=item *
|
||||
|
||||
To force service processor failover for cec01:
|
||||
|
||||
B<lshwconn> I<cec01>
|
||||
|
||||
cec01: 192.168.1.1: LINE DOWN
|
||||
cec01: 192.168.2.1: sp=primary,ipadd=192.168.2.1,alt_ipadd=unavailable,state=LINE UP
|
||||
cec01: 192.168.1.2: sp=secondary,ipadd=192.168.1.2,alt_ipadd=unavailable,state=LINE UP
|
||||
cec01: 192.168.2.2: LINE DOWN
|
||||
|
||||
B<rspconfig> I<cec01 force_failover>
|
||||
|
||||
cec01: Success.
|
||||
|
||||
B<lshwconn> I<cec01>
|
||||
|
||||
cec01: 192.168.1.1: sp=secondary,ipadd=192.168.1.1,alt_ipadd=unavailable,state=LINE UP
|
||||
cec01: 192.168.2.1: LINE DOWN
|
||||
cec01: 192.168.1.2: LINE DOWN
|
||||
cec01: 192.168.2.2: sp=primary,ipadd=192.168.2.2,alt_ipadd=unavailable,state=LINE UP
|
||||
|
||||
=item *
|
||||
|
||||
To deconfigure memory bank 9 and 10 of Processing Unit 0 on mm01:
|
||||
|
||||
B<rspconfig> I<mm01 memdecfg=deconfigure:bank:0:9,10>
|
||||
|
Loading…
Reference in New Issue
Block a user