]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/volumes: add global lock debug 36805/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 14:10:58 +0000 (07:10 -0700)
Fixes: https://tracker.ceph.com/issues/47149
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/pybind/mgr/volumes/fs/operations/lock.py

index f5c022935e8faf0b5dccf0a0f8d1bd78738ee974..7ef6923e115c11ea97984d8ebe8a8ceacd42085f 100644 (file)
@@ -1,7 +1,10 @@
 from contextlib import contextmanager
+import logging
 from threading import Lock
 from typing import Dict
 
+log = logging.getLogger(__name__)
+
 # singleton design pattern taken from http://www.aleax.it/5ep.html
 
 class GlobalLock(object):
@@ -33,5 +36,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")