2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Skip CPU temperatures from unbooted EUREKA node BMCs

A node whose BMC is not reporting returns Reading 0 from its
temperature sensors, dragging averages down with meaningless
values. The ComputerSystem Oem data flags this via HasBMCMetrics;
skip such nodes, and keep collecting when the flag is absent.
This commit is contained in:
Markus Hilger
2026-07-14 13:33:20 +02:00
parent e59230c63a
commit 7cc8972170
@@ -86,7 +86,9 @@ class OEMHandler(generic.OEMHandler):
"""Read CPU temperatures from EUREKA BMC sensor endpoints.
Reads BMC{N}CPU0Temp and BMC{N}CPU1Temp sensors from
/redfish/v1/Chassis/1/Sensors/.
/redfish/v1/Chassis/1/Sensors/. Nodes whose BMC is not
currently reporting (HasBMCMetrics false) are skipped, as
their sensors read a meaningless 0.
"""
cputemps = []
for sysurl in self._allsysurls:
@@ -94,6 +96,13 @@ class OEMHandler(generic.OEMHandler):
nodeid = nodeid.replace('Node', '')
if not nodeid.isdigit():
continue
try:
sysinfo = await fishclient._do_web_request(sysurl)
except Exception:
continue
if not sysinfo.get('Oem', {}).get('Megware', {}).get(
'HasBMCMetrics', True):
continue
for cpu in ('CPU0', 'CPU1'):
try:
sensor_url = '/redfish/v1/Chassis/1/Sensors/BMC{}{}Temp'.format(nodeid, cpu)