From: Adam King Date: Tue, 10 May 2022 17:27:44 +0000 (-0400) Subject: mgr/cephadm: don't use cached conns for hosts not in cluster X-Git-Tag: v17.2.1~48^2~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7dea61ec4218f1d55c236eb0fc9ae52e27d63da6;p=ceph.git mgr/cephadm: don't use cached conns for hosts not in cluster Fixes: https://tracker.ceph.com/issues/55596 Signed-off-by: Adam King (cherry picked from commit acf17ed4572a86fa40fee4e43024aa5a389cd741) --- diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index 56c5d771569e..fb2d001fc2ae 100644 --- a/src/pybind/mgr/cephadm/ssh.py +++ b/src/pybind/mgr/cephadm/ssh.py @@ -58,7 +58,7 @@ class SSHManager: host: str, addr: Optional[str] = None, ) -> "SSHClientConnection": - if not self.cons.get(host): + if not self.cons.get(host) or host not in self.mgr.inventory: if not addr and host in self.mgr.inventory: addr = self.mgr.inventory.get_addr(host)