]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.activate consume cluster_name from lvm metadata
authorAlfredo Deza <adeza@redhat.com>
Wed, 25 Oct 2017 22:57:28 +0000 (18:57 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 25 Oct 2017 22:57:28 +0000 (18:57 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/activate.py

index 7d626a093019ce93c16408c0e34a15969c7af93d..63dd8be0e6c8530c67741c6e47d515fde710e99e 100644 (file)
@@ -19,6 +19,7 @@ def activate_filestore(lvs):
     if not osd_lv:
         raise RuntimeError('Unable to find a data LV for filestore activation')
     osd_id = osd_lv.tags['ceph.osd_id']
+    conf.cluster = osd_lv.tags['ceph.cluster_name']
     # it may have a volume with a journal
     osd_journal_lv = lvs.get(lv_tags={'ceph.type': 'journal'})
     # TODO: add sensible error reporting if this is ever the case
@@ -84,6 +85,7 @@ def activate_bluestore(lvs):
     # find the osd
     osd_lv = lvs.get(lv_tags={'ceph.type': 'block'})
     osd_id = osd_lv.tags['ceph.osd_id']
+    conf.cluster = osd_lv.tags['ceph.cluster_name']
     osd_fsid = osd_lv.tags['ceph.osd_fsid']
     db_device_path = get_osd_device_path(osd_lv, lvs, 'db')
     wal_device_path = get_osd_device_path(osd_lv, lvs, 'wal')