]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: UX: Change error message when 'orch host add <host>' fails
authorAdam King <adking@redhat.com>
Thu, 11 Jun 2020 18:03:24 +0000 (14:03 -0400)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 14 Jul 2020 09:39:06 +0000 (11:39 +0200)
Instead of printing out a traceback if adding the host fails
during bootstrapping process, should now print error message
telling user host failed to be added

Fixes: https://tracker.ceph.com/issues/45097
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 0e2dd36aec24f54d51af5551a75a184fdefd325d)

src/cephadm/cephadm

index 0e16fd29fa511912387c275672788db8bbdc9e51..db15be9eec425293d7b3a8a681de1357c8309680 100755 (executable)
@@ -2659,7 +2659,10 @@ def command_bootstrap():
 
         host = get_hostname()
         logger.info('Adding host %s...' % host)
-        cli(['orch', 'host', 'add', host])
+        try:
+            cli(['orch', 'host', 'add', host])
+        except RuntimeError as e:
+            raise Error('Failed to add host <%s>: %s' % (host, e))
 
         if not args.orphan_initial_daemons:
             for t in ['mon', 'mgr', 'crash']: