]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/volumes: print errors in cleanup timer
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Dec 2019 22:32:24 +0000 (14:32 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 6 Feb 2020 22:43:18 +0000 (14:43 -0800)
The squelched error prevented us from knowing connection cleanup doesn't
work on py3.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b45c08b9977acbf8703259e78702b36ffba65162)

src/pybind/mgr/volumes/fs/volume.py

index 6c5e6399da1c3ac48f2ddda3393de54f6907c0bc..f034616c4f648b84ea3640965ff5e074bdc9f82a 100644 (file)
@@ -95,10 +95,14 @@ class ConnectionPool(object):
         recurring timer variant of Timer
         """
         def run(self):
-            while not self.finished.is_set():
-                self.finished.wait(self.interval)
-                self.function(*self.args, **self.kwargs)
-            self.finished.set()
+            try:
+                while not self.finished.is_set():
+                    self.finished.wait(self.interval)
+                    self.function(*self.args, **self.kwargs)
+                self.finished.set()
+            except Exception as e:
+                log.error("ConnectionPool.RTimer: %s", e)
+                raise
 
     # TODO: make this configurable
     TIMER_TASK_RUN_INTERVAL = 30.0  # seconds