]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.activate conditional mon-config on prime-osd-dir 23375/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 1 Aug 2018 21:01:31 +0000 (17:01 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 1 Aug 2018 21:10:29 +0000 (17:10 -0400)
The --no-mon-config should only be done in Mimic releaes and later

Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/activate.py

index 2ef09cacd41f38a2266301430da34e7047c3cdb6..782a6d16933af3bc32d0a26dde293c58518d7fe2 100644 (file)
@@ -3,7 +3,7 @@ import argparse
 import logging
 import os
 from textwrap import dedent
-from ceph_volume import process, conf, decorators, terminal
+from ceph_volume import process, conf, decorators, terminal, __release__
 from ceph_volume.util import system, disk
 from ceph_volume.util import prepare as prepare_utils
 from ceph_volume.util import encryption as encryption_utils
@@ -151,10 +151,16 @@ def activate_bluestore(lvs, no_systemd=False):
     wal_device_path = get_osd_device_path(osd_lv, lvs, 'wal', dmcrypt_secret=dmcrypt_secret)
 
     # Once symlinks are removed, the osd dir can be 'primed again.
-    process.run([
+    prime_command = [
         'ceph-bluestore-tool', '--cluster=%s' % conf.cluster,
         'prime-osd-dir', '--dev', osd_lv_path,
-        '--path', osd_path, '--no-mon-config'])
+        '--path', osd_path]
+
+    if __release__ != "luminous":
+        # mon-config changes are not available in Luminous
+        prime_command.append('--no-mon-config')
+
+    process.run(prime_command)
     # always re-do the symlink regardless if it exists, so that the block,
     # block.wal, and block.db devices that may have changed can be mapped
     # correctly every time