]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: ignore failure to load ceph configuration for block.db size
authorAndrew Schoen <aschoen@redhat.com>
Thu, 4 Oct 2018 17:47:48 +0000 (12:47 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 10 Oct 2018 19:30:28 +0000 (15:30 -0400)
If we fail to load a ceph configureation file when trying to get the
block.db size then just use defaults instead of throwing an error.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/util/prepare.py

index 62fb642cf7af9e6bca18eaac7cf1895bb9ffe359..9b71dd04edd406fcb7ed1d087e6e719b8fd6bcbc 100644 (file)
@@ -83,7 +83,12 @@ def get_block_db_size(lv_format=True):
     .. note: Configuration values are in bytes, unlike journals which
              are defined in gigabytes
     """
-    conf_db_size = conf.ceph.get_safe('osd', 'bluestore_block_db_size', None)
+    conf_db_size = None
+    try:
+        conf_db_size = conf.ceph.get_safe('osd', 'bluestore_block_db_size', None)
+    except RuntimeError:
+        logger.debug("failed to load ceph configuration, will use defaults")
+
     if not conf_db_size:
         logger.debug(
             'block.db has no size configuration, will fallback to using as much as possible'