]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerAdam King <adking@redhat.com>
Mon, 15 Jun 2020 17:48:32 +0000 (13:48 -0400)
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>
src/cephadm/cephadm

index 7c0cb328ee270687a5e4fa68d95308cda8c70b7d..37a9199a7dafed63af14415a3c447f81fbbffd4f 100755 (executable)
@@ -2650,7 +2650,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']: