]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-volume/ceph_volume/main.py
update sources to v12.2.3
[ceph.git] / ceph / src / ceph-volume / ceph_volume / main.py
index d4bee154d97176e0389b3e7b737003906efee701..70cb6be87df04d5d8305efa31f9be00f9f1ba870 100644 (file)
@@ -27,7 +27,7 @@ Ceph Conf: {ceph_path}
     """
 
     def __init__(self, argv=None, parse=True):
-        self.mapper = {'lvm': devices.lvm.LVM}
+        self.mapper = {'lvm': devices.lvm.LVM, 'simple': devices.simple.Simple}
         self.plugin_help = "No plugins found/loaded"
         if argv is None:
             self.argv = sys.argv
@@ -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)