From b1cee74fa2225fe10a024c7291bd23aadcc23441 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 7 Feb 2018 14:42:24 -0600 Subject: [PATCH] ceph-volume: set conf.cluster name during simple activate Signed-off-by: Andrew Schoen --- src/ceph-volume/ceph_volume/devices/simple/activate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/devices/simple/activate.py b/src/ceph-volume/ceph_volume/devices/simple/activate.py index 75537a8a64334..a429018bfc0c5 100644 --- a/src/ceph-volume/ceph_volume/devices/simple/activate.py +++ b/src/ceph-volume/ceph_volume/devices/simple/activate.py @@ -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 -- 2.39.5