From bda669877464ed051b603c52ec81b92f277f224c Mon Sep 17 00:00:00 2001 From: Indira Sawant Date: Thu, 25 Sep 2025 13:03:36 -0500 Subject: [PATCH] mgr/volumes: reduce noisy health check logs Previously, the manager logged connection cleanup messages at info level even when no idle connections existed, adding unnecessary noise to logs. This change logs cleanup actions at info level only when idle connections are found, and moves the 'no idle connections' message to debug level. Fixes: https://tracker.ceph.com/issues/73635 --- src/pybind/mgr/mgr_util.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/mgr_util.py b/src/pybind/mgr/mgr_util.py index 8574bf5f728..1a77e66a0bc 100644 --- a/src/pybind/mgr/mgr_util.py +++ b/src/pybind/mgr/mgr_util.py @@ -224,16 +224,20 @@ class CephfsConnectionPool(object): def cleanup_connections(self) -> None: with self.lock: - logger.info("scanning for idle connections..") + logger.debug("scanning for idle connections..") idle_conns = [] for fs_name, connections in self.connections.items(): logger.debug(f'fs_name ({fs_name}) connections ({connections})') for connection in connections: if connection.is_connection_idle(CephfsConnectionPool.CONNECTION_IDLE_INTERVAL): idle_conns.append((fs_name, connection)) - logger.info(f'cleaning up connections: {idle_conns}') - for idle_conn in idle_conns: - self._del_connection(idle_conn[0], idle_conn[1]) + # Log only if there are idle connections to clean up + if len(idle_conns) > 0: + logger.info(f'cleaning up connections: {idle_conns}') + for idle_conn in idle_conns: + self._del_connection(idle_conn[0], idle_conn[1]) + else: + logger.debug("No idle connections to clean up.") def get_fs_handle(self, fs_name: str) -> "cephfs.LibCephFS": with self.lock: -- 2.39.5