ceph: drop --threshold hack for 'pg dump_stuck'

We can live with the incompatibility here; the hack is currently
not working anyway (see #5623).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
Sage Weil 2013-07-13 14:09:10 -07:00
parent 4282971d47
commit daf7672309
4 changed files with 5 additions and 8 deletions

View File

@ -4,3 +4,7 @@ v0.67
* The output of 'ceph status --format=json' or 'ceph -s --format=json'
has changed to return status information in a more structured and
usable format.
* The 'ceph pg dump_stuck [threshold]' command used to require a
--threshold or -t prefix to the threshold argument, but now does
not.

View File

@ -142,8 +142,6 @@ def parse_cmdargs(args=None, target=''):
parser.add_argument('-f', '--format', choices=['json', 'json-pretty',
'xml', 'xml-pretty', 'plain'], dest='output_format')
# for pg dump_stuck
parser.add_argument('--threshold', type=int, help='number of seconds for a pg to be considered stuck for pg dump_stuck')
# returns a Namespace with the parsed args, and a list of all extras
parsed_args, extras = parser.parse_known_args(args)
@ -683,8 +681,6 @@ def main():
compat = True
if parsed_args.output_format:
childargs.extend(['--format', parsed_args.output_format])
if parsed_args.threshold:
childargs.extend(['--threshold', parsed_args.threshold])
ret, outbuf, outs = send_command(cluster_handle, target, childargs,
inbuf)
elif ret:

View File

@ -122,7 +122,7 @@ COMMAND("pg dump_pools_json", "show pg pools info in json only",\
COMMAND("pg dump_stuck " \
"name=stuckops,type=CephChoices,strings=inactive|unclean|stale,n=N,req=false " \
"name=threshold,type=CephInt,req=false",
"show information about stuck pgs [--threshold=seconds to consider stuck]",\
"show information about stuck pgs",\
"pg", "r", "cli,rest")
COMMAND("pg map name=pgid,type=CephPgid", "show mapping of pg to osds", \
"pg", "r", "cli,rest")

View File

@ -874,9 +874,6 @@ def validate_command(parsed_args, sigdict, args, verbose=False):
if parsed_args.output_format:
valid_dict['format'] = parsed_args.output_format
if parsed_args.threshold:
valid_dict['threshold'] = parsed_args.threshold
return valid_dict
def send_command(cluster, target=('mon', ''), cmd=[], inbuf='', timeout=0,