From 20e7dcd7de1e5f02c0b4a78b6d77ca19892906d2 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 22 Mar 2018 14:47:05 -0400 Subject: [PATCH] Better message for --recover option --- docs/source/guides/admin-guides/references/man1/rflash.1.rst | 2 +- xCAT-client/pods/man1/rflash.1.pod | 2 +- xCAT-server/lib/xcat/plugins/ipmi.pm | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man1/rflash.1.rst b/docs/source/guides/admin-guides/references/man1/rflash.1.rst index 5e833a139..89cbb7c1a 100644 --- a/docs/source/guides/admin-guides/references/man1/rflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rflash.1.rst @@ -236,7 +236,7 @@ This delete option will delete update image from BMC. It expects an ID as the in OpenPOWER BMC specific (using IPMI): - Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. + Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. This option will only work if BMC is in "Brick protection" state. diff --git a/xCAT-client/pods/man1/rflash.1.pod b/xCAT-client/pods/man1/rflash.1.pod index 94d0db3bc..ac8068d95 100644 --- a/xCAT-client/pods/man1/rflash.1.pod +++ b/xCAT-client/pods/man1/rflash.1.pod @@ -173,7 +173,7 @@ Used to recover the flash image in the permanent side of the chip to the tempora OpenPOWER BMC specific (using IPMI): -Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. +Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. This option will only work if BMC is in "Brick protection" state. =item B<--retry=>I diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index a47df379a..40b1850f9 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2518,6 +2518,10 @@ sub do_rflash_process { my $cmd = "/usr/bin/tftp $bmcip -m binary -c put $recover_image ".basename($recover_image); my $output = xCAT::Utils->runcmd($cmd, -1); if ($::RUNCMD_RC != 0) { + if ($output =~ "timed out") { + # Time out running tftp command. One possible reason is BMC not in "brick protection" mode + $output .= " BMC might not be in 'Brick protection' state"; + } $callback->({ error => "Running tftp command \'$cmd\' failed. Error Code: $::RUNCMD_RC. Output: $output.", errorcode => 1 }); exit(1);