From: Dan Mick Date: Thu, 6 Jun 2013 03:12:26 +0000 (-0700) Subject: ceph: fix up old-monitor handling X-Git-Tag: v0.65~136^2^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ead8d89d45bbe50e101fc28708441f10527e8976;p=ceph.git ceph: fix up old-monitor handling Finish command after submitting to old monitor, rather than falling through to new-command handling Also, translate -s to status for old mons as well Signed-off-by: Dan Mick --- diff --git a/src/ceph b/src/ceph index f11ad997370..bf5b799baf7 100755 --- a/src/ceph +++ b/src/ceph @@ -1447,6 +1447,9 @@ def main(): ret, outbuf, outs = json_command(target=target, prefix='get_command_descriptions') if ret == -errno.EINVAL: + if parsed_args.status: + sys.argv[sys.argv.index('-s')] = 'status' + # send command to old monitor ret, outbuf, outs = cluster_handle.mon_command(' '.join(sys.argv[1:]), inbuf) @@ -1457,14 +1460,14 @@ def main(): 'Problem getting command descriptions from {0}, {1}'.\ format(target, errno.errorcode[ret]) return ret + else: + sigdict = parse_json_funcsigs(outbuf) - sigdict = parse_json_funcsigs(outbuf) - - if parsed_args.completion: - return complete(sigdict, childargs, target) + if parsed_args.completion: + return complete(sigdict, childargs, target) - ret, outbuf, outs = new_style_command(parsed_args, childargs, target, - sigdict, inbuf, verbose) + ret, outbuf, outs = new_style_command(parsed_args, childargs, target, + sigdict, inbuf, verbose) if ret < 0: ret = -ret