From: Adam King Date: Thu, 11 Jun 2020 18:03:24 +0000 (-0400) Subject: cephadm: UX: Change error message when 'orch host add ' fails X-Git-Tag: v16.1.0~2042^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e2dd36aec24f54d51af5551a75a184fdefd325d;p=ceph.git cephadm: UX: Change error message when 'orch host add ' fails 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 --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 7c0cb328ee27..37a9199a7daf 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -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']: