From: Patrick Donnelly Date: Tue, 3 Dec 2019 22:33:07 +0000 (-0800) Subject: pybind/mgr/volumes: use py3 items iterator X-Git-Tag: v14.2.8~53^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11570355f23e5c332111635abe2d4e740116ffd4;p=ceph.git pybind/mgr/volumes: use py3 items iterator Otherwise this raises an exception. Fixes: https://tracker.ceph.com/issues/43113 Signed-off-by: Patrick Donnelly (cherry picked from commit 03f80804784052d7bf8a0802c319dccaa9b12389) --- diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index f034616c4f64..ec3a2199c4ab 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -119,7 +119,7 @@ class ConnectionPool(object): def cleanup_connections(self): with self.lock: log.info("scanning for idle connections..") - idle_fs = [fs_name for fs_name,conn in self.connections.iteritems() + idle_fs = [fs_name for fs_name,conn in self.connections.items() if conn.is_connection_idle(ConnectionPool.CONNECTION_IDLE_INTERVAL)] for fs_name in idle_fs: log.info("cleaning up connection for '{}'".format(fs_name))