Async request to create PEL
To avoid any deadlocks between phosphor-logging and vpd-manager
service a wrapper around request to create PEL is created
which enables vpd-manager to make async requests to create PEL.
It also implements a new exception type to throw any GPIO
related exception. This was required to throw specific
exception.
Test:
Scenario 1:
While vpd-manager logs a pel with call out to an inventory
item.
It should be checked that both the services do not enter into
a deadlock situation.
Scenario 2:
Any third process is requesting to log PEL with call out
to an inventory item in a loop.
In the mean time vpd-manager also requests to log a PEL
with or without call out to inventory item.
All the pels should be logged correctly in the system.
No deadlock should appear.
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I0efaf6918e679ca94808fc70d747c843a50eaf78
diff --git a/impl.cpp b/impl.cpp
index 99bc074..900e0e8 100644
--- a/impl.cpp
+++ b/impl.cpp
@@ -289,7 +289,7 @@
additionalData.emplace("DESCRIPTION", errMsg);
additionalData.emplace("CALLOUT_INVENTORY_PATH", inventoryPath);
createPEL(additionalData, PelSeverity::WARNING,
- errIntfForEccCheckFail);
+ errIntfForEccCheckFail, nullptr);
}
catch (const VpdDataException& ex)
{
@@ -300,7 +300,7 @@
additionalData.emplace("DESCRIPTION", errMsg);
additionalData.emplace("CALLOUT_INVENTORY_PATH", inventoryPath);
createPEL(additionalData, PelSeverity::WARNING,
- errIntfForInvalidVPD);
+ errIntfForInvalidVPD, nullptr);
}
#endif