Finish setup of Ceph OSD addition and basic management
This commit is contained in:
@ -59,13 +59,13 @@ def add_osd(zk_conn, node, device):
|
||||
return False, 'ERROR: No node named "{}" is present in the cluster.'.format(node)
|
||||
|
||||
# Tell the cluster to create a new OSD for the host
|
||||
new_osd_string = 'new {},{}'.format(node, device)
|
||||
zkhandler.writedata(zk_conn, {'/ceph/osd_cmd': new_osd_string})
|
||||
add_osd_string = 'add {},{}'.format(node, device)
|
||||
zkhandler.writedata(zk_conn, {'/ceph/osd_cmd': add_osd_string})
|
||||
click.echo('Created new OSD with block device {} on node {}.'.format(device, node))
|
||||
return True, ''
|
||||
|
||||
def remove_osd(zk_conn, osd_id):
|
||||
remove_osd_string = 'remove {}'.format(osd_id)
|
||||
zkhandler.writedata(zk_conn, {'/ceph/osd_cmd': remove_osd_string})
|
||||
click.echo('Remove OSD {} from the cluster.'.format(osd_id))
|
||||
click.echo('Removed OSD with ID {} from the cluster.'.format(osd_id))
|
||||
return True, ''
|
||||
|
Reference in New Issue
Block a user