2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-12 08:10:12 +00:00

Merge pull request #486 from chenglch/rflash-site

Fix-issue 471: Add a user interface to set the delay time for rflash
This commit is contained in:
zet809
2015-11-30 17:08:52 +08:00
3 changed files with 11 additions and 1 deletions

View File

@ -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
---------------------------

View File

@ -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".

View File

@ -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);