From e48394d9cddb96bed5a0f2a8fd5b92633778e8aa Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 3 Dec 2019 14:32:24 -0800 Subject: [PATCH] pybind/mgr/volumes: print errors in cleanup timer The squelched error prevented us from knowing connection cleanup doesn't work on py3. Signed-off-by: Patrick Donnelly (cherry picked from commit b45c08b9977acbf8703259e78702b36ffba65162) --- src/pybind/mgr/volumes/fs/volume.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index 6c5e6399da1c..f034616c4f64 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -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 -- 2.47.3