]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/volumes: add global lock debug 36828/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 5 Aug 2020 22:54:33 +0000 (15:54 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 26 Aug 2020 15:29:22 +0000 (08:29 -0700)
Fixes: https://tracker.ceph.com/issues/47149
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d399d4c05bfa432221daf4f7b3635aef1bf35dff)

src/pybind/mgr/volumes/fs/operations/lock.py

index f9c44dc4f67989c22608ab761a456cbd15dbd9f2..ab5f1d04619387e5242b79b594da04d0e8ea6c1a 100644 (file)
@@ -1,6 +1,9 @@
 from contextlib import contextmanager
+import logging
 from threading import Lock
 
+log = logging.getLogger(__name__)
+
 # singleton design pattern taken from http://www.aleax.it/5ep.html
 
 class GlobalLock(object):
@@ -32,5 +35,8 @@ class GlobalLock(object):
 
     @contextmanager
     def lock_op(self):
+        log.debug("entering global lock")
         with self._shared_state['lock']:
+            log.debug("acquired global lock")
             yield
+        log.debug("exited global lock")