This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I5d4716597ccf5dec27c4bfd0217a51b30fcaa088
The backoff timer has a few issues that can cause it to get stuck
in an infinite loop and never time out.
1. The random.gauss() function used to generate random jitter can
return negative values, so when it does, it makes the elapsed time
self._error_time go "backward."
2. The random jitter is used as a multiplier for the self._interval,
so self._interval can deviate far away from the mean over time and
walk to zero, causing self._interval to be 0, which will prevent
the timer from making progress from that point on because idle
will always evaluate to zero and the elapsed time won't increase.
3. The evaluated interval doesn't have a lower bound, so over time
it can get extremely small if jitter (the mean) < 0.5.
This adds a min_interval keyword argument to the BackOffLoopingCall
start() function that defaults to 0.001s and uses it to lower bound
the interval calculations. We'll also take the absolute value of the
return from random.gauss() to prevent elapsed time going backward, and
we'll calculate the running self._interval separately to make it track
the desired growth rate of the backoff and not let it drift with the
random.gauss() values.
Closes-Bug: #1686159
Change-Id: Id17668a34d5cedbe870c9056350a7e9c7196faa7
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate
the setting from the old warnerrors one.
Change-Id: If31f68a80ab9e490dbf1457c274ac9f0c78239c4
Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.
[1] http://sphinx-doc.org/domains.html#info-field-lists
Change-Id: I242b83c5713cc1faa30dcdffa2d989fb9a63b3ef
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: Ia99ace49991a7bced6169f024e32832f1b190588
When a green thread dies quickly, it will call the linked callbacks on
the link call synchronously. In this case, an error will happen when
ThreadGroup is used, as the thread is not accounted for until the link
is done. This manages this race condition by reverting the operations to
link after.
Change-Id: Iccf6edb0dfddda54552bd8787f64da84486061b7
Closes-Bug: #1662939
We need to pass into VersionInfo what one would expect from running:
setup.py --name
Right now we pass in say oslo_context and pbr fails if there is no .git in
the python source tree
Closes-Bug: #1662266
Change-Id: I9ff67b5c8a82c5efac155b228494f0a63a6cbf10
We have registered all config options in method setUp of
ServiceBaseTestCase, don't need repeat them again in subclass.
Change-Id: Iad4452dc3e7d353a7e963547aee3a356afdf5ad5
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: I0f71ce22b44cdb59340f4101c60c507367842603
Currently when using FixedIntervalLoopingCall, folks need to
add timeout checking logic in their function if they need it.
Adding a new class FixedIntervalWithTimeoutLoopingCall to
provide timeout checking support will save those effort.
Change-Id: I78bfb9e259c2394137d7efbc0ee96bb18a6dc5e7
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.service.
Change-Id: I3cad0b8c3d4909b424358cf2f0bc20f80882cb33
MagicMock magically allow things to pass. Any usage should
be replaced with the Mock class and explicit attributes
should be set on it. [1]
[1] http://stackoverflow.com/questions/17181687/mock-vs-magicmock
Change-Id: I09866096a9b8f02b61153c127a11afed7196f40a