Clear flags when the host changes to powered off state
When the host is powered off, the OCCs will be stopped, so clear any
reset pending flags as well as any outstanding HRESET requests.
This will ensure the next boot will start clean and not react to
something that happened on prior boot.
Tested on Rainier for several error scenarios.
Change-Id: Ie4156975a844e823787f7162ee0542d7f099bd12
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/pldm.cpp b/pldm.cpp
index 4b1582d..7c38971 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -272,6 +272,8 @@
if (propVal == "xyz.openbmc_project.State.Host.HostState.Off")
{
clearData();
+ // Notify manager that host is now off
+ poweredOffCallBack();
}
}
}
@@ -308,6 +310,12 @@
"NUM", sbeInstanceToEffecter.size());
sbeInstanceToEffecter.clear();
}
+ if (!outstandingHResets.empty())
+ {
+ lg2::info("clearData: clearing {NUM} outstanding HRESET requests",
+ "NUM", outstandingHResets.size());
+ outstandingHResets.clear();
+ }
}
void Interface::fetchEffecterInfo(