]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume simple.activate better detect bluestore/filestore when type is not found
authorAlfredo Deza <adeza@redhat.com>
Mon, 29 Jul 2019 19:46:48 +0000 (15:46 -0400)
committerJan Fajerski <jfajerski@suse.com>
Wed, 31 Jul 2019 09:06:05 +0000 (11:06 +0200)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit b6a449e2e3241aaa2c0eb8fa9f74b5d939c97852)

src/ceph-volume/ceph_volume/devices/simple/activate.py

index 3cf414fdc73a1b94de26104cd1cb1ed7a68e38cb..bcc9645d67bf10be81313afc3fc281a582c8a384 100644 (file)
@@ -35,8 +35,16 @@ class Activate(object):
         try:
             objectstore = json_config['type']
         except KeyError:
-            logger.warning('"type" was not defined, will assume "bluestore"')
-            objectstore = 'bluestore'
+            if {'data', 'journal'}.issubset(set(devices)):
+                logger.warning(
+                    '"type" key not found, assuming "filestore" since journal key is present'
+                )
+                objectstore = 'filestore'
+            else:
+                logger.warning(
+                    '"type" key not found, assuming "bluestore" since journal key is not present'
+                )
+                objectstore = 'bluestore'
 
         # Go through all the device combinations that are absolutely required,
         # raise an error describing what was expected and what was found