From: Alfredo Deza Date: Tue, 5 Dec 2017 18:58:53 +0000 (-0500) Subject: ceph-volume main warn on inability to load ceph.conf, don't raise X-Git-Tag: wip-pdonnell-testing-20180317.202121~908^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=44c768db0da0163340b52643122b66ecebbefe23;p=ceph-ci.git ceph-volume main warn on inability to load ceph.conf, don't raise Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py index e7ed5d88cc5..70cb6be87df 100644 --- a/src/ceph-volume/ceph_volume/main.py +++ b/src/ceph-volume/ceph_volume/main.py @@ -136,10 +136,18 @@ Ceph Conf: {ceph_path} if os.path.isdir(conf.log_path): conf.log_path = os.path.join(args.log_path, 'ceph-volume.log') log.setup() + logger = logging.getLogger(__name__) # set all variables from args and load everything needed according to # them self.load_ceph_conf_path(cluster_name=args.cluster) - conf.ceph = configuration.load(conf.path) + try: + conf.ceph = configuration.load(conf.path) + except exceptions.ConfigurationError as error: + # we warn only here, because it is possible that the configuration + # file is not needed, or that it will be loaded by some other means + # (like reading from lvm tags) + logger.exception('ignoring inability to load ceph.conf') + terminal.red(error) # dispatch to sub-commands terminal.dispatch(self.mapper, subcommand_args)