]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_volume: support filestore to bluestore migration
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Jan 2020 15:29:48 +0000 (16:29 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 16:18:12 +0000 (11:18 -0500)
This commit adds the filestore to bluestore migration support in
ceph_volume module.

We must append to the executed command only the relevant options
according to what is passed in `osd_objectostore`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aabba3baab50fe4fb86535cd8838edc4af87d917)

library/ceph_volume.py

index 3c9161d8a867d8c495d87d64810dd700f976d0ad..9468a2012c2df7f4306d2e62d1b582e42d32594c 100644 (file)
@@ -319,10 +319,10 @@ def batch(module, container_image):
 
     cmd.extend(batch_devices)
 
-    if block_db_devices:
+    if block_db_devices and objectstore == 'bluestore':
         cmd.extend(['--db-devices', ' '.join(block_db_devices)])
 
-    if wal_devices:
+    if wal_devices and objectstore == 'bluestore':
         cmd.extend(['--wal-devices', ' '.join(wal_devices)])
 
     return cmd
@@ -377,15 +377,15 @@ def prepare_or_create_osd(module, action, container_image):
     cmd.append('--data')
     cmd.append(data)
 
-    if journal:
+    if journal and objectstore == 'filestore':
         journal = get_journal(journal, journal_vg)
         cmd.extend(['--journal', journal])
 
-    if db:
+    if db and objectstore == 'bluestore':
         db = get_db(db, db_vg)
         cmd.extend(['--block.db', db])
 
-    if wal:
+    if wal and objectstore == 'bluestore':
         wal = get_wal(wal, wal_vg)
         cmd.extend(['--block.wal', wal])