regulators: Temporarily allow boot w/missing cfg
Temporarily allow the boot to continue if the regulators JSON
configuration file is missing or invalid.
The EntityManager application publishes the system type information on
D-Bus using a "compatible" interface. This information is used to find
the correct regulator config file.
A problem was discovered where a boot can be attempted before
EntityManager has published the system type information. This was
resulting in the regulators application stopping the boot since it
didn't have a valid configuration file yet.
The long-term direction is to enhance the regulators application to wait
for the EntityManager information during the boot if necessary.
However, a short-term fix is required right now. The current behavior
of logging a critical error and stopping the boot is being temporarily
commented out.
Tested:
* Verified that boot is not longer stopped if config file is
missing/invalid.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2e60f9892d3f72143a0e3c28bce19c55b4659f47
diff --git a/phosphor-regulators/src/manager.cpp b/phosphor-regulators/src/manager.cpp
index 94f1431..e81d7f1 100644
--- a/phosphor-regulators/src/manager.cpp
+++ b/phosphor-regulators/src/manager.cpp
@@ -107,13 +107,20 @@
services.getJournal().logError("Unable to configure regulator devices: "
"Configuration file not loaded");
+ // TODO: Add code to wait for EntityManager to publish the compatible
+ // interface before logging this error.
+
// Log critical error since regulators could not be configured. Could
// cause hardware damage if default regulator settings are very wrong.
+ /*
services.getErrorLogging().logConfigFileError(Entry::Level::Critical,
services.getJournal());
+ */
// Throw InternalFailure to propogate error status to D-Bus client
+ /*
throw sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure{};
+ */
}
}