2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-05 12:37:56 +00:00

Stop asking the bmc who it is on every oem lookup

The oem lookup answers whether it found a handler for the vendor, and that
answer was being stored as whether the lookup had been done at all.  On
anything the map does not name, which is every bmc that is not a Lenovo,
the flag stayed false and each oem_init issued another Get Device ID and
built another handler.

Almost everything goes through oem_init, so this is a round trip added to
almost every operation.  Where those calls are close together it is far
worse than that: reading the sensor data records asks for the event
constants once per record, so a run of 172 records fired 176 Get Device ID
commands back to back, which was enough to make the bmc stop answering and
the read fail with a timeout.  The same sequence now takes 3 commands.

Settling for the generic handler is an answer.  The device id cannot
change within a session, so asking again buys nothing, and the handler it
throws away each time is the one holding the sensor names it had cached.
This commit is contained in:
Markus Hilger
2026-08-14 02:26:29 +02:00
parent 8de6c56998
commit db22a3e41a
+6 -2
View File
@@ -255,8 +255,12 @@ class Command(object):
self._oem = await genericoem.OEMHandler.create(None, None)
self._oemknown = True
return
self._oem, self._oemknown = await get_oem_handler(await self._get_device_id(),
self)
self._oem, _ = await get_oem_handler(await self._get_device_id(), self)
# Settling for the generic handler is an answer too. The device id
# cannot change within a session, so asking again only buys a round
# trip to the bmc and a fresh handler with none of the state the last
# one had cached.
self._oemknown = True
async def get_bootdev(self):
"""Get current boot device override information.