summaryrefslogtreecommitdiffstats
path: root/obmc
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: Remove Python code and build filesKun Yi2019-04-104-1146/+0
| | | | | | | | Remove Python code and build files now that we switched to C++ mapper Tested: built mapper package and no Python file is included Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ia8832eaae52ed85b4c1620a5d0db181e6b744ac7
* bindings: Skip the default ifaces on enumerateMatt Spinler2018-11-261-0/+8
| | | | | | | | | | | | | | | | | | | | | The C++ mapper will now return D-Bus object paths that only contain the 3 default D-Bus interfaces: * org.freedesktop.DBus.Introspectable * org.freedesktop.DBus.Peer * org.freedesktop.DBus.Properties Whereas before it would filter out these paths. As these paths aren't explicitly hosted by a service, trying to do a GetAll method to read their properties, which would occur during an enumerate REST operation, would fail. The fix is to skip trying to read properties on these interfaces. Change-Id: I9b306a4fbefa78c60f739c1351cd32ee2c36c234 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* python-mapper: Switch to dbus service whitelistBrad Bishop2018-10-251-13/+13
| | | | | | | | | | | Use dbus service/busname filtering to match the c++ mapper. This facilitates an easy transition to c++ mapper. Set service-namespace as a required parameter. Set path-namespace as an optional parameter. Change-Id: I6b16622ee1cb354030a82e7b9d412235933c2d39 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* python-mapper: Accept service-namespacesBrad Bishop2018-10-251-2/+9
| | | | | | | | | | | | | | | The c++ mapper implements a dbus service namespace whitelist instead of a path namespace whitelist. A service namespace whitelist significantly reduces the amount of introspection required by the mapper as compared to path namespaces. Update the python mapper to accept the new command line arguments. This is entirely throw-away code to reduce corequisites as users (OpenBMC) transition to the c++ mapper. As such, no logic is implemented behind the new command line options. Change-Id: Ic952e85dbd44e850059e67a3675ddbf1dd2f15b1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove dead MapperBusyExceptionBrad Bishop2018-06-271-8/+0
| | | | | | | | This exception class was not removed when its usage disappeared in d43087f294949583507b5520c8f0b2c359296aa1. Change-Id: I937f78ac37018ad59e8cb5fc65819497126f02d9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Speed up enumerate_subtree()Matt Spinler2018-06-041-13/+15
| | | | | | | | | | | | | | | Searching a set is faster than searching a list, and changing this particular spot to a set cut the function's overall execution time by half when enumerating 200 /xyz/openbmc_project/logging objects, from ~15s down to about 6 (with system power off). Also removed the list() conversions that tend to be slow and aren't really needed for python3 anyway. Resolves openbmc/openbmc#3199 Change-Id: Id4534b7c3aee1017164f6d01e9028a8bcf0e9cd2 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* server: Only update_interfaces() if process_old_owner() finds an ownerAndrew Jeffery2018-05-151-3/+4
| | | | | | | | This avoids a large number of set operations that clearly work on empty sets, but serve no purpose in the circumstance. Change-Id: Idda0ddac2e2df5bef44a3ff3a5790f0ba9c5a47a Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* server: Rework filter_interfaces() for less lambdaAndrew Jeffery2018-05-151-15/+19
| | | | | | | | | | | | | | The pyflame flamegraphs were highlighting the lambdas as the performance bottleneck, so break them out procedural style to gain a better understanding of where the problem lies. Further, the functional style was almost impenetrable with respect to the procedural equivalent. When the function we're executing has full visibility of the transform pipeline the procedural style reduces the cognitive load (at least, for me) even if it is stateful in some sense. Change-Id: I444fcc6daedfc7f53932bc7acc950e4f60ab151f Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* server: Rework methods to avoid mutable default argumentsAndrew Jeffery2018-05-151-2/+7
| | | | | | | | | | | | | | | Mutable objects as default arguments in function or method declarations are only assigned once over the lifetime of the function declaration (i.e. are not assigned per function/method *invocation*). Rework such declarations to assign None (which is immutable), and test for None in the function/method body to assign a per-instance object. The side-effects of mutable default arguments are explored here: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments Change-Id: Id963cdecba63f7072e621208e1a3173e1646ddf1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* server: Stop making lists out of everythingAndrew Jeffery2018-05-151-59/+48
| | | | | | | | | | | | | | | | | | | | As a demonstration of the cost of this pattern: $ python -m timeit "for i in list(range(0, 1000000)): pass" 10 loops, best of 3: 31.4 msec per loop vs: $ python -m timeit "for i in range(0, 1000000): pass" 10 loops, best of 3: 23.5 msec per loop Avoiding the list represents a 33% improvement in execution speed. In a couple of cases this strategy is taken a bit further and generators are introduced to avoid explicitly creating lists. Change-Id: I28b3d90dd227f5a2661cd86c0941c54531ad5413 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* server: discovery: Apply interface filtering rulesBrad Bishop2018-04-031-1/+3
| | | | | | | | | | | We have interface rules but are not applying them on new daemon startup discovery. This results in unintended caching of blacklisted or unspecified interfaces. Resolves openbmc/openbmc#3052 Tested: Built palmetto image and booted BMC to obmc-standby target Change-Id: I57d01f925e51a10abdb55d39922c7f52d2286d91 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port to python 3CamVan Nguyen2018-03-123-20/+30
| | | | | | | | | | Port code to python 3 yet remain backward compatible to python 2. This port is in preparation for yocto 2.4 upgrade. Partially resolves openbmc/openbmc#2920 Change-Id: I0fb2642d6a8d1857ec1a4c4a5c8b962fd327641a Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Perform one retry on any discovery failureAndrew Geissler2018-02-191-1/+10
| | | | | | | | | | | | | | | 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>
* server: Serve well-known bus namesBrad Bishop2018-01-311-19/+16
| | | | | | | | | | | | | | | | | | | Prior to this patch the mapper served unique connection names. Serve well-known names instead so clients can cache mapper lookup results. Tested: Manually verified mapper content and signals in the following workflows: - Service discovery - Interface added post discovery - Interface removed post discovery - Bus disconnect post discovery - Bus connect post discovery - Association added post discovery - Association removed post discovery - Association modified post discovery Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia697c86dc287b6e289ea6d84364b24ef9a2c18c8
* server: Add early escapes to simplify logicBrad Bishop2018-01-311-5/+5
| | | | | | | | | Add a couple early escapes to the bus_handler method. Tested: Manually verified mapper content is the same after service discovery. Change-Id: I9c0e08022176345797fd74809770ddfdfeffe904 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: drop bus check from get_signal_interfacesBrad Bishop2018-01-311-9/+11
| | | | | | | | | | | | | | | | No functional changes, but move bus name normalization from get_signal_interfaces to the call sites. This improves signal handler readability. Changed get_signal_interfaces to filter_signal_interfaces to more accurately describe what the method does. Fix-up call sites. Tested: Manually verified mapper content is the same after service discovery. Change-Id: I0467faa233a960245f8cc8bad14dd66b1b7fead6 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: refactor valid_signalBrad Bishop2018-01-311-5/+13
| | | | | | | | | | | | | | | Change the method name to bus_normalize to more accurately reflect what it does, which is normalize unique and well-known bus names to a well-known name. Provide the normalized name to callers. Fix-up call sites with the new name. Tested: Manually verified mapper content is the same for a test object after adding and removing interfaces from the test object, after new service discovery and after bus name owner loss. Change-Id: I4bc194b3d5537eadf3e6b0a874fe72caaf615372 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Unmask association signalsBrad Bishop2018-01-311-0/+1
| | | | | | | | | | | | | | PropertiesChanged signals are masked by default by pyphosphor. When left masked, PropertiesChanged signals are not emitted by the mapper when it adds or removes endpoints from an association. Unmask signals when association objects are created so the signal is emitted. Tested: Manually verified PropertiesChanged signals are emitted on association endpoint updates with busctl. Change-Id: Ie222aa414554c416a0c7483ddbcdab1c81dac77e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* utils: pycodestyle fixBrad Bishop2018-01-312-4/+8
| | | | | | | | Fix a bug flagged by pycodestyle. Change-Id: I4833b0c294df2f4b6690debdcd6fbb2e312fe70e Tested: No functional change, whitespace only. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port obmc.mapper to python3.5Balaji B Rao2018-01-303-47/+44
| | | | | Change-Id: I472d92ddae72f004fb9d00103f160c9b108143fd Signed-off-by: Balaji B Rao <balajibapu@gmail.com>
* Ignore E731 in objmgrAdriana Kobylak2018-01-161-4/+4
| | | | | | | | | | | | | | | Ignore the error E731 "do not assign a lambda expression, use a def" in the mapper repository as it would require 3x the number of lines of code to create separate def functions and avoid syntax errors when running on the BMC. According to the python documentation under their Programming Recommendations, E731 is intended to aid debug, as the variable assigned to the lambda would just show as <lambda> in a traceback. Fixes openbmc/openbmc#2796 Change-Id: Id9248ec1f3d1a8c736749ba138d9c0e39d92e5ce Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Fix objmgr using pycodestyle (pep8) rulesAdriana Kobylak2018-01-102-7/+9
| | | | | | | | | | | | Create a setup.cfg file which is used by pycodestyle (formerly pep8) to override defaults. This file can be used by the build verification to check if a repo can have format-check run. Fix long lines, bare excepctions, and lambda error messages. Change-Id: If7f4590c098e04aad6b507c410934f433c739bc7 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Revert "server: Serve well-known bus names"Andrew Geissler2018-01-021-7/+7
| | | | | | | | | This reverts commit 799e7bc959540d57dfaae67b5cd495ca4163fb0f. This commit caused a regression, see openbmc/openbmc#2751 Change-Id: Idcfa80ff6209a1fcf77f6ea29ffea6d312b16587 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* server: Log additional information for discoveryBrad Bishop2017-12-201-1/+9
| | | | | | | | | | | | | | discovery_error is called from both exception and normal execution contexts. In exception context print_exception prints the exception class and message. Print the exception class and message when invoked in normal context. Resolves: openbmc/openbmc#2718 Change-Id: Ia6ab9c9d663161028f47e17af2f73bfe801af399 Signed-off-by: Brad Bishop <bradleyb@@fuzziesquirrel.com>
* server: Print traceback to stderrBrad Bishop2017-12-201-1/+1
| | | | | | | | The discovery error callback erroneously prints a traceback to stdout. Change-Id: Iea936df0e811e38ae3bb5bd09c4892581be4a5f0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* bindings.py: Use get_dbus_name to check for errorAdriana Kobylak2017-12-181-1/+1
| | | | | | | | | | | | Check the dbus name instead of message for error checking. The dbus message is the description of the error, like "Unknown interface 'foo'". The dbus name is the actual error string, like "org.freedesktop.DBus.Error.UnknownInterface", Resolves openbmc/openbmc#2463 Change-Id: I8721e7b262dbc8f4ebae9a8e30074bdf6a53b025 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* server: Serve well-known bus namesBrad Bishop2017-12-151-7/+7
| | | | | | | | | | | | | Prior to this patch the mapper served unique connection names. Serve well-known names instead so clients can cache mapper lookup results. Resolves openbmc/openbmc#1496 Resolves openbmc/openbmc#2670 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com> Change-Id: I214f8cc56b2d70a7d000faf2a44cf8444ccd2ae9
* server: Fix missing Association interfaceBrad Bishop2017-11-271-23/+4
| | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch org.openbmc.Association is not included in the introspection result. This prevents clients using D-Bus language bindings that actually validate the interface prior to attempt to read a property. The custom org.freedesktop.Dbus.Properties implementation on the Association class used the wrong signature for the Get and GetAll methods, violating the D-Bus specification. Fix this by using the implementation in the pyphosphor dbus binding add-ons module. The association interface does not have any methods or signals. Without help, dbus-python won't find these interfaces when using the Introspect implementation from dbus-python. Use the new add_interfaces decorator in the pyphosphor dbus bindings to help dbus-python find it and include it in the introspection result. Change-Id: I21fcd651e762c727a8d442ab6075ac7fa7e552d2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Delegate association signal logicBrad Bishop2017-11-271-29/+16
| | | | | | | | | | | | Avoid emitting org.freedesktop.DBus.Properties.Properties changed signals on association objects prior to an org.freedesktop.DBus.ObjectManager.Interfaces removed signal. Do this by dropping the Association append, remove, and emit_signal methods and move their logic to the mapper. Change-Id: Ibff3d7e0eb47de3ea992394e2122d39407aaf64e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Remove Association.__getattr__Brad Bishop2017-11-271-12/+8
| | | | | | | | | | | | | | | Refactor the Association class in preparation for inheriting from obmc.dbuslib.DbusProperties. - Remove the __getattr__ override and its usage. It does not appear to be necessary. - Store endpoints in an interface/properties dictionary named properties in alignment with obmc.dbuslib.DbusProperties. - Refactor methods to use properties dictionary rather than the endpoints list. Change-Id: I4b8befa0d2e69a9f2266fa2818e0f81ae4cdcf56 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Add docstringsBrad Bishop2017-11-271-0/+9
| | | | | | | Add docstrings for the Associations class. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia8370d67c24818b229114b76f4e5c91c6254682c
* server: Performance improvementsBrad Bishop2017-11-271-8/+9
| | | | | | | | When processing associations reduce the number of object manager list searches from four to one. Change-Id: I39603ca3cf22fd3090ef90be89690cad78d9ac4b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Skip associations without an endpointBrad Bishop2017-11-271-0/+4
| | | | | | | | Improve application robustness by discarding associations property instances that leave the endpoint blank. Change-Id: I4c688add3ebf8532bf7d3784e15545c788ff26fd Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Reduce PropertiesChanged wakeupsBrad Bishop2017-11-151-0/+1
| | | | | | | | | | | | | | The mapper subscribes to all PropertiesChanged signal events, and then discards them if the changed interface is not the associations interface. Add an arg0 filter on the signal subscription to drastically reduce the number of spurious wakeups. Resolves openbmc/openbmc#2573 Change-Id: I5e6659c90d292a3da06c5dda148d0caed8939ecc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Update copyright yearBrad Bishop2017-11-011-1/+1
| | | | | Change-Id: I1db71a2e0ba03b06cbb192d570e22481388036cd Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Fix interface filter logic bug on GetSubTreePathsBrad Bishop2017-09-131-1/+1
| | | | | | | | | | | This doesn't appear to have ever worked or only in very select situations. When enumerating paths with a filter, handle path- only elements with no interface data. Resolves: openbmc/openbmc#2226 Change-Id: I50a8394c35d5f00f715b153bf6d0bb0b6f153bcf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* bindings: Fix interface matching when searchingBrad Bishop2017-09-111-4/+3
| | | | | | | | | | | | | | | | Prior to this patch the default interface matching filter specified the org.openbmc and xyz.openbmc_project interface namespaces. This results in missing attributes in other namespaces. Change the default match algorithm to filter out org.freedesktop.DBus.ObjectManager interfaces only, so that by default the complete set of interfaces are considered. Resolves: openbmc/openbmc#2269 Change-Id: If895b7bbfa8794a36376042cbdbcf55c300abb50 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Fix bug in mapper for associations KeyErrorGunnar Mills2017-09-071-2/+1
| | | | | | | | | | | | | In the active software image associations, the associations property is initially empty, associations are added as images become active. Remove the check for an empty associations property. This check was causing the 'associations' dict object to not be created, which was causing the KeyError. Resolves openbmc/openbmc#2263 Change-Id: Ibc11d92d7bb99d22fbb31ed7b6196165431cee55 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* server: Ignore mapper generated signalsBrad Bishop2017-07-291-1/+3
| | | | | | | | | Correct a bug that prevented this. This was always the intent as the mapper does not rely on dbus to inform it of its own signal generating actions. Change-Id: I56af68ed65903ac105a6fb553010c389cf0ea679 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Handle short lived bus name ownersBrad Bishop2017-07-291-2/+7
| | | | | | | | | A short lived process may claim a name and then exit before the mapper calls GetNameOwner on it. Add code to tolerate this. Change-Id: I2cf81713da4c83605c636d09087a18c651187aec Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Improve discovery failure handlingBrad Bishop2017-07-291-1/+12
| | | | | | | | | Display the failing service and path. Display the traceback of the original error. Don't wait forever to claim a bus name after a failure. Change-Id: I2bf0f0ee29d4fe838eae215590fad7d4b2ef0c7c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: Add command line optionsBrad Bishop2017-07-101-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Add four non-optional command line options for the server: namespace Instruct the server what dbus path namespaces to watch. interface_namespace Instruct the server which interfaces to watch. blacklist Instruct the server to ignore specific paths. interface blacklist Instruct the server to ignore specific interfaces. Paths are checked before interfaces. If a path does not match the interface configuration does not matter. Paths are first checked against the blacklist and then allowed if the path contains the namespace or the namespace contains the path. Interfaces are slightly different; the blacklist is checked as with paths but then the interface is only allowed if it contains the namespace. Resolves: openbmc/openbmc#1767 Change-Id: Ib83d5163681fc49114e4c86be177d11b8528322f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* server: fix unexpected GetSubTreePaths behaviorBrad Bishop2017-06-231-1/+3
| | | | | | | | | | | | | | The intent is that subtree paths enumerate all paths, even paths that don't have any objects associated with them. For example a get subtree paths on /xyz should provide /xyz/openbmc_project. Starting with 1c33c22 get subtree paths incorrectly searches for paths with objects under them. Resolves: openbmc/openbmc#1544 Change-Id: If6db079d10a4216b192bf18d26b4bacbcc264314 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Fix interfaces added logic errorBrad Bishop2017-06-081-1/+1
| | | | | | | | | Fix a bug that prevents the mapper from correctly processing an interfaces added signal when the interface is added to an object that already has interfaces that have been processed. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I1a9045c14d1d8b70151a8f5cc95eb18dbb20c79f
* Move object_mapper per dbus path conventions.Leonel Gonzalez2017-03-201-1/+1
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: I964620e7b741dffbf5a680ae775f371a28143860 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
* Don't return errors when busyBrad Bishop2017-02-241-12/+0
| | | | | | | | | | | | | | | | | | | | Respond to method calls when the mapper is in the middle of processing a NameOwnerChanged signal, rather than returning ObjectPathInUse. Prior to this patch mapper responses guaranteed causal ordering. This patch removes that guarantee in order to remove the need for operation retries. Achieving both causal ordering and blocking responses is not possible with python-dbus without additional threads. This workaround will serve as a mitigation until the mapper can be written with sdbus bindings that do not have the limitations of python-dbus. Resolves openbmc/openbmc#1145 Change-Id: Idc21a11d7cc815bc8d0fcb7f18edc63bfed14da9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add xyz.openbmc_project.ObjectMapper.PrivateBrad Bishop2017-02-242-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | The mapper client bindings currently use the NameOwnerChanged signal as a trigger for a mapper query when waiting for an object to appear on the bus. This works because at the moment the mapper returns a busy response to clients in the window between NameOwnerChanged and completion of its discovery. A forthcoming patch will change this behavior such that the mapper will go ahead and respond in the window to improve overall mapper responsiveness, at the cost of the current causal ordering guarantee. The ordering guarantee is what allows the current wait binding implementation to work. Without it, the wait binding requires a means to determine when it is safe to make a make a query. Add a new mapper interface xyz.openbmc_project.ObjectMapper.Private with a single signal IntrospectionComplete to meet this requirement. "Private" because the signal should only be consumed by the mapper client bindings. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia7b65cd7edd37c49fa7b5ad808b0c59304c68717
* Add retries for LimitsExceeded errorsMatt Spinler2017-01-302-3/+6
| | | | | | | | | | There will now be retries for the LimitsExceeded exceptions just like the ObjectPathInUse ones. Resolves openbmc/openbmc#978. Change-Id: Ide1465372148d804c522f99e252a0c6c48e7da41 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Changing default retry interval to 0.2 secondsCory Klokman2017-01-251-4/+4
| | | | | | | Resolves openbmc/openbmc#974. Change-Id: I05e0ad31d98398a0375d4db620a388d4af1dec8a Signed-off-by: Cory Klokman <cklokma@us.ibm.com>
* Add sleep between retires in bindingsLei YU2017-01-161-9/+12
| | | | | | | | | | | | | | | In bindings.py the common retry() function uses a busy loop to retry, in some cases the busy loop just increase the work loads of mapper and the caller still get the ObjectPathInUse exception. It's better to sleep for a while between retries. A sleep interval is added as parameter default to 0, so the change does not break existing functions. Then the caller has an option to pass a sleep interval to indiciate it would sleep for an interval between retries. Change-Id: Ie1f248dc0b1be291dfa597eba2f58ba9bf247d6b Signed-off-by: Lei YU <mine260309@gmail.com>
OpenPOWER on IntegriCloud