Module: check_mk
Branch: master
Commit: 101d5cc203df4fb9f91b3b9b40d85e956530bb8b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=101d5cc203df4f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 1 09:17:42 2019 +0100
7080 FIX Management board: Continue when firmware information can not be fetched
The management board monitoring currently tries to fetch two types of information
from the boards: Sensor states and information about the firmware version. In
case the later could not be fetched the processing of the management board data
was terminated. This has now been changed to continue with the data that could
be fetched.
Change-Id: I26e268e695f87fa867c98aa89659f9f481c433eb
---
.werks/7080 | 15 +++++++++++++++
cmk_base/data_sources/ipmi.py | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.werks/7080 b/.werks/7080
new file mode 100644
index 0000000..b5731ef
--- /dev/null
+++ b/.werks/7080
@@ -0,0 +1,15 @@
+Title: Management board: Continue when firmware information can not be fetched
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1549008780
+
+The management board monitoring currently tries to fetch two types of information
+from the boards: Sensor states and information about the firmware version. In
+case the later could not be fetched the processing of the management board data
+was terminated. This has now been changed to continue with the data that could
+be fetched.
diff --git a/cmk_base/data_sources/ipmi.py b/cmk_base/data_sources/ipmi.py
index 12cd5f7..f060c30 100644
--- a/cmk_base/data_sources/ipmi.py
+++ b/cmk_base/data_sources/ipmi.py
@@ -177,9 +177,15 @@ class IPMIManagementBoardDataSource(ManagementBoardDataSource,
CheckMKAgentDataS
def _fetch_ipmi_firmware_section(self, connection):
self._logger.debug("Fetching firmware information via UDP from %s:623"
% (self._ipaddress))
+ try:
+ firmware_entries = connection.get_firmware()
+ except Exception as e:
+ self._logger.verbose("Failed to fetch firmware information: %r" %
e)
+ self._logger.debug("Exception", exc_info=True)
+ return ""
output = "<<<mgmt_ipmi_firmware:sep(124)>>>\n"
- for entity_name, attributes in connection.get_firmware():
+ for entity_name, attributes in firmware_entries:
for attribute_name, value in attributes.items():
output += "%s|%s|%s\n" % (entity_name, attribute_name, value)