Merge pull request #29486 from runsisi/wip-fix-verbose

ceph.in: fix verbose print

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Kefu Chai 2019-08-09 12:21:29 +08:00 committed by GitHub
commit abce85bbd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -573,7 +573,7 @@ def do_command(parsed_args, target, cmdargs, sigdict, inbuf, verbose):
next_header_print = Termsize().rows - 3
next_header_print -= 1
ret, outbuf, outs = json_command(cluster_handle, target=target,
argdict=valid_dict, inbuf=inbuf)
argdict=valid_dict, inbuf=inbuf, verbose=verbose)
if valid_dict.get('poll', False):
valid_dict['print_header'] = False
if not valid_dict.get('poll', False):

View File

@ -1366,6 +1366,9 @@ def send_command(cluster, target=('mon', ''), cmd=None, inbuf=b'', timeout=0,
cluster.osd_command, osdid, cmd, inbuf, timeout=timeout)
elif target[0] == 'mgr':
if verbose:
print('submit {0} to {1}'.format(cmd, target[0]),
file=sys.stderr)
ret, outbuf, outs = run_in_thread(
cluster.mgr_command, cmd, inbuf, timeout=timeout)