diff options
author | Pedro Navarro Perez <pednape@gmail.com> | 2013-03-12 04:24:51 -0700 |
---|---|---|
committer | Pedro Navarro Perez <pednape@gmail.com> | 2013-03-12 04:27:36 -0700 |
commit | 21925b63af87c36be97eec5b212e06477471bb1e (patch) | |
tree | 03d1c77103c2332e25b610ebb7c76025a9c9762f | |
parent | ce6571fe64189c2206577d0e40ef8764d44d1378 (diff) | |
download | oslo-21925b63af87c36be97eec5b212e06477471bb1e.tar.gz oslo-21925b63af87c36be97eec5b212e06477471bb1e.tar.xz oslo-21925b63af87c36be97eec5b212e06477471bb1e.zip |
Fix locking issues in Windows
The Windows Storage Cinder plugin through
the Windows Locks implementation
of the InterProcessLock fails in
attaching/detaching operations.
Change-Id: I682205592e152b3222e04ca3221d25594d134dd9
Fixes: bug #1153966
-rw-r--r-- | openstack/common/lockutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack/common/lockutils.py b/openstack/common/lockutils.py index 0c60ed7..dd0956e 100644 --- a/openstack/common/lockutils.py +++ b/openstack/common/lockutils.py @@ -107,10 +107,10 @@ class _InterProcessLock(object): class _WindowsLock(_InterProcessLock): def trylock(self): - msvcrt.locking(self.lockfile, msvcrt.LK_NBLCK, 1) + msvcrt.locking(self.lockfile.fileno(), msvcrt.LK_NBLCK, 1) def unlock(self): - msvcrt.locking(self.lockfile, msvcrt.LK_UNLCK, 1) + msvcrt.locking(self.lockfile.fileno(), msvcrt.LK_UNLCK, 1) class _PosixLock(_InterProcessLock): |