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

Fix EUREKA CPU temperature readings

The sensor URL was built as BMC{N}CpuCPU{X}Temp instead of
BMC{N}CPU{X}Temp, so every request returned 404. The entries also
referenced const.SensorUnits, which does not exist, and used a
dict shape the only consumer, get_average_processor_temperature,
cannot read - it expects thermal-style dicts with ReadingCelsius.
This commit is contained in:
Markus Hilger
2026-07-14 05:42:43 +02:00
parent d8f4049115
commit 5399ba25a0
@@ -96,15 +96,12 @@ class OEMHandler(generic.OEMHandler):
continue
for cpu in ('CPU0', 'CPU1'):
try:
sensor_url = '/redfish/v1/Chassis/1/Sensors/BMC{}Cpu{}Temp'.format(nodeid, cpu)
sensor_url = '/redfish/v1/Chassis/1/Sensors/BMC{}{}Temp'.format(nodeid, cpu)
sensor = await fishclient._do_web_request(sensor_url)
if sensor and 'Reading' in sensor:
cputemps.append({
'name': 'CPU {} Node {}'.format(cpu, nodeid),
'value': float(sensor['Reading']),
'state_ids': [],
'units': const.SensorUnits.Celsius,
'imprecision': None,
'Name': '{} Node {}'.format(cpu, nodeid),
'ReadingCelsius': float(sensor['Reading']),
})
except Exception:
pass