]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: set conf.cluster name during simple activate
authorAndrew Schoen <aschoen@redhat.com>
Wed, 7 Feb 2018 20:42:24 +0000 (14:42 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 7 Feb 2018 20:42:24 +0000 (14:42 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/simple/activate.py

index 75537a8a64334853f0bdc24ea4a06515124686c0..a429018bfc0c50929427fff32c201926ede79d8e 100644 (file)
@@ -5,7 +5,7 @@ import json
 import logging
 import os
 from textwrap import dedent
-from ceph_volume import process, decorators, terminal
+from ceph_volume import process, decorators, terminal, conf
 from ceph_volume.util import system, disk
 from ceph_volume.util import encryption as encryption_utils
 from ceph_volume.systemd import systemctl
@@ -94,6 +94,7 @@ class Activate(object):
         osd_id = osd_metadata.get('whoami', args.osd_id)
         osd_fsid = osd_metadata.get('fsid', args.osd_fsid)
         data_uuid = osd_metadata.get('data', {}).get('uuid')
+        conf.cluster = osd_metadata.get('cluster_name', 'ceph')
         if not data_uuid:
             raise RuntimeError(
                 'Unable to activate OSD %s - no "uuid" key found for data' % args.osd_id