Pass logger into run_command
This commit is contained in:
parent
080ca3201c
commit
79f284a0a9
|
@ -417,7 +417,7 @@ def remove_pool(zk_conn, logger, name):
|
||||||
logger.out('Failed to remove RBD pool {}: {}'.format(name, e), state='e')
|
logger.out('Failed to remove RBD pool {}: {}'.format(name, e), state='e')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def run_command(zk_conn, this_node, data, d_osd):
|
def run_command(zk_conn, logger, this_node, data, d_osd):
|
||||||
# Get the command and args
|
# Get the command and args
|
||||||
command, args = data.split()
|
command, args = data.split()
|
||||||
|
|
||||||
|
|
|
@ -792,7 +792,7 @@ if enable_storage:
|
||||||
@zk_conn.DataWatch('/ceph/cmd')
|
@zk_conn.DataWatch('/ceph/cmd')
|
||||||
def cmd(data, stat, event=''):
|
def cmd(data, stat, event=''):
|
||||||
if data:
|
if data:
|
||||||
CephInstance.run_command(zk_conn, this_node, data.decode('ascii'), d_osd)
|
CephInstance.run_command(zk_conn, logger, this_node, data.decode('ascii'), d_osd)
|
||||||
|
|
||||||
# OSD objects
|
# OSD objects
|
||||||
@zk_conn.ChildrenWatch('/ceph/osds')
|
@zk_conn.ChildrenWatch('/ceph/osds')
|
||||||
|
|
Loading…
Reference in New Issue