Skip to content

Commit

Permalink
Add a attribute in site table to set the delay time for rflash
Browse files Browse the repository at this point in the history
Currently abort failure(0x81) occur during the initiate stage as
the firmware state is not stable enough after cold reset. As the
delay time is not a constant value, this change add a interface in
site table for user to set this value.

Close-issue: xcat2#471
  • Loading branch information
chenglch committed Nov 30, 2015
1 parent 89bca79 commit 02ceafc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/source/guides/admin-guides/references/man5/site.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ site Attributes:
snmpc: The snmp community string that xcat should use when communicating with the
switches.
rflash_delay: Only for rflash command to upgrade firmware on OpenPOWER servers.
This attribute is delay time to wait for the firmware initialization
after cold reset. Default value is 120 in seconds. If set to 0, no delay.
---------------------------
INSTALL/DEPLOYMENT ATTRIBUTES
---------------------------
Expand Down
3 changes: 3 additions & 0 deletions perl-xCAT/xCAT/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,9 @@ site => {
" through HMC. Default is 0.\n\n".
" snmpc: The snmp community string that xcat should use when communicating with the\n".
" switches.\n\n".
" rflash_delay: Only for rflash command to upgrade firmware on OpenPOWER servers.\n".
" This attribute is delay time to wait for the firmware initialization\n".
" after cold reset. Default value is 120 in seconds. If set to 0, no delay.\n\n".
" ---------------------------\n".
"INSTALL/DEPLOYMENT ATTRIBUTES\n".
" ---------------------------\n".
Expand Down
5 changes: 4 additions & 1 deletion xCAT-server/lib/xcat/plugins/ipmi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,10 @@ sub do_firmware_update {
# NOTE(chenglch) some firmware may not stable enough, it can handle the ipmi session
# request, but failed to upgrade, add sleep function as a work around here to avoid of
# error.
sleep(60);
my $rflash_delay = 120;
my $delay_config = xCAT::TableUtils->get_site_attribute("rflash_delay");
$rflash_delay = $delay_config if defined($delay_config) and $delay_config =~ /^\d+$/;
sleep($rflash_delay) if $rflash_delay != 0;
$cmd = $pre_cmd." -z 30000 hpm upgrade $hpm_file force";
$output = xCAT::Utils->runcmd($cmd, -1);

Expand Down

0 comments on commit 02ceafc

Please sign in to comment.