From 0e2dd36aec24f54d51af5551a75a184fdefd325d Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 11 Jun 2020 14:03:24 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 7c0cb328ee2..37a9199a7da 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']: -- 2.39.5