summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevasquez <eric.vasquez@calxeda.com>2013-11-13 12:13:22 -0600
committerevasquez <eric.vasquez@calxeda.com>2013-11-13 12:13:22 -0600
commit761fa6daf3bbdd98fe1ffbea369af43bda5717c5 (patch)
tree2aafb944779354bd2d92635e8e924c4c8401d90f
parent4da2f9c7eaa95ebf357eeca3a497b6a206675ef8 (diff)
downloadcxmanage-761fa6daf3bbdd98fe1ffbea369af43bda5717c5.tar.gz
CXMAN-255: Don't retry on firware reset errors
-rw-r--r--cxmanage_api/node.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index 133ebb1..2897945 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -923,16 +923,25 @@ updating the EEPROM
communication.
"""
- # Reset CDB
- self.bmc.reset_firmware()
+ try:
+
+ # Reset CDB
+ self.bmc.reset_firmware()
+
+ except IpmiError as err:
+ if ('Error resetting firmware to factory default' != str(err)):
+ raise
- # Reset ubootenv
- fwinfo = self.get_firmware_info()
try:
+
+ # Reset ubootenv
+ fwinfo = self.get_firmware_info()
+
running_part = self._get_partition(fwinfo, "UBOOTENV", "FIRST")
factory_part = self._get_partition(fwinfo, "UBOOTENV", "SECOND")
image = self._download_image(factory_part)
self._upload_image(image, running_part)
+
except NoPartitionError:
pass # Only one partition? Don't mess with it!