From: Sage Weil Date: Wed, 12 Jun 2013 23:55:03 +0000 (-0700) Subject: ceph: add support for 'tell mon.X ...' X-Git-Tag: v0.65~85^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8adf88a2d5fee1c5ad832ddbb1b3bf1e69f977dc;p=ceph.git ceph: add support for 'tell mon.X ...' Signed-off-by: Sage Weil --- diff --git a/src/ceph.in b/src/ceph.in index bd0900a33a13..3246cdbdd5cb 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1110,8 +1110,10 @@ def send_command(target=('mon', ''), cmd=[], inbuf='', timeout=0): if verbose: print >> sys.stderr, '{0} to {1}'.\ format(cmd, target[0]) - ret, outbuf, outs = cluster_handle.mon_command(cmd, inbuf, - timeout) + if target[1] == '': + ret, outbuf, outs = cluster_handle.mon_command(cmd, inbuf, timeout) + else: + ret, outbuf, outs = cluster_handle.mon_command(cmd, inbuf, timeout, target[1]) except Exception as e: raise RuntimeError('"{0}": exception {1}'.format(cmd, e)) @@ -1267,7 +1269,7 @@ def find_cmd_target(childargs): if len(valid_dict) == 2: name = CephName() name.valid(valid_dict['target']) - return 'osd', name.nameid + return name.nametype, name.nameid sig = parse_funcsig(['pg', {'name':'pgid','type':'CephPgid'}]) valid_dict = validate(childargs, sig, partial=True); @@ -1511,7 +1513,7 @@ def main(): targets = [target] - if target[0] == 'osd' and target[1] == '*': + if target[1] == '*': targets = [(target[0], o) for o in osdids()] final_ret = 0