summaryrefslogtreecommitdiffstats
path: root/openstack/common/lockutils.py
Commit message (Collapse)AuthorAgeFilesLines
* Use param keyword for docstringsFlaper Fesp2013-06-101-11/+12
| | | | Change-Id: I381a5f917a1c274634173d843dde730218806506
* Added convenience APIs for lockutilsZhongyue Luo2013-05-091-0/+29
| | | | | | | | | | | | | | The lock_file_prefix for each project doesn't need to be configurable or frequently changed. This patch provides a convenience API which returns a partial object of the synchronized decorator to avoid passing the prefix each time locks are used. The set_defaults method is also provided to change the default value of lock_path when needed. Fixes bug #1065524 Change-Id: I7b67f0a482da4be6d53a70db5bbd22dc91bdc10c
* Improve Python 3.x compatibilityDirk Mueller2013-04-221-1/+1
| | | | | | | Mechanical translation of deprecated constructs to 3.x compatible variants. Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9
* Locking edge case when lock_path does not existGary Kotton2013-03-221-1/+0
| | | | | | | | | | Fixes bug 1158179 In the case that the lock_path does not exist and there is a contested resource then the process that was waiting on the lock will not be locking due to the fact that the directory was deleted. Change-Id: I75d720d4df499e85386d3e2cc86b927b017e12ac
* Merge "Fix Copyright Headers - Rename LLC to Foundation"Jenkins2013-03-121-1/+1
|\
| * Fix Copyright Headers - Rename LLC to FoundationDavanum Srinivas2013-03-111-1/+1
| | | | | | | | | | | | One code change, rest are in headers Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
* | Fix locking issues in WindowsPedro Navarro Perez2013-03-121-2/+2
|/ | | | | | | | | | The Windows Storage Cinder plugin through the Windows Locks implementation of the InterProcessLock fails in attaching/detaching operations. Change-Id: I682205592e152b3222e04ca3221d25594d134dd9 Fixes: bug #1153966
* Use oslo-config-2013.1b3Mark McLoughlin2013-02-171-1/+1
| | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b3 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Emit a warning if RPC calls made with lock.Michael Still2013-02-061-46/+59
| | | | | | | | | | | | | | This patch will log a warning every time a RPC call is made while a lock is held if the caller has requested it. This should help us track down performance problems such as the security group refresh problem recently found in nova. RPC calls can emit a warning if called with check_for_lock=True and debugging is turned on. Sneaks up on bug 1063222. Change-Id: Ice94093efb3cb95dd58b31d6ba817c7d505c15af
* Default lockutils to using a tempdirJason Kölker2013-01-281-3/+2
| | | | | | | | | | * Previously lockutils attempted to use __file__/../ as the lock path. This causes packages to fail if the user running the code doesn't have +w access to that dir. Remove the default so it will use mkdtemp instead * Fixes bug 1107950 Change-Id: Ie0cd6fac5403a53a768eb4a0ce7da602b3fef755
* Log when release file lockJoe Gordon2013-01-091-0/+5
| | | | | | | We log when waiting for a file lock, when getting one, so lets log when releasing one. Change-Id: I1838c424fda74c04e9c2107db08226670e8372f3
* Fix import order in openstack/common/lockutils.pyJoe Gordon2012-12-041-1/+1
| | | | Change-Id: Ia1dfa85a81bae6620c2c24c0c28a589d46ed3b04
* Make project pyflakes clean.Monty Taylor2012-11-281-0/+1
| | | | | | | | | | | | | Added both a tox test-env for pyflakes and fixed the current pyflakes errors. This did actually fix a couple of bugs. The CI team has started using pyflakes on its projects and also has started using oslo for things, so ignoring pyflakes warnings on the oslo code was starting to get old. However, additionally, pyflakes is pretty solid, so we should maybe consider gating on it across the board. (% locals() is the biggest thing that we do that it doesn't like) Change-Id: Iac1ca62db301892b7863711162fcbc74807eb24f
* Remove unused greenthread import in lockutilsEric Windisch2012-11-041-1/+0
| | | | Change-Id: I24bfe5926aa5b8542b0ae1205d82aeb7a1e85b30
* Fix missing import in lockutils.Michael Still2012-10-231-0/+1
| | | | | | This showed up while integrating these changes into nova. Change-Id: I48d846fc761c45cf97480a49c99d20817f1dea2d
* Move nova's util.synchronized decorator to openstack common.Michael Still2012-10-181-0/+232
In the end I needed to port utils.ensure_tree as well. Resolves bug 1063230. Change-Id: I6e6fa8201de2cac3f17e6c60d7b16f7df7c64116