summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-10-03 14:34:07 +0300
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-10-07 08:15:29 +0300
commit4df5ac748848c0cc9b8035bb9deceb790af3b971 (patch)
treef973af6930380be12e3961c7289c0cfec27d6aad
parentf78b98bb6c13f10992d4a21104c9e3f30b466290 (diff)
downloadprovingground-4df5ac748848c0cc9b8035bb9deceb790af3b971.tar.xz
prov-mode: Remove throwing error from prov mode.
Provision mode manager, exposing Restriction Mode interface will bail, if there is any problem in reading u-boot environment variable. This was causing issues during Power on activity, as it will block the whole IPMI loading itself. Hence instead of bailing out, code is modified to consider the secure safest value ProvisionedHostDisabled mode, if unable to get u-boot param value. Tested: 1. Verified ipmi loaded file, and whitelist filter works as expected 2. Verified that ipmi still loads with ProvisionedHostDisbaled when u-boot environment is not available 3. verified that it didn't disturb the old behaviour, by doing read-only section update, and doing one full flash update and made sure both works as expected. Change-Id: Ic2e896e1f2de8e876f3d82e935f1f04e7d0419dc Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
-rw-r--r--prov-mode-mgr/src/prov-mode-mgr.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/prov-mode-mgr/src/prov-mode-mgr.cpp b/prov-mode-mgr/src/prov-mode-mgr.cpp
index c6c3315..33d084a 100644
--- a/prov-mode-mgr/src/prov-mode-mgr.cpp
+++ b/prov-mode-mgr/src/prov-mode-mgr.cpp
@@ -36,8 +36,9 @@ ProvModeMgr::ProvModeMgr(
phosphor::logging::log<phosphor::logging::level::ERR>(
"Error in querying provision mode",
phosphor::logging::entry("MSG=%s", ec.message().c_str()));
- phosphor::logging::elog<sdbusplus::xyz::openbmc_project::
- Common::Error::InternalFailure>();
+ provMode =
+ secCtrl::RestrictionMode::Modes::ProvisionedHostDisabled;
+ // Fall through - Continue with ProvisionedHostDisabled value.
}
if (modeStr.empty())
{
@@ -65,8 +66,7 @@ void ProvModeMgr::updateProvModeProperty(
phosphor::logging::log<phosphor::logging::level::ERR>(
"RestrictionMode set-property failed",
phosphor::logging::entry("MSG=%s", ec.message().c_str()));
- phosphor::logging::elog<sdbusplus::xyz::openbmc_project::
- Common::Error::InternalFailure>();
+ // Continue, even for u-boot param update failure.
}
},
uBootEnvMgrService, uBootEnvMgrPath, uBootEnvMgrIntf,
@@ -101,9 +101,7 @@ void ProvModeMgr::init()
phosphor::logging::log<phosphor::logging::level::ERR>(
"RestrictionMode set-property failed",
phosphor::logging::entry("Mode=%s", req.c_str()),
- phosphor::logging::entry("EXCEPTION:%s", e.what()));
- phosphor::logging::elog<sdbusplus::xyz::openbmc_project::
- Common::Error::InternalFailure>();
+ phosphor::logging::entry("EXCEPTION=%s", e.what()));
}
return 0;
},