Handle OCC active sensor updates prior to host runtime
On some systems, occ-control was getting notified that the OCCs were
active before the host reached runtime state. This would prevent
occ-control from starting communication with the OCCs.
The fix will ignore the early OCC Active sensor enabled messages and
once the host gets to runtime, it will re-query the sensors to ensure
they are still active.
Verified on fresh boot, warm boot, BMC reset, warm boot after BMC reset
on a system that exhibited the early sensors and one that did not.
Also removes an unnecessary InternalFailure when a sensor was cleared,
but no OCC objets were found.
Change-Id: Idb6c107cf83d12272aef9179045de73298e6d6b6
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/pldm.cpp b/pldm.cpp
index fb2c245..1bcf7a1 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -197,11 +197,6 @@
.c_str());
}
- if (!open_power::occ::utils::isHostRunning())
- {
- log<level::INFO>("PLDM: HOST is not running");
- isRunning = false;
- }
callBack(instance, isRunning);
return;
@@ -274,6 +269,7 @@
fmt::format("clearData: OCC{} / sensorID: 0x{:04X}",
entry.second, entry.first)
.c_str());
+ callBack(entry.second, false);
}
sensorToOCCInstance.clear();
}
@@ -656,7 +652,7 @@
{
if (!pldmResponseReceived)
{
- log<level::ERR>(
+ log<level::WARNING>(
fmt::format(
"pldmRspExpired: timerCallback - timeout waiting for pldm response for OCC{}",
pldmResponseOcc)