From 43e28a0bae37c864725f35863ddd3bb418fc904c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 9 Mar 2020 15:45:36 -0500 Subject: [PATCH] cephadm: bootstrap: tolerate error return from -h Sometimes we time out connecting to the mon to get commands and return an error code. See https://tracker.ceph.com/issues/44526 Signed-off-by: Sage Weil --- src/cephadm/cephadm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 3a859e566e42..93a9a4f1504f 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2048,8 +2048,13 @@ def command_bootstrap(): def is_dashboard_available(): # type: () -> bool timeout=args.timeout if args.timeout else 30 # seconds - out = cli(['-h'], timeout=timeout) - return 'dashboard' in out + try: + out = cli(['-h'], timeout=timeout) + return 'dashboard' in out + except RuntimeError as e: + # sometimes -h command times out/errors out + logger.debug('Command errored out: %s' % e) + return False is_available('Dashboard', is_dashboard_available) -- 2.47.3