def add_device(request, device_path, bucket=None):
ceph.utils.osdize(dev, hookenv.config('osd-format'),
ceph_hooks.get_journal_devices(),
hookenv.config('osd-reformat'),
hookenv.config('ignore-device-errors'),
hookenv.config('osd-encrypt'),
hookenv.config('bluestore'))
# Make it fast!
if hookenv.config('autotune'):
ceph.utils.tune_dev(dev)
mounts = filter(lambda disk: device_path
in disk.device, psutil.disk_partitions())
if mounts:
osd = mounts[0]
osd_id = osd.mountpoint.split('/')[-1].split('-')[-1]
request.ops.append({
'op': 'move-osd-to-bucket',
'osd': "osd.{}".format(osd_id),
'bucket': bucket})
return request
评论列表
文章目录