dbus-name: do startup work before registering name
The following commit aggravated an existing issue within OpenBMC
software:
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/26476
A busctl pcap of the failure shows mapper trying to introspect the
inventory manager while the inventory manager is trying to restore its
objects from persistent storage. This results in a timeout on the mapper
side and the inventory object never being stored within mapper.
The above commit appears to aggravate this bug by allowing mapper to
start introspecting inventory manager sooner then it normally does.
Tested:
Verified with this fix that the issue, which was 100% recreatable prior
to this change, did not recreate with multiple BMC reboots
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ic4bd77b2161481a4dc8515d163b82f133a430b50
diff --git a/manager.cpp b/manager.cpp
index c9d84c6..f62afc0 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -91,10 +91,10 @@
}
}
- _bus.request_name(busname);
-
// Restore any persistent inventory
restore();
+
+ _bus.request_name(busname);
}
void Manager::shutdown() noexcept