]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: correct connection failure message 38644/head
authorPaul Cuzner <pcuzner@redhat.com>
Fri, 18 Dec 2020 01:45:07 +0000 (14:45 +1300)
committerPaul Cuzner <pcuzner@redhat.com>
Fri, 18 Dec 2020 01:45:07 +0000 (14:45 +1300)
When add host fails with py3 missing, wasn't used in
the output returned to the admin - instead they saw
the generic failure message which "points them in the
wrong direction". This patch shows the py3 missing
message

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
src/pybind/mgr/cephadm/module.py

index db7c83ed2513b9093ac6cf119fa100ec9e96815c..e3ffc8596df3c59405b4072f01da0778e2d4b56d 100644 (file)
@@ -1135,7 +1135,10 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             self._reset_con(host)
 
             user = self.ssh_user if self.mode == 'root' else 'cephadm'
-            msg = f'''Failed to connect to {host} ({addr}).
+            if str(e).startswith("Can't communicate"):
+                msg = str(e)
+            else:
+                msg = f'''Failed to connect to {host} ({addr}).
 Please make sure that the host is reachable and accepts connections using the cephadm SSH key
 
 To add the cephadm SSH key to the host: