From: Andrew Schoen Date: Thu, 11 Jan 2018 19:11:31 +0000 (-0600) Subject: ceph-volume: adds crush_device_class to json metadata for 'osd new' X-Git-Tag: v13.0.2~499^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3404d8bba503f3f74f411b11108d39cb626d3bed;p=ceph.git ceph-volume: adds crush_device_class to json metadata for 'osd new' Signed-off-by: Andrew Schoen --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py index 18d504ca4180..4d90efd0bfe7 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py @@ -190,6 +190,9 @@ class Prepare(object): cluster_fsid = conf.ceph.get('global', 'fsid') osd_fsid = args.osd_fsid or system.generate_uuid() + crush_device_class = args.crush_device_class + if crush_device_class: + secrets['crush_device_class'] = crush_device_class # allow re-using an id, in case a prepare failed self.osd_id = args.osd_id or prepare_utils.create_id(osd_fsid, json.dumps(secrets)) tags = { @@ -197,7 +200,7 @@ class Prepare(object): 'ceph.osd_id': self.osd_id, 'ceph.cluster_fsid': cluster_fsid, 'ceph.cluster_name': conf.cluster, - 'ceph.crush_device_class': args.crush_device_class, + 'ceph.crush_device_class': crush_device_class, } if args.filestore: if not args.journal: