the codes about Firmware Deferred Update feature
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13116 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
78c29cbeec
commit
54f8b58399
@ -351,6 +351,8 @@ sub fsp_api_action {
|
||||
my $install_dir = xCAT::Utils->getInstallDir();
|
||||
if( $action =~ /^(code_update|get_compatible_version_from_rpm)$/) {
|
||||
$cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter -d $install_dir/packages_fw/";
|
||||
} elsif($action =~ /^code_updateD$/) {
|
||||
$cmd = "$fsp_api -a code_update -D -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter -d $install_dir/packages_fw/";
|
||||
} elsif($action =~ /^add_connection$/) {
|
||||
$cmd = "$fsp_api -a $action -u $user -p $password -T $tooltype -t $type:$fsp_ip:$id:$node_name:";
|
||||
} elsif ($action =~ /^set_frame_number$/) {
|
||||
|
@ -146,9 +146,9 @@ sub get_lic_filenames {
|
||||
# return ("", "","", $msg, -1);
|
||||
# }
|
||||
} else {
|
||||
$msg = $msg . "Upgrade $mtms disruptively!";
|
||||
if($activate ne "disruptive") {
|
||||
$msg = "Option --activate's value shouldn't be concurrent, and it must be disruptive";
|
||||
$msg = $msg . "Upgrade $mtms!";
|
||||
if($activate !~ /^(disruptive|deferred)$/) {
|
||||
$msg = "Option --activate's value shouldn't be $activate, and it must be disruptive or deferred";
|
||||
return ("", "","", $msg, -1);
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,7 @@ sub rflash {
|
||||
|
||||
my $frame = $$d[5];
|
||||
my $type = xCAT::DBobjUtils->getnodetype($frame);
|
||||
if ( ( $frame ne $name ) && ( $type eq "frame" ) ){
|
||||
if ( ( $frame ne $name ) && ( $type eq "frame" ) && $activate !~ /^deferred$/){
|
||||
|
||||
my @frame_d = (0, 0, 0, $frame, "frame", 0);
|
||||
$action = "list_firmware_level";
|
||||
@ -327,11 +327,14 @@ sub rflash {
|
||||
|
||||
if($housekeeping =~ /^commit$/) { $action = "code_commit"}
|
||||
if($housekeeping =~ /^recover$/) { $action = "code_reject"}
|
||||
if($activate =~ /^disruptive$/) {
|
||||
if($housekeeping =~ /^bpa_acdl$/) { $action = "acdl"}
|
||||
if($activate eq "disruptive") {
|
||||
$action = "code_update";
|
||||
}
|
||||
if($activate =~ /^concurrent$/) {
|
||||
my $res = "\'concurrent\' option not supported in FSPflash.Please use disruptive mode";
|
||||
} elsif ($activate eq "deferred") {
|
||||
$action = "code_updateD";
|
||||
} elsif (defined($activate)){
|
||||
#if($activate =~ /^concurrent$/) {
|
||||
my $res = "\'$activate\' option not supported in FSPflash. Please use disruptive or deferred mode";
|
||||
push @value, [$name, $res, -1];
|
||||
next;
|
||||
}
|
||||
@ -349,7 +352,11 @@ sub rflash {
|
||||
}
|
||||
|
||||
my $res = xCAT::FSPUtils::fsp_api_action($request, $name, $d, $action, 0, $request->{opt}->{d} );
|
||||
push(@value,[$name, @$res[1], @$res[2]]);
|
||||
if ($action eq "acdl" && @$res[2] eq '0') {
|
||||
push(@value, [$name, "Success", '0']);
|
||||
} else {
|
||||
push(@value,[$name, @$res[1], @$res[2]]);
|
||||
}
|
||||
return (\@value);
|
||||
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ sub parse_args {
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s d=s activate=s commit recover) )) {
|
||||
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s d=s activate=s commit recover bpa_acdl) )) {
|
||||
return( usage() );
|
||||
}
|
||||
|
||||
@ -102,7 +102,10 @@ sub parse_args {
|
||||
# Option -v for version
|
||||
####################################
|
||||
if ( exists( $opt{v} )) {
|
||||
return( \$::VERSION );
|
||||
if (!defined($::VERSION)) {
|
||||
return ([xCAT::Usage->getVersion($cmd)]);
|
||||
}
|
||||
return( [$::VERSION] );
|
||||
}
|
||||
|
||||
if ( exists( $opt{h}) || $opt{help}) {
|
||||
@ -112,6 +115,11 @@ sub parse_args {
|
||||
#################################
|
||||
#Option --activate not valid with --commit or --recover
|
||||
#################################
|
||||
if (exists($opt{bpa_acdl}) && (exists($opt{activate}) || exists($opt{commit}) ||
|
||||
exists($opt{recover}) || exists($opt{p}) || exists($opt{d}))) {
|
||||
return ( usage("Option --bpa_acdl not valid with other options "));
|
||||
}
|
||||
|
||||
if( exists( $opt{activate} ) && (exists( $opt{commit}) || exists( $opt{recover}))) {
|
||||
return( usage("Option --activate not valid with --commit or --recover ") );
|
||||
}
|
||||
@ -149,8 +157,8 @@ sub parse_args {
|
||||
#--activate's value only can be concurrent and disruptive
|
||||
################################
|
||||
if(exists($opt{activate})) {
|
||||
if( ($opt{activate} ne "concurrent") && ($opt{activate} ne "disruptive")) {
|
||||
return (usage("--activate's value can only be concurrent or disruptive"));
|
||||
if( ($opt{activate} ne "deferred") && ($opt{activate} ne "disruptive")) {
|
||||
return (usage("--activate's value can only be deferred or disruptive"));
|
||||
}
|
||||
|
||||
if(!exists( $opt{d} )) {
|
||||
@ -181,6 +189,9 @@ sub parse_args {
|
||||
} elsif( defined( $opt{ recover }) ) {
|
||||
print "recover flag\n";
|
||||
$housekeeping = "recover";
|
||||
} elsif (defined( $opt{ bpa_acdl})) {
|
||||
print "bpa_acdl flag\n";
|
||||
$housekeeping = "bpa_acdl";
|
||||
} else {
|
||||
print "no housekeeping - update mode\n";
|
||||
$housekeeping = undef;
|
||||
@ -198,7 +209,7 @@ sub parse_args {
|
||||
####################
|
||||
#suport for "rflash", copy the rpm and xml packages from user-spcefied-directory to /install/packages_fw
|
||||
#####################
|
||||
if ( (!exists($opt{commit})) && (!exists($opt{ recover }))) {
|
||||
if ( (!exists($opt{commit})) && (!exists($opt{ recover })) && (!exists($opt{bpa_acdl}))) {
|
||||
if( preprocess_for_rflash($request, \%opt) == -1) {
|
||||
return( usage() );
|
||||
}
|
||||
@ -526,9 +537,9 @@ sub get_lic_filenames {
|
||||
# return ("", "","", $msg, -1);
|
||||
# }
|
||||
} else {
|
||||
$msg = $msg . "Upgrade $mtms disruptively!";
|
||||
if($activate ne "disruptive") {
|
||||
$msg = "Option --activate's value shouldn't be concurrent, and it must be disruptive";
|
||||
$msg = $msg . "Upgrade $mtms!";
|
||||
if($activate !~ /^(disruptive|deferred)$/) {
|
||||
$msg = "Option --activate's value shouldn't be $activate, and it must be disruptive or deferred";
|
||||
return ("", "","", $msg, -1);
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,8 @@ my %usage = (
|
||||
rinv <noderange> [deconfig [-x]]
|
||||
Blade specific:
|
||||
rinv <noderange> [mtm|serial|mac|bios|diag|mprom|mparom|firm|all]
|
||||
IBM Flex System Compute Node specific:
|
||||
rinv <noderange> [firm]
|
||||
VMware specific:
|
||||
rinv <noderange>
|
||||
zVM specific:
|
||||
@ -268,8 +270,9 @@ my %usage = (
|
||||
rflash <noderange> -p <rpm_directory> [--activate concurrent | disruptive][-V|--verbose]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
rflash <noderange> -p <rpm_directory> --activate disruptive [-d <data_directory>]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]",
|
||||
rflash <noderange> -p <rpm_directory> --activate <disruptive|deferred> [-d <data_directory>]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
||||
rflash <noderange> [--bpa_acdl]",
|
||||
"mkhwconn" =>
|
||||
"Usage:
|
||||
mkhwconn [-h|--help]
|
||||
|
Loading…
Reference in New Issue
Block a user