From b45c08b9977acbf8703259e78702b36ffba65162 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 --- 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 3800615aab3..0d5db843632 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -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 -- 2.39.5