]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: don't use cached conns for hosts not in cluster
authorAdam King <adking@redhat.com>
Tue, 10 May 2022 17:27:44 +0000 (13:27 -0400)
committerAdam King <adking@redhat.com>
Sat, 21 May 2022 23:07:47 +0000 (19:07 -0400)
Fixes: https://tracker.ceph.com/issues/55596
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit acf17ed4572a86fa40fee4e43024aa5a389cd741)

src/pybind/mgr/cephadm/ssh.py

index 56c5d771569ed2d96a06f3554b4777775d345580..fb2d001fc2ae7fe823eabf8baea95bd65c89afa3 100644 (file)
@@ -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)