From: Andrew Schoen Date: Thu, 4 Oct 2018 17:47:48 +0000 (-0500) Subject: ceph-volume: ignore failure to load ceph configuration for block.db size X-Git-Tag: v13.2.3~95^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8ecbecd0a5cf41ffc0bfad27a790ec0e4800a801;p=ceph.git ceph-volume: ignore failure to load ceph configuration for block.db size 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 (cherry picked from commit a7ee36ca92b6592b6b3e218252c6a4c30416591b) --- diff --git a/src/ceph-volume/ceph_volume/util/prepare.py b/src/ceph-volume/ceph_volume/util/prepare.py index aaeced84222..9c8229e83e5 100644 --- a/src/ceph-volume/ceph_volume/util/prepare.py +++ b/src/ceph-volume/ceph_volume/util/prepare.py @@ -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'