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 <sage@redhat.com>
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)