]> git-server-git.apps.pok.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>
Wed, 4 Dec 2019 15:01:41 +0000 (07:01 -0800)
The squelched error prevented us from knowing connection cleanup doesn't
work on py3.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/pybind/mgr/volumes/fs/volume.py

index 3800615aab35b26e7ca71083ee03199f2734f7a6..0d5db8436325a6f5127cb2369742a8c2c73232f1 100644 (file)
@@ -103,10 +103,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