summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2013-01-28 17:32:02 -0600
committerJason Kölker <jason@koelker.net>2013-01-28 17:32:02 -0600
commitfebbd005151e2ade521eed027a7d5372e6e3c0bc (patch)
tree10ff3b69049411be58e58f6ea37d2452be2b367d
parent30a50c8a6c534f01d518eb3ce4cf0d35877d9a7f (diff)
downloadoslo-febbd005151e2ade521eed027a7d5372e6e3c0bc.tar.gz
oslo-febbd005151e2ade521eed027a7d5372e6e3c0bc.tar.xz
oslo-febbd005151e2ade521eed027a7d5372e6e3c0bc.zip
Default lockutils to using a tempdir
* 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
-rw-r--r--openstack/common/lockutils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/openstack/common/lockutils.py b/openstack/common/lockutils.py
index afd6d00..21115fd 100644
--- a/openstack/common/lockutils.py
+++ b/openstack/common/lockutils.py
@@ -39,9 +39,8 @@ util_opts = [
cfg.BoolOpt('disable_process_locking', default=False,
help='Whether to disable inter-process locks'),
cfg.StrOpt('lock_path',
- default=os.path.abspath(os.path.join(os.path.dirname(__file__),
- '../')),
- help='Directory to use for lock files')
+ help=('Directory to use for lock files. Default to a '
+ 'temp directory'))
]