summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorGary Kotton <gkotton@redhat.com>2013-03-21 06:11:36 +0000
committerMark McLoughlin <markmc@redhat.com>2013-03-22 10:37:26 +0000
commit88d316f0be89d8fe1cc5616091e0ceb47abfd55f (patch)
treebc6c9bf6114350e8f43f8b83e9e13c96fed441dd /openstack
parent723ad7719a21751d8f9fe72787d7713eae58cade (diff)
downloadoslo-88d316f0be89d8fe1cc5616091e0ceb47abfd55f.tar.gz
oslo-88d316f0be89d8fe1cc5616091e0ceb47abfd55f.tar.xz
oslo-88d316f0be89d8fe1cc5616091e0ceb47abfd55f.zip
Locking edge case when lock_path does not exist
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
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/lockutils.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/openstack/common/lockutils.py b/openstack/common/lockutils.py
index 00becb0..ef42b9b 100644
--- a/openstack/common/lockutils.py
+++ b/openstack/common/lockutils.py
@@ -207,7 +207,6 @@ def synchronized(name, lock_file_prefix, external=False, lock_path=None):
local_lock_path = tempfile.mkdtemp()
if not os.path.exists(local_lock_path):
- cleanup_dir = True
fileutils.ensure_tree(local_lock_path)
# NOTE(mikal): the lock name cannot contain directory