summaryrefslogtreecommitdiffstats
path: root/user_channel/usercommands.cpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2020-01-10 12:20:16 +0530
committerVernon Mauery <vernon.mauery@linux.intel.com>2020-01-23 01:21:12 +0000
commit0be80bdde8668f7990960bcdddaf3f1360eeadbb (patch)
tree711d980d677a2bc7f4c3ef1df3ecb88ed17cbd4e /user_channel/usercommands.cpp
parentbbe728c374d2583596e628c88c0d8110836f021d (diff)
downloadphosphor-host-ipmid-0be80bdde8668f7990960bcdddaf3f1360eeadbb.tar.gz
phosphor-host-ipmid-0be80bdde8668f7990960bcdddaf3f1360eeadbb.zip
[user-mgmt]: Do late initialization of user init.
When dependency with phosphor-user-manager is removed from host-ipmid, both the daemons can start on it's own pace, causing host-ipmid to miss both GetManagedObjects query and signal capture, as host-ipmid is busy in doing the initialization. Updated code, such that user initialization is posted and executed as part of io schedule. Tested: 1. Verified that user list are properly listed after this change. Note: Also, performed following tests to determine the order didn't cause any problem. Verified with both ipmi_user.json deleted and preserved. 2. Started phosphor-user-manager after host-ipmid 3. Re-started phosphor-user-manager. 4. Started phosphor-host-ipmid after phosphor-user-manager. 5. Restarted phosphor-host-ipmid. 6. Added sleep code to force the scenario of GetManagedObjects fails, and signals are captured. and GetManagedObject passes (when both are started). Change-Id: Id5cc6ada6dd3472ddfd8803c49cd4a2a7fb6c58b Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel/usercommands.cpp')
-rw-r--r--user_channel/usercommands.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/user_channel/usercommands.cpp b/user_channel/usercommands.cpp
index 1d9460c..3396d2d 100644
--- a/user_channel/usercommands.cpp
+++ b/user_channel/usercommands.cpp
@@ -672,7 +672,7 @@ ipmi::RspType<bool, // stdPayload0ipmiReserved
void registerUserIpmiFunctions() __attribute__((constructor));
void registerUserIpmiFunctions()
{
- ipmiUserInit();
+ post_work([]() { ipmiUserInit(); });
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnApp,
ipmi::app::cmdSetUserAccessCommand,
ipmi::Privilege::Admin, ipmiSetUserAccess);
OpenPOWER on IntegriCloud