From acf17ed4572a86fa40fee4e43024aa5a389cd741 Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 10 May 2022 13:27:44 -0400 Subject: [PATCH] mgr/cephadm: don't use cached conns for hosts not in cluster Fixes: https://tracker.ceph.com/issues/55596 Signed-off-by: Adam King --- src/pybind/mgr/cephadm/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index 56c5d771569..fb2d001fc2a 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) -- 2.47.3