]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: bootstrap: tolerate error return from -h 33825/head
authorSage Weil <sage@redhat.com>
Mon, 9 Mar 2020 20:45:36 +0000 (15:45 -0500)
committerSage Weil <sage@redhat.com>
Mon, 9 Mar 2020 20:46:06 +0000 (15:46 -0500)
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>
src/cephadm/cephadm

index 3a859e566e4256f370547741ee1f28e66e1bc3c2..93a9a4f1504fe666a674e322be135774e447b5e1 100755 (executable)
@@ -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)