mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
ceph-volume/activate: load the config from lv tag
When `ceph-volume lvm trigger` is called with an OSD where the tag `ceph.cluster_name` is not 'ceph', it fails. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
This commit is contained in:
parent
2b793952bb
commit
5ac1ec65cb
@ -153,6 +153,8 @@ def activate_bluestore(osd_lvs, no_systemd=False, no_tmpfs=False):
|
||||
osd_id = osd_block_lv.tags['ceph.osd_id']
|
||||
conf.cluster = osd_block_lv.tags['ceph.cluster_name']
|
||||
osd_fsid = osd_block_lv.tags['ceph.osd_fsid']
|
||||
configuration.load_ceph_conf_path(osd_block_lv.tags['ceph.cluster_name'])
|
||||
configuration.load()
|
||||
|
||||
# mount on tmpfs the osd directory
|
||||
osd_path = '/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id)
|
||||
|
@ -214,6 +214,7 @@ class TestActivate(object):
|
||||
assert fake_start_osd.calls != []
|
||||
|
||||
def test_bluestore_no_systemd(self, is_root, monkeypatch, capture):
|
||||
monkeypatch.setattr('ceph_volume.configuration.load', lambda: None)
|
||||
fake_enable = Capture()
|
||||
fake_start_osd = Capture()
|
||||
monkeypatch.setattr('ceph_volume.util.system.path_is_mounted', lambda *a, **kw: True)
|
||||
@ -236,6 +237,7 @@ class TestActivate(object):
|
||||
assert fake_start_osd.calls == []
|
||||
|
||||
def test_bluestore_systemd(self, is_root, monkeypatch, capture):
|
||||
monkeypatch.setattr('ceph_volume.configuration.load', lambda: None)
|
||||
fake_enable = Capture()
|
||||
fake_start_osd = Capture()
|
||||
monkeypatch.setattr('ceph_volume.util.system.path_is_mounted', lambda *a, **kw: True)
|
||||
@ -259,6 +261,7 @@ class TestActivate(object):
|
||||
assert fake_start_osd.calls != []
|
||||
|
||||
def test_bluestore_no_systemd_autodetect(self, is_root, monkeypatch, capture):
|
||||
monkeypatch.setattr('ceph_volume.configuration.load', lambda: None)
|
||||
fake_enable = Capture()
|
||||
fake_start_osd = Capture()
|
||||
monkeypatch.setattr('ceph_volume.util.system.path_is_mounted', lambda *a, **kw: True)
|
||||
@ -282,6 +285,7 @@ class TestActivate(object):
|
||||
assert fake_start_osd.calls == []
|
||||
|
||||
def test_bluestore_systemd_autodetect(self, is_root, monkeypatch, capture):
|
||||
monkeypatch.setattr('ceph_volume.configuration.load', lambda: None)
|
||||
fake_enable = Capture()
|
||||
fake_start_osd = Capture()
|
||||
monkeypatch.setattr('ceph_volume.util.system.path_is_mounted',
|
||||
|
Loading…
Reference in New Issue
Block a user