From db22a3e41a32b0d76aa89e74b644ea07ef943a17 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 14 Aug 2026 02:26:29 +0200 Subject: [PATCH] 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. --- confluent_server/aiohmi/ipmi/command.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/confluent_server/aiohmi/ipmi/command.py b/confluent_server/aiohmi/ipmi/command.py index 51d68f81..229ad3a7 100644 --- a/confluent_server/aiohmi/ipmi/command.py +++ b/confluent_server/aiohmi/ipmi/command.py @@ -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.