summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2018-02-19 08:31:05 -0800
committerAndrew Geissler <geissonator@yahoo.com>2018-02-19 19:56:35 +0000
commit140f4102169adc30911413352494961867b2b6a3 (patch)
treef435b9356b78c39274cfafd5e7e23b8c64b2881e
parent57255f653bd9696cefc570de80fbde1c56eee17e (diff)
downloadphosphor-objmgr-140f4102169adc30911413352494961867b2b6a3.tar.gz
phosphor-objmgr-140f4102169adc30911413352494961867b2b6a3.zip
Perform one retry on any discovery failure
The discovery phase of mapper is very CPU intensive on the BMC. Situations have arisen, especially on BMC resets with the host up, where a timeout occurs when mapper is discovering an object on the dbus. The effects of mapper not discovering an object can have large impacts to the system. Testing: Validated in QEMU that the retry path was hit and the retry successfully discovered the object. Verified on a witherspoon that the retry path was hit and was successful. Change-Id: I9f05a635c27af744a9deb882deb748804d6ee660 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
-rw-r--r--obmc/mapper/server.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/obmc/mapper/server.py b/obmc/mapper/server.py
index aa4c1e3..a6df224 100644
--- a/obmc/mapper/server.py
+++ b/obmc/mapper/server.py
@@ -469,6 +469,15 @@ class ObjectMapper(dbus.service.Object):
return match
+ def discovery_error_retry(self, owner, path, e):
+ sys.stderr.write(
+ '{} discovery failure on {} - retry\n'.format(owner, path))
+ find_dbus_interfaces(self.bus, owner, '/',
+ self.discovery_callback,
+ self.discovery_error,
+ subtree_match=self.path_match,
+ iface_match=self.interface_match)
+
def discover(self, owners=[]):
def get_owner(name):
try:
@@ -490,7 +499,7 @@ class ObjectMapper(dbus.service.Object):
find_dbus_interfaces(
self.bus, owned_name, '/',
self.discovery_callback,
- self.discovery_error,
+ self.discovery_error_retry,
subtree_match=self.path_match,
iface_match=self.interface_match)
OpenPOWER on IntegriCloud