From 020d6b1e5555e4547e8a0a19bd29eea89e1b7a31 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 1 Aug 2018 17:01:31 -0400 Subject: [PATCH] ceph-volume lvm.activate conditional mon-config on prime-osd-dir The --no-mon-config should only be done in Mimic releaes and later Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/devices/lvm/activate.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index 2ef09cacd41f3..782a6d16933af 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -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 -- 2.39.5