import logging
import os
from textwrap import dedent
-from ceph_volume import process, conf, decorators, terminal, __release__, configuration
+from ceph_volume import process, conf, decorators, terminal, configuration
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
prime_command = [
'ceph-bluestore-tool', '--cluster=%s' % conf.cluster,
'prime-osd-dir', '--dev', osd_lv_path,
- '--path', osd_path]
-
- if __release__ != "luminous":
- # mon-config changes are not available in Luminous
- prime_command.append('--no-mon-config')
+ '--path', osd_path, '--no-mon-config']
process.run(prime_command)
# always re-do the symlink regardless if it exists, so that the block,
@pytest.mark.parametrize('flag', mkfs_filestore_flags)
def test_keyring_is_used(self, fake_call, monkeypatch, flag):
- monkeypatch.setattr(prepare, '__release__', 'mimic')
monkeypatch.setattr(system, 'chown', lambda path: True)
prepare.osd_mkfs_filestore(1, 'asdf', keyring='secret')
assert flag in fake_call.calls[0]['args'][0]
- def test_keyring_is_used_luminous(self, fake_call, monkeypatch):
- monkeypatch.setattr(prepare, '__release__', 'luminous')
- monkeypatch.setattr(system, 'chown', lambda path: True)
- prepare.osd_mkfs_filestore(1, 'asdf', keyring='secret')
- assert '--keyfile' not in fake_call.calls[0]['args'][0]
-
class TestOsdMkfsBluestore(object):
prepare.osd_mkfs_bluestore(1, 'asdf')
assert '--keyfile' not in fake_call.calls[0]['args'][0]
- def test_keyring_is_not_added_luminous(self, fake_call, monkeypatch):
- monkeypatch.setattr(system, 'chown', lambda path: True)
- prepare.osd_mkfs_bluestore(1, 'asdf')
- monkeypatch.setattr(prepare, '__release__', 'luminous')
- assert '--keyfile' not in fake_call.calls[0]['args'][0]
-
def test_wal_is_added(self, fake_call, monkeypatch):
monkeypatch.setattr(system, 'chown', lambda path: True)
prepare.osd_mkfs_bluestore(1, 'asdf', wal='/dev/smm1')
import logging
import json
import time
-from ceph_volume import process, conf, __release__, terminal
+from ceph_volume import process, conf, terminal
from ceph_volume.util import system, constants, str_to_int, disk
logger = logging.getLogger(__name__)
if get_osdspec_affinity():
command.extend(['--osdspec-affinity', get_osdspec_affinity()])
- if __release__ != 'luminous':
- # goes through stdin
- command.extend(['--keyfile', '-'])
-
command.extend([
+ '--keyfile', '-',
'--osd-data', path,
'--osd-journal', journal,
'--osd-uuid', fsid,